wip
This commit is contained in:
parent
167a7201c2
commit
e0cea2facc
@ -39,7 +39,7 @@ const url = computed(() => {
|
|||||||
const alt = computed(() => customEmoji.value ? `:${customEmoji.value.name}:` : char.value);
|
const alt = computed(() => customEmoji.value ? `:${customEmoji.value.name}:` : char.value);
|
||||||
|
|
||||||
const onContextmenu = (e: MouseEvent) => {
|
const onContextmenu = (e: MouseEvent) => {
|
||||||
openReactionImportMenu(e, props.emoji);
|
openReactionImportMenu(e, customEmoji.value?.id ?? props.emoji);
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -90,7 +90,7 @@ export async function openReactionImportMenu(ev: MouseEvent, reaction: string) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
}];
|
}];
|
||||||
const emojiId = await getEmojiId(reaction);
|
const emojiId = await getEmojiId(reaction)? await getEmojiId(reaction) : reaction;
|
||||||
if (reaction.startsWith(':') && emojiId) {
|
if (reaction.startsWith(':') && emojiId) {
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -99,7 +99,9 @@ export async function openReactionImportMenu(ev: MouseEvent, reaction: string) {
|
|||||||
action: async () => {
|
action: async () => {
|
||||||
const duplication: boolean = await os.api('meta').then(meta => {
|
const duplication: boolean = await os.api('meta').then(meta => {
|
||||||
const emojis = meta.emojis;
|
const emojis = meta.emojis;
|
||||||
return emojis.some(emoji => emoji.name === reaction.match(/(?<=:).*(?=@.*\.*(?=:))/g)[0]);
|
return emojis.some((emoji) => {
|
||||||
|
return (emoji.name === reaction.match(/(?<=:).*(?=@.*\.*(?=:))/g)[0]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(await duplication);
|
console.log(await duplication);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user