enhance(frontend): ナビゲーションバーの副ボタンを非表示にできるように
This commit is contained in:
parent
72734fe365
commit
26b2cfe518
|
@ -5610,6 +5610,10 @@ export interface Locale extends ILocale {
|
||||||
* 有効にすると、一部のシチュエーションでのユーザビリティが低下する場合があります。
|
* 有効にすると、一部のシチュエーションでのユーザビリティが低下する場合があります。
|
||||||
*/
|
*/
|
||||||
"makeEveryTextElementsSelectable_description": string;
|
"makeEveryTextElementsSelectable_description": string;
|
||||||
|
/**
|
||||||
|
* ナビゲーションバーに副ボタンを表示
|
||||||
|
*/
|
||||||
|
"showNavbarSubButtons": string;
|
||||||
};
|
};
|
||||||
"_preferencesProfile": {
|
"_preferencesProfile": {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1403,6 +1403,7 @@ _settings:
|
||||||
timelineAndNote: "タイムラインとノート"
|
timelineAndNote: "タイムラインとノート"
|
||||||
makeEveryTextElementsSelectable: "全てのテキスト要素を選択可能にする"
|
makeEveryTextElementsSelectable: "全てのテキスト要素を選択可能にする"
|
||||||
makeEveryTextElementsSelectable_description: "有効にすると、一部のシチュエーションでのユーザビリティが低下する場合があります。"
|
makeEveryTextElementsSelectable_description: "有効にすると、一部のシチュエーションでのユーザビリティが低下する場合があります。"
|
||||||
|
showNavbarSubButtons: "ナビゲーションバーに副ボタンを表示"
|
||||||
|
|
||||||
_preferencesProfile:
|
_preferencesProfile:
|
||||||
profileName: "プロファイル名"
|
profileName: "プロファイル名"
|
||||||
|
|
|
@ -42,6 +42,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<option value="top">{{ i18n.ts._menuDisplay.top }}</option>
|
<option value="top">{{ i18n.ts._menuDisplay.top }}</option>
|
||||||
<!-- <MkRadio v-model="menuDisplay" value="hide" disabled>{{ i18n.ts._menuDisplay.hide }}</MkRadio>--> <!-- TODO: サイドバーを完全に隠せるようにすると、別途ハンバーガーボタンのようなものをUIに表示する必要があり面倒 -->
|
<!-- <MkRadio v-model="menuDisplay" value="hide" disabled>{{ i18n.ts._menuDisplay.hide }}</MkRadio>--> <!-- TODO: サイドバーを完全に隠せるようにすると、別途ハンバーガーボタンのようなものをUIに表示する必要があり面倒 -->
|
||||||
</MkRadios>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -51,6 +59,8 @@ import MkRadios from '@/components/MkRadios.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import FormSlot from '@/components/form/slot.vue';
|
import FormSlot from '@/components/form/slot.vue';
|
||||||
import MkContainer from '@/components/MkContainer.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 * as os from '@/os.js';
|
||||||
import { navbarItemDef } from '@/navbar.js';
|
import { navbarItemDef } from '@/navbar.js';
|
||||||
import { store } from '@/store.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 menuDisplay = computed(store.makeGetterSetter('menuDisplay'));
|
||||||
|
const showNavbarSubButtons = prefer.model('showNavbarSubButtons');
|
||||||
|
|
||||||
async function addItem() {
|
async function addItem() {
|
||||||
const menu = Object.keys(navbarItemDef).filter(k => !prefer.s.menu.includes(k));
|
const menu = Object.keys(navbarItemDef).filter(k => !prefer.s.menu.includes(k));
|
||||||
|
|
|
@ -329,6 +329,9 @@ export const PREF_DEF = {
|
||||||
makeEveryTextElementsSelectable: {
|
makeEveryTextElementsSelectable: {
|
||||||
default: DEFAULT_DEVICE_KIND === 'desktop',
|
default: DEFAULT_DEVICE_KIND === 'desktop',
|
||||||
},
|
},
|
||||||
|
showNavbarSubButtons: {
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
default: [] as Plugin[],
|
default: [] as Plugin[],
|
||||||
},
|
},
|
||||||
|
|
|
@ -65,7 +65,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</svg>
|
</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]">
|
<div :class="[$style.subButton, $style.menuEditButton]">
|
||||||
<svg viewBox="0 0 16 64" :class="$style.subButtonShape">
|
<svg viewBox="0 0 16 64" :class="$style.subButtonShape">
|
||||||
<g transform="matrix(0.333333,0,0,0.222222,0.000895785,21.3333)">
|
<g transform="matrix(0.333333,0,0,0.222222,0.000895785,21.3333)">
|
||||||
|
|
|
@ -587,6 +587,12 @@ export const searchIndexes: SearchIndexItem[] = [
|
||||||
path: '/settings/other',
|
path: '/settings/other',
|
||||||
icon: 'ti ti-dots',
|
icon: 'ti ti-dots',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'pOot4giZs',
|
||||||
|
label: i18n.ts._settings.showNavbarSubButtons,
|
||||||
|
keywords: ['toggle', 'button', 'sub'],
|
||||||
|
path: '/settings/navbar',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: '3icEvyv2D',
|
id: '3icEvyv2D',
|
||||||
children: [
|
children: [
|
||||||
|
|
Loading…
Reference in New Issue