chore(client): 絵文字の画像読み込みに失敗した際はテキストではなくダミー画像を表示 (#13487)
This commit is contained in:
parent
f704891932
commit
114d3319e8
@ -48,3 +48,10 @@ export const Missing = {
|
|||||||
name: Default.args.name,
|
name: Default.args.name,
|
||||||
},
|
},
|
||||||
} satisfies StoryObj<typeof MkCustomEmoji>;
|
} satisfies StoryObj<typeof MkCustomEmoji>;
|
||||||
|
export const Error = {
|
||||||
|
...Default,
|
||||||
|
args: {
|
||||||
|
url: 'https://example.com/404',
|
||||||
|
name: Default.args.name,
|
||||||
|
},
|
||||||
|
} satisfies StoryObj<typeof MkCustomEmoji>;
|
||||||
|
@ -4,7 +4,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<span v-if="errored">:{{ customEmojiName }}:</span>
|
<img
|
||||||
|
v-if="errored"
|
||||||
|
:class="[$style.root, { [$style.normal]: normal, [$style.noStyle]: noStyle }]"
|
||||||
|
src="/client-assets/dummy.png"
|
||||||
|
:title="alt"
|
||||||
|
/>
|
||||||
<img
|
<img
|
||||||
v-else
|
v-else
|
||||||
:class="[$style.root, { [$style.normal]: normal, [$style.noStyle]: noStyle }]"
|
:class="[$style.root, { [$style.normal]: normal, [$style.noStyle]: noStyle }]"
|
||||||
|
Loading…
Reference in New Issue
Block a user