1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-27 06:18:46 +09:00
This commit is contained in:
NoriDev 2024-08-21 10:40:56 +09:00
parent 710e37bc4a
commit 2c6ee7902a
2 changed files with 6 additions and 15 deletions

View File

@ -66,12 +66,6 @@ const reactionName = computed(() => {
return r.slice(0, r.indexOf('@'));
});
const reactionHost = computed(() => {
const r = props.reaction.replace(':', '');
const host = r.slice(r.indexOf('@') + 1);
return host.endsWith('.') ? host.slice(0, -1) : host;
});
const alternative: ComputedRef<string | null> = computed(() => defaultStore.state.reactableRemoteReactionEnabled ? (customEmojis.value.find(it => it.name === reactionName.value)?.name ?? null) : null);
async function toggleReaction(ev: MouseEvent) {
@ -135,18 +129,16 @@ function stealReaction(ev: MouseEvent) {
text: i18n.ts.import,
icon: 'ti ti-plus',
action: async () => {
await os.apiWithDialog('admin/emoji/steal', {
name: reactionName.value,
host: reactionHost.value,
await os.apiWithDialog('admin/emoji/copy', {
emojiId: props.reaction,
});
},
}, {
text: `${i18n.ts.doReaction} (${i18n.ts.import})`,
icon: 'ti ti-mood-plus',
action: async () => {
await os.apiWithDialog('admin/emoji/steal', {
name: reactionName.value,
host: reactionHost.value,
await os.apiWithDialog('admin/emoji/copy', {
emojiId: props.reaction,
});
await misskeyApi('notes/reactions/create', {

View File

@ -107,9 +107,8 @@ function onClick(ev: MouseEvent) {
text: i18n.ts.import,
icon: 'ti ti-plus',
action: () => {
os.apiWithDialog('admin/emoji/steal', {
name: customEmojiName.value,
host: props.host,
os.apiWithDialog('admin/emoji/copy', {
emojiId: props.name,
});
},
}] : []), ...(props.menuReaction && react ? [{