menu opts

This commit is contained in:
Kainoa Kanter 2023-04-06 23:02:07 -07:00
parent 0f5a6e0eef
commit 3b9d9cb635
1 changed files with 14 additions and 11 deletions

View File

@ -1,6 +1,7 @@
import { markRaw, ref } from "vue";
import { Storage } from "./pizzax";
import { Theme } from "./scripts/theme";
import { deviceKind } from '@/scripts/device-kind';
export const postFormActions = [];
export const userActions = [];
@ -8,6 +9,18 @@ export const noteActions = [];
export const noteViewInterruptors = [];
export const notePostInterruptors = [];
const menuOptions = [
"notifications",
"followRequests",
"messaging",
"explore",
"favorites",
"channels",
"search"
];
if (deviceKind === 'desktop') menuOptions.push("ui");
// TODO: それぞれいちいちwhereとかdefaultというキーを付けなきゃいけないの冗長なのでなんとかする(ただ型定義が面倒になりそう)
// あと、現行の定義の仕方なら「whereが何であるかに関わらずキー名の重複不可」という制約を付けられるメリットもあるからそのメリットを引き継ぐ方法も考えないといけない
export const defaultStore = markRaw(
@ -82,17 +95,7 @@ export const defaultStore = markRaw(
},
menu: {
where: "deviceAccount",
default: [
"notifications",
undefined,
"followRequests",
"messaging",
"explore",
"favorites",
"channels",
"search",
"ui",
],
default: menuOptions,
},
visibility: {
where: "deviceAccount",