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