diff options
| author | 1Step621 <86859447+1STEP621@users.noreply.github.com> | 2024-02-24 10:22:23 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-24 10:22:23 +0900 |
| commit | e3dd3f6b63efffde6dd125e8ecef66aa7069c1a0 (patch) | |
| tree | 2f90c46c89d786d33808e1335ab11e4f812183ef /packages/frontend/src/components/MkReactionsViewer.reaction.vue | |
| parent | enhance?: DeleteAccountServiceでユーザーを削除する際にuserChangeD... (diff) | |
| download | misskey-e3dd3f6b63efffde6dd125e8ecef66aa7069c1a0.tar.gz misskey-e3dd3f6b63efffde6dd125e8ecef66aa7069c1a0.tar.bz2 misskey-e3dd3f6b63efffde6dd125e8ecef66aa7069c1a0.zip | |
Enhance(frontend): リアクションピッカーを調整 (#13354)
* 打てない絵文字を表示しないのではなくグレーアウトするように など
* fix: 今度は検索とピン留めに効いてなかった
* lint fix
* use Map
* 斜めに線を引いてわかりやすく
* 斜め線は右上からのほうが良かったかも
* デザイン調整
Diffstat (limited to 'packages/frontend/src/components/MkReactionsViewer.reaction.vue')
| -rw-r--r-- | packages/frontend/src/components/MkReactionsViewer.reaction.vue | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/frontend/src/components/MkReactionsViewer.reaction.vue b/packages/frontend/src/components/MkReactionsViewer.reaction.vue index 0dcd8b0ea2..bccee5109d 100644 --- a/packages/frontend/src/components/MkReactionsViewer.reaction.vue +++ b/packages/frontend/src/components/MkReactionsViewer.reaction.vue @@ -33,7 +33,8 @@ import { defaultStore } from '@/store.js'; import { i18n } from '@/i18n.js'; import * as sound from '@/scripts/sound.js'; import { checkReactionPermissions } from '@/scripts/check-reaction-permissions.js'; -import { customEmojis } from '@/custom-emojis.js'; +import { customEmojisMap } from '@/custom-emojis.js'; +import { unicodeEmojisMap } from '@/scripts/emojilist.js'; const props = defineProps<{ reaction: string; @@ -50,13 +51,11 @@ const emit = defineEmits<{ const buttonEl = shallowRef<HTMLElement>(); -const isCustomEmoji = computed(() => props.reaction.includes(':')); -const emoji = computed(() => isCustomEmoji.value ? customEmojis.value.find(emoji => emoji.name === props.reaction.replace(/:/g, '').replace(/@\./, '')) : null); +const emojiName = computed(() => props.reaction.replace(/:/g, '').replace(/@\./, '')); +const emoji = computed(() => customEmojisMap.get(emojiName.value) ?? unicodeEmojisMap.get(props.reaction)); const canToggle = computed(() => { - return !props.reaction.match(/@\w/) && $i - && (emoji.value && checkReactionPermissions($i, props.note, emoji.value)) - || !isCustomEmoji.value; + return !props.reaction.match(/@\w/) && $i && emoji.value && checkReactionPermissions($i, props.note, emoji.value); }); const canGetInfo = computed(() => !props.reaction.match(/@\w/) && props.reaction.includes(':')); |