mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-12-01 06:17:38 -07:00
menu opts
This commit is contained in:
parent
b999bf1766
commit
07180d073b
1 changed files with 14 additions and 11 deletions
|
@ -1,6 +1,7 @@
|
||||||
import { markRaw, ref } from "vue";
|
import { markRaw, ref } from "vue";
|
||||||
import { Storage } from "./pizzax";
|
import { Storage } from "./pizzax";
|
||||||
import { Theme } from "./scripts/theme";
|
import { Theme } from "./scripts/theme";
|
||||||
|
import { deviceKind } from '@/scripts/device-kind';
|
||||||
|
|
||||||
export const postFormActions = [];
|
export const postFormActions = [];
|
||||||
export const userActions = [];
|
export const userActions = [];
|
||||||
|
@ -8,6 +9,18 @@ export const noteActions = [];
|
||||||
export const noteViewInterruptors = [];
|
export const noteViewInterruptors = [];
|
||||||
export const notePostInterruptors = [];
|
export const notePostInterruptors = [];
|
||||||
|
|
||||||
|
const menuOptions = [
|
||||||
|
"notifications",
|
||||||
|
"followRequests",
|
||||||
|
"messaging",
|
||||||
|
"explore",
|
||||||
|
"favorites",
|
||||||
|
"channels",
|
||||||
|
"search"
|
||||||
|
];
|
||||||
|
|
||||||
|
if (deviceKind === 'desktop') menuOptions.push("ui");
|
||||||
|
|
||||||
// TODO: それぞれいちいちwhereとかdefaultというキーを付けなきゃいけないの冗長なのでなんとかする(ただ型定義が面倒になりそう)
|
// TODO: それぞれいちいちwhereとかdefaultというキーを付けなきゃいけないの冗長なのでなんとかする(ただ型定義が面倒になりそう)
|
||||||
// あと、現行の定義の仕方なら「whereが何であるかに関わらずキー名の重複不可」という制約を付けられるメリットもあるからそのメリットを引き継ぐ方法も考えないといけない
|
// あと、現行の定義の仕方なら「whereが何であるかに関わらずキー名の重複不可」という制約を付けられるメリットもあるからそのメリットを引き継ぐ方法も考えないといけない
|
||||||
export const defaultStore = markRaw(
|
export const defaultStore = markRaw(
|
||||||
|
@ -82,17 +95,7 @@ export const defaultStore = markRaw(
|
||||||
},
|
},
|
||||||
menu: {
|
menu: {
|
||||||
where: "deviceAccount",
|
where: "deviceAccount",
|
||||||
default: [
|
default: menuOptions,
|
||||||
"notifications",
|
|
||||||
undefined,
|
|
||||||
"followRequests",
|
|
||||||
"messaging",
|
|
||||||
"explore",
|
|
||||||
"favorites",
|
|
||||||
"channels",
|
|
||||||
"search",
|
|
||||||
"ui",
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
visibility: {
|
visibility: {
|
||||||
where: "deviceAccount",
|
where: "deviceAccount",
|
||||||
|
|
Loading…
Reference in a new issue