mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 06:13:09 +02:00
fix 912791b3ab
This commit is contained in:
parent
09078de36b
commit
dcfc526453
3 changed files with 4 additions and 2 deletions
|
@ -17,6 +17,7 @@ const props = defineProps<{
|
||||||
normal?: boolean;
|
normal?: boolean;
|
||||||
noStyle?: boolean;
|
noStyle?: boolean;
|
||||||
isReaction?: boolean;
|
isReaction?: boolean;
|
||||||
|
host?: string | null;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const char2path = defaultStore.state.emojiStyle === 'twemoji' ? char2twemojiFilePath : char2fluentEmojiFilePath;
|
const char2path = defaultStore.state.emojiStyle === 'twemoji' ? char2twemojiFilePath : char2fluentEmojiFilePath;
|
||||||
|
@ -29,7 +30,7 @@ const url = computed(() => {
|
||||||
if (char.value) {
|
if (char.value) {
|
||||||
return char2path(char.value);
|
return char2path(char.value);
|
||||||
} else {
|
} else {
|
||||||
const rawUrl = '/emoji/' + customEmojiName + '.webp';
|
const rawUrl = props.host ? `/emoji/${customEmojiName}@${props.host}.webp` : `/emoji/${customEmojiName}.webp`;
|
||||||
return defaultStore.state.disableShowingAnimatedImages
|
return defaultStore.state.disableShowingAnimatedImages
|
||||||
? getStaticImageUrl(rawUrl)
|
? getStaticImageUrl(rawUrl)
|
||||||
: rawUrl;
|
: rawUrl;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<Mfm :text="user.name || user.username" :plain="true" :nowrap="nowrap"/>
|
<Mfm :text="user.name ?? user.username" :author="user" :plain="true" :nowrap="nowrap"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|
|
@ -273,6 +273,7 @@ export default defineComponent({
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
emoji: `:${token.props.name}:`,
|
emoji: `:${token.props.name}:`,
|
||||||
normal: this.plain,
|
normal: this.plain,
|
||||||
|
host: this.author?.host,
|
||||||
})];
|
})];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue