fix
This commit is contained in:
parent
d28a38f6ef
commit
3f97bcecc0
|
|
@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="_gaps_m">
|
<div class="_gaps_m">
|
||||||
<FormSection first="true">
|
<FormSection :first="true">
|
||||||
<template #label>{{ i18n.ts.reactionDeckSettingTitle }}</template>
|
<template #label>{{ i18n.ts.reactionDeckSettingTitle }}</template>
|
||||||
<template #description>{{ i18n.ts.reactionDeckSettingDescription }}</template>
|
<template #description>{{ i18n.ts.reactionDeckSettingDescription }}</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,20 +24,23 @@ class EmojiPicker {
|
||||||
// nop
|
// nop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* リアクションデッキ・絵文字デッキを動的に切り替えるための{@link ComputedRef}を作成する。
|
||||||
|
*/
|
||||||
private createDeckItemCompute(): ComputedRef<string[]> {
|
private createDeckItemCompute(): ComputedRef<string[]> {
|
||||||
const itemPresetType = this.itemPresetType;
|
const itemPresetTypeRef = this.itemPresetType;
|
||||||
const useReactionDeckItems = defaultStore.reactiveState.useReactionDeckItems;
|
const useReactionDeckItemsRef = defaultStore.reactiveState.useReactionDeckItems;
|
||||||
const reactionsRef = defaultStore.reactiveState.reactions;
|
const reactionsRef = defaultStore.reactiveState.reactions;
|
||||||
const emojisRef = defaultStore.reactiveState.emojiDeckItems;
|
const emojisRef = defaultStore.reactiveState.emojiDeckItems;
|
||||||
|
|
||||||
return computed(() => {
|
return computed(() => {
|
||||||
switch (itemPresetType.value) {
|
switch (itemPresetTypeRef.value) {
|
||||||
case 'reactions':
|
case 'reactions':
|
||||||
return reactionsRef.value;
|
return reactionsRef.value;
|
||||||
case 'emojis':
|
case 'emojis':
|
||||||
return emojisRef.value;
|
return emojisRef.value;
|
||||||
default:
|
default:
|
||||||
return useReactionDeckItems.value ? reactionsRef.value : emojisRef.value;
|
return useReactionDeckItemsRef.value ? reactionsRef.value : emojisRef.value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,14 @@ class ReactionPicker {
|
||||||
manualShowing: this.manualShowing,
|
manualShowing: this.manualShowing,
|
||||||
}, {
|
}, {
|
||||||
done: reaction => {
|
done: reaction => {
|
||||||
this.onChosen!(reaction);
|
if (this.onChosen) this.onChosen(reaction);
|
||||||
},
|
},
|
||||||
close: () => {
|
close: () => {
|
||||||
this.manualShowing.value = false;
|
this.manualShowing.value = false;
|
||||||
},
|
},
|
||||||
closed: () => {
|
closed: () => {
|
||||||
this.src.value = null;
|
this.src.value = null;
|
||||||
this.onClosed!();
|
if (this.onClosed) this.onClosed();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue