diff --git a/packages/client/src/store.ts b/packages/client/src/store.ts index d2350e2edb..15cb69ff04 100644 --- a/packages/client/src/store.ts +++ b/packages/client/src/store.ts @@ -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",