Frontend: Hopefully fixed emoji resolution
ci/woodpecker/push/ociImagePush Pipeline was successful
Details
ci/woodpecker/push/ociImagePush Pipeline was successful
Details
This commit is contained in:
parent
b4611bda78
commit
cb645ef0f6
|
@ -17,7 +17,10 @@
|
|||
:custom-emojis="[
|
||||
...note.emojis,
|
||||
typeof url !== 'undefined'
|
||||
? { name: reaction, url: url }
|
||||
? {
|
||||
name: reaction.substring(1, reaction.length - 1),
|
||||
url: url,
|
||||
}
|
||||
: undefined,
|
||||
]"
|
||||
/>
|
||||
|
|
|
@ -27,12 +27,17 @@ import { getStaticImageUrl } from "@/scripts/get-static-image-url";
|
|||
import { char2filePath } from "@/scripts/twemoji-base";
|
||||
import { defaultStore } from "@/store";
|
||||
import { instance } from "@/instance";
|
||||
import { packed } from "magnetar-common";
|
||||
import { magTransProperty } from "@/scripts-mag/mag-util";
|
||||
|
||||
const props = defineProps<{
|
||||
emoji: string;
|
||||
normal?: boolean;
|
||||
noStyle?: boolean;
|
||||
customEmojis?: Pick<Misskey.entities.CustomEmoji, "name" | "url">[];
|
||||
customEmojis?: (
|
||||
| packed.PackEmojiBase
|
||||
| Pick<Misskey.entities.CustomEmoji, "name" | "url">
|
||||
)[];
|
||||
isReaction?: boolean;
|
||||
}>();
|
||||
|
||||
|
@ -45,7 +50,9 @@ const ce = computed(() => props.customEmojis ?? instance.emojis ?? []);
|
|||
const customEmoji = computed(() =>
|
||||
isCustom.value
|
||||
? ce.value.find(
|
||||
(x) => x.name === props.emoji.substring(1, props.emoji.length - 1)
|
||||
(x) =>
|
||||
magTransProperty(x, "shortcode", "name") ===
|
||||
props.emoji.substring(1, props.emoji.length - 1)
|
||||
)
|
||||
: null
|
||||
);
|
||||
|
@ -61,7 +68,9 @@ const url = computed(() => {
|
|||
}
|
||||
});
|
||||
const alt = computed(() =>
|
||||
customEmoji.value ? `:${customEmoji.value.name}:` : char.value
|
||||
customEmoji.value
|
||||
? `:${magTransProperty(customEmoji.value, "shortcode", "name")}:`
|
||||
: char.value
|
||||
);
|
||||
</script>
|
||||
|
||||
|
|
|
@ -15,9 +15,10 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {} from "vue";
|
||||
import MfmCore from "@/components/mfm";
|
||||
import { defaultStore } from "@/store";
|
||||
import * as Misskey from "calckey-js";
|
||||
import { packed } from "magnetar-common";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
@ -25,7 +26,7 @@ const props = withDefaults(
|
|||
plain?: boolean;
|
||||
nowrap?: boolean;
|
||||
author?: any;
|
||||
customEmojis?: any;
|
||||
customEmojis?: (packed.PackEmojiBase | Misskey.entities.CustomEmoji)[];
|
||||
isNote?: boolean;
|
||||
advancedMfm: boolean;
|
||||
}>(),
|
||||
|
|
Loading…
Reference in New Issue