enhance(frontend): 絵文字ピッカーをドロワー表示するか自由に設定可能に
This commit is contained in:
@@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
ref="modal"
|
||||
v-slot="{ type, maxHeight }"
|
||||
:zPriority="'middle'"
|
||||
:preferType="defaultStore.state.emojiPickerUseDrawerForMobile === false ? 'popup' : 'auto'"
|
||||
:preferType="defaultStore.state.emojiPickerStyle"
|
||||
:hasInteractionWithOtherFocusTrappedEls="true"
|
||||
:transparentBg="true"
|
||||
:manualShowing="manualShowing"
|
||||
|
@@ -113,10 +113,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<option :value="4">{{ i18n.ts.large }}+</option>
|
||||
</MkRadios>
|
||||
|
||||
<MkSwitch v-model="emojiPickerUseDrawerForMobile">
|
||||
{{ i18n.ts.useDrawerReactionPickerForMobile }}
|
||||
<MkSelect v-model="emojiPickerStyle">
|
||||
<template #label>{{ i18n.ts.style }}</template>
|
||||
<template #caption>{{ i18n.ts.needReloadToApply }}</template>
|
||||
</MkSwitch>
|
||||
<option value="auto">{{ i18n.ts.auto }}</option>
|
||||
<option value="popup">{{ i18n.ts.popup }}</option>
|
||||
<option value="drawer">{{ i18n.ts.drawer }}</option>
|
||||
</MkSelect>
|
||||
</div>
|
||||
</FormSection>
|
||||
</div>
|
||||
@@ -128,7 +131,7 @@ import Sortable from 'vuedraggable';
|
||||
import MkRadios from '@/components/MkRadios.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import FormSection from '@/components/form/section.vue';
|
||||
import MkSwitch from '@/components/MkSwitch.vue';
|
||||
import MkSelect from '@/components/MkSelect.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
@@ -146,7 +149,7 @@ const pinnedEmojis: Ref<string[]> = ref(deepClone(defaultStore.state.pinnedEmoji
|
||||
const emojiPickerScale = computed(defaultStore.makeGetterSetter('emojiPickerScale'));
|
||||
const emojiPickerWidth = computed(defaultStore.makeGetterSetter('emojiPickerWidth'));
|
||||
const emojiPickerHeight = computed(defaultStore.makeGetterSetter('emojiPickerHeight'));
|
||||
const emojiPickerUseDrawerForMobile = computed(defaultStore.makeGetterSetter('emojiPickerUseDrawerForMobile'));
|
||||
const emojiPickerStyle = computed(defaultStore.makeGetterSetter('emojiPickerStyle'));
|
||||
|
||||
const removeReaction = (reaction: string, ev: MouseEvent) => remove(pinnedEmojisForReaction, reaction, ev);
|
||||
const chooseReaction = (ev: MouseEvent) => pickEmoji(pinnedEmojisForReaction, ev);
|
||||
|
@@ -87,7 +87,7 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [
|
||||
'emojiPickerScale',
|
||||
'emojiPickerWidth',
|
||||
'emojiPickerHeight',
|
||||
'emojiPickerUseDrawerForMobile',
|
||||
'emojiPickerStyle',
|
||||
'defaultSideView',
|
||||
'menuDisplay',
|
||||
'reportError',
|
||||
|
@@ -304,9 +304,9 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||
where: 'device',
|
||||
default: 2,
|
||||
},
|
||||
emojiPickerUseDrawerForMobile: {
|
||||
emojiPickerStyle: {
|
||||
where: 'device',
|
||||
default: true,
|
||||
default: 'auto' as 'auto' | 'popup' | 'drawer',
|
||||
},
|
||||
recentlyUsedEmojis: {
|
||||
where: 'device',
|
||||
|
Reference in New Issue
Block a user