web/dialog: fix meowbalt not being displayed on nojs popup

This commit is contained in:
jj 2025-05-23 10:44:51 +00:00
parent 8ca793f69b
commit 22eb05bf98
No known key found for this signature in database
2 changed files with 7 additions and 3 deletions

View File

@ -39,7 +39,10 @@
>
{#if meowbalt}
<div class="meowbalt-container">
<Meowbalt emotion={meowbalt} />
<Meowbalt
emotion={meowbalt}
forceLoaded={id === 'nojs-dialog'}
/>
</div>
{/if}
<div class="dialog-inner-container">

View File

@ -4,16 +4,17 @@
type Props = {
emotion: MeowbaltEmotions;
forceLoaded?: boolean;
};
const { emotion }: Props = $props();
const { emotion, forceLoaded }: Props = $props();
let loaded = $state(false);
</script>
<img
class="meowbalt {emotion}"
class:loaded
class:loaded={loaded || forceLoaded}
onload={() => (loaded = true)}
src="/meowbalt/{emotion}.png"
height="152"