mirror of
https://github.com/paricafe/misskey.git
synced 2025-04-21 05:06:11 -05:00
enhance(frontend): ナビゲーションバーの副ボタンを非表示にできるように
This commit is contained in:
parent
72734fe365
commit
26b2cfe518
6 changed files with 26 additions and 1 deletions
locales
packages/frontend/src
pages/settings
preferences
ui/_common_
utility/autogen
4
locales/index.d.ts
vendored
4
locales/index.d.ts
vendored
|
@ -5610,6 +5610,10 @@ export interface Locale extends ILocale {
|
|||
* 有効にすると、一部のシチュエーションでのユーザビリティが低下する場合があります。
|
||||
*/
|
||||
"makeEveryTextElementsSelectable_description": string;
|
||||
/**
|
||||
* ナビゲーションバーに副ボタンを表示
|
||||
*/
|
||||
"showNavbarSubButtons": string;
|
||||
};
|
||||
"_preferencesProfile": {
|
||||
/**
|
||||
|
|
|
@ -1403,6 +1403,7 @@ _settings:
|
|||
timelineAndNote: "タイムラインとノート"
|
||||
makeEveryTextElementsSelectable: "全てのテキスト要素を選択可能にする"
|
||||
makeEveryTextElementsSelectable_description: "有効にすると、一部のシチュエーションでのユーザビリティが低下する場合があります。"
|
||||
showNavbarSubButtons: "ナビゲーションバーに副ボタンを表示"
|
||||
|
||||
_preferencesProfile:
|
||||
profileName: "プロファイル名"
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -329,6 +329,9 @@ export const PREF_DEF = {
|
|||
makeEveryTextElementsSelectable: {
|
||||
default: DEFAULT_DEVICE_KIND === 'desktop',
|
||||
},
|
||||
showNavbarSubButtons: {
|
||||
default: true,
|
||||
},
|
||||
plugins: {
|
||||
default: [] as Plugin[],
|
||||
},
|
||||
|
|
|
@ -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)">
|
||||
|
|
|
@ -587,6 +587,12 @@ export const searchIndexes: SearchIndexItem[] = [
|
|||
path: '/settings/other',
|
||||
icon: 'ti ti-dots',
|
||||
},
|
||||
{
|
||||
id: 'pOot4giZs',
|
||||
label: i18n.ts._settings.showNavbarSubButtons,
|
||||
keywords: ['toggle', 'button', 'sub'],
|
||||
path: '/settings/navbar',
|
||||
},
|
||||
{
|
||||
id: '3icEvyv2D',
|
||||
children: [
|
||||
|
|
Loading…
Add table
Reference in a new issue