mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-24 18:42:09 +02:00
web/dialog: fix meowbalt not being displayed on nojs popup
This commit is contained in:
parent
8ca793f69b
commit
22eb05bf98
@ -39,7 +39,10 @@
|
|||||||
>
|
>
|
||||||
{#if meowbalt}
|
{#if meowbalt}
|
||||||
<div class="meowbalt-container">
|
<div class="meowbalt-container">
|
||||||
<Meowbalt emotion={meowbalt} />
|
<Meowbalt
|
||||||
|
emotion={meowbalt}
|
||||||
|
forceLoaded={id === 'nojs-dialog'}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="dialog-inner-container">
|
<div class="dialog-inner-container">
|
||||||
|
@ -4,16 +4,17 @@
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
emotion: MeowbaltEmotions;
|
emotion: MeowbaltEmotions;
|
||||||
|
forceLoaded?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const { emotion }: Props = $props();
|
const { emotion, forceLoaded }: Props = $props();
|
||||||
|
|
||||||
let loaded = $state(false);
|
let loaded = $state(false);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
class="meowbalt {emotion}"
|
class="meowbalt {emotion}"
|
||||||
class:loaded
|
class:loaded={loaded || forceLoaded}
|
||||||
onload={() => (loaded = true)}
|
onload={() => (loaded = true)}
|
||||||
src="/meowbalt/{emotion}.png"
|
src="/meowbalt/{emotion}.png"
|
||||||
height="152"
|
height="152"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user