1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-27 10:44:26 +02:00

enhance(frontend): refactor and improve ux

This commit is contained in:
syuilo
2025-03-25 18:30:28 +09:00
parent de76a66c03
commit 22f99b42f6
6 changed files with 38 additions and 11 deletions

View File

@@ -35,11 +35,11 @@ import { customEmojisMap } from '@/custom-emojis.js';
import * as os from '@/os.js';
import { misskeyApi, misskeyApiGet } from '@/utility/misskey-api.js';
import { copyToClipboard } from '@/utility/copy-to-clipboard.js';
import * as sound from '@/utility/sound.js';
import { i18n } from '@/i18n.js';
import MkCustomEmojiDetailedDialog from '@/components/MkCustomEmojiDetailedDialog.vue';
import { $i } from '@/i.js';
import { prefer } from '@/preferences.js';
import { DI } from '@/di.js';
const props = defineProps<{
name: string;
@@ -53,7 +53,7 @@ const props = defineProps<{
fallbackToImage?: boolean;
}>();
const react = inject<((name: string) => void) | null>('react', null);
const react = inject(DI.mfmEmojiReactCallback);
const customEmojiName = computed(() => (props.name[0] === ':' ? props.name.substring(1, props.name.length - 1) : props.name).replace('@.', ''));
const isLocal = computed(() => !props.host && (customEmojiName.value.endsWith('@.') || !customEmojiName.value.includes('@')));
@@ -109,7 +109,6 @@ function onClick(ev: MouseEvent) {
icon: 'ti ti-plus',
action: () => {
react(`:${props.name}:`);
sound.playMisskeySfx('reaction');
},
});
}