diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-03-25 09:50:59 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-03-25 09:50:59 +0900 |
| commit | 26b2cfe51877575631b4aa73b353cf7f415d6089 (patch) | |
| tree | 1227c181a22eb4bb9708208d39dbe0e3f6ad74c8 /packages/frontend/src | |
| parent | enhance(frontend): バックグラウンドでチャットメッセージが... (diff) | |
| download | sharkey-26b2cfe51877575631b4aa73b353cf7f415d6089.tar.gz sharkey-26b2cfe51877575631b4aa73b353cf7f415d6089.tar.bz2 sharkey-26b2cfe51877575631b4aa73b353cf7f415d6089.zip | |
enhance(frontend): ナビゲーションバーの副ボタンを非表示にできるように
Diffstat (limited to 'packages/frontend/src')
4 files changed, 21 insertions, 1 deletions
diff --git a/packages/frontend/src/pages/settings/navbar.vue b/packages/frontend/src/pages/settings/navbar.vue index 706cb731eb..b6fdd009b2 100644 --- a/packages/frontend/src/pages/settings/navbar.vue +++ b/packages/frontend/src/pages/settings/navbar.vue @@ -42,6 +42,14 @@ SPDX-License-Identifier: AGPL-3.0-only <option value="top">{{ i18n.ts._menuDisplay.top }}</option> <!-- <MkRadio v-model="menuDisplay" value="hide" disabled>{{ i18n.ts._menuDisplay.hide }}</MkRadio>--> <!-- TODO: サイドバーを完全に隠せるようにすると、別途ハンバーガーボタンのようなものをUIに表示する必要があり面倒 --> </MkRadios> + + <SearchMarker :keywords="['toggle', 'button', 'sub']"> + <MkPreferenceContainer k="showNavbarSubButtons"> + <MkSwitch v-model="showNavbarSubButtons"> + <template #label><SearchLabel>{{ i18n.ts._settings.showNavbarSubButtons }}</SearchLabel></template> + </MkSwitch> + </MkPreferenceContainer> + </SearchMarker> </div> </template> @@ -51,6 +59,8 @@ import MkRadios from '@/components/MkRadios.vue'; import MkButton from '@/components/MkButton.vue'; import FormSlot from '@/components/form/slot.vue'; import MkContainer from '@/components/MkContainer.vue'; +import MkSwitch from '@/components/MkSwitch.vue'; +import MkPreferenceContainer from '@/components/MkPreferenceContainer.vue'; import * as os from '@/os.js'; import { navbarItemDef } from '@/navbar.js'; import { store } from '@/store.js'; @@ -68,6 +78,7 @@ const items = ref(prefer.s.menu.map(x => ({ }))); const menuDisplay = computed(store.makeGetterSetter('menuDisplay')); +const showNavbarSubButtons = prefer.model('showNavbarSubButtons'); async function addItem() { const menu = Object.keys(navbarItemDef).filter(k => !prefer.s.menu.includes(k)); diff --git a/packages/frontend/src/preferences/def.ts b/packages/frontend/src/preferences/def.ts index 127ebeef0c..310c3856eb 100644 --- a/packages/frontend/src/preferences/def.ts +++ b/packages/frontend/src/preferences/def.ts @@ -329,6 +329,9 @@ export const PREF_DEF = { makeEveryTextElementsSelectable: { default: DEFAULT_DEVICE_KIND === 'desktop', }, + showNavbarSubButtons: { + default: true, + }, plugins: { default: [] as Plugin[], }, diff --git a/packages/frontend/src/ui/_common_/navbar.vue b/packages/frontend/src/ui/_common_/navbar.vue index 88ce3a96e2..0f00a25d7a 100644 --- a/packages/frontend/src/ui/_common_/navbar.vue +++ b/packages/frontend/src/ui/_common_/navbar.vue @@ -65,7 +65,7 @@ SPDX-License-Identifier: AGPL-3.0-only </svg> --> - <div v-if="!forceIconOnly" :class="$style.subButtons"> + <div v-if="!forceIconOnly && prefer.r.showNavbarSubButtons.value" :class="$style.subButtons"> <div :class="[$style.subButton, $style.menuEditButton]"> <svg viewBox="0 0 16 64" :class="$style.subButtonShape"> <g transform="matrix(0.333333,0,0,0.222222,0.000895785,21.3333)"> diff --git a/packages/frontend/src/utility/autogen/settings-search-index.ts b/packages/frontend/src/utility/autogen/settings-search-index.ts index 64fe328478..7c2ec90dd8 100644 --- a/packages/frontend/src/utility/autogen/settings-search-index.ts +++ b/packages/frontend/src/utility/autogen/settings-search-index.ts @@ -588,6 +588,12 @@ export const searchIndexes: SearchIndexItem[] = [ icon: 'ti ti-dots', }, { + id: 'pOot4giZs', + label: i18n.ts._settings.showNavbarSubButtons, + keywords: ['toggle', 'button', 'sub'], + path: '/settings/navbar', + }, + { id: '3icEvyv2D', children: [ { |