enhance(frontend): 리모트 서버와 동일한 이모지가 존재하지 않는 경우 '이모지 복사'를 비활성화함

This commit is contained in:
NoriDev 2023-11-27 17:41:38 +09:00
parent 1115159d75
commit 2c25f7bf50
2 changed files with 6 additions and 4 deletions

View file

@ -39,6 +39,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE
### Client
- Enhance: 사운드 설정을 저장할 때 상태를 확실하게 표시함
- Enhance: 리모트 서버와 동일한 이모지가 존재하지 않는 경우 '이모지 복사'를 비활성화함
- Fix: '모달 배경색 제거' 옵션이 이모지 피커에 반영되지 않음
- Fix: 열람 주의로 설정된 노트의 반응이 더 보기를 눌러야 표시됨

View file

@ -26,8 +26,9 @@ SPDX-License-Identifier: AGPL-3.0-only
import { computed, onMounted, onUnmounted, inject } from 'vue';
import { getProxiedImageUrl, getStaticImageUrl } from '@/scripts/media-proxy.js';
import { defaultStore } from '@/store.js';
import { customEmojisMap } from '@/custom-emojis.js';
import { customEmojis, customEmojisMap } from '@/custom-emojis.js';
import * as os from '@/os.js';
import * as sound from '@/scripts/sound.js';
import copyToClipboard from '@/scripts/copy-to-clipboard.js';
import { i18n } from '@/i18n.js';
import { $i } from '@/account.js';
@ -86,14 +87,13 @@ function onClick(ev: MouseEvent) {
os.popupMenu([{
type: 'label',
text: `:${props.name}:`,
}, {
}, ...((customEmojis.value.find(it => it.name === customEmojiName.value)?.name ?? null) ? [{
text: i18n.ts.copy,
icon: 'ti ti-copy',
action: () => {
copyToClipboard(`:${props.name}:`);
os.success();
},
}, ...(props.host && $i && ($i.isAdmin || $i.policies.canManageCustomEmojis) ? [{
}] : []), ...(props.host && $i && ($i.isAdmin || $i.policies.canManageCustomEmojis) ? [{
text: i18n.ts.import,
icon: 'ti ti-plus',
action: () => {
@ -106,6 +106,7 @@ function onClick(ev: MouseEvent) {
text: i18n.ts.doReaction,
icon: 'ti ti-mood-plus',
action: () => {
sound.play('reaction');
react(`:${props.name}:`);
},
}] : [])], ev.currentTarget ?? ev.target);