mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-09 19:33:10 +02:00
最近使用した絵文字からリアクションピッカーに設定してある絵文字は除外するように
This commit is contained in:
parent
4299e3f90c
commit
c6a009dbae
2 changed files with 10 additions and 7 deletions
|
@ -32,7 +32,7 @@
|
|||
<div class="index">
|
||||
<section>
|
||||
<div>
|
||||
<button v-for="emoji in reactions || $store.state.settings.reactions"
|
||||
<button v-for="emoji in pinned"
|
||||
class="_button"
|
||||
@click="chosen(emoji, $event)"
|
||||
tabindex="0"
|
||||
|
@ -109,7 +109,7 @@ export default defineComponent({
|
|||
src: {
|
||||
required: false
|
||||
},
|
||||
reactions: {
|
||||
overridePinned: {
|
||||
required: false
|
||||
},
|
||||
},
|
||||
|
@ -120,6 +120,7 @@ export default defineComponent({
|
|||
return {
|
||||
emojilist: markRaw(emojilist),
|
||||
getStaticImageUrl,
|
||||
pinned: this.overridePinned || this.$store.state.settings.reactions,
|
||||
customEmojiCategories: this.$store.getters['instance/emojiCategories'],
|
||||
customEmojis: this.$store.state.instance.meta.emojis,
|
||||
visibleCategories: {},
|
||||
|
@ -334,10 +335,12 @@ export default defineComponent({
|
|||
this.$refs.modal.close();
|
||||
|
||||
// 最近使った絵文字更新
|
||||
let recents = this.$store.state.device.recentlyUsedEmojis;
|
||||
recents = recents.filter((e: any) => e !== key);
|
||||
recents.unshift(key);
|
||||
this.$store.commit('device/set', { key: 'recentlyUsedEmojis', value: recents.splice(0, 16) });
|
||||
if (!this.pinned.includes(key)) {
|
||||
let recents = this.$store.state.device.recentlyUsedEmojis;
|
||||
recents = recents.filter((e: any) => e !== key);
|
||||
recents.unshift(key);
|
||||
this.$store.commit('device/set', { key: 'recentlyUsedEmojis', value: recents.splice(0, 16) });
|
||||
}
|
||||
},
|
||||
|
||||
paste(event) {
|
||||
|
|
|
@ -82,7 +82,7 @@ export default defineComponent({
|
|||
preview(ev) {
|
||||
if (this.$store.state.device.useFullReactionPicker) {
|
||||
os.popup(import('@/components/emoji-picker.vue'), {
|
||||
reactions: this.splited,
|
||||
overridePinned: this.splited,
|
||||
src: ev.currentTarget || ev.target,
|
||||
}, {}, 'closed');
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue