fix: update info toast dismiss issue

This commit is contained in:
Timothy J. Baek 2024-10-06 23:41:50 -07:00
parent 6e8e0454e4
commit ed9fbe153b
2 changed files with 9 additions and 5 deletions

View File

@ -26,13 +26,11 @@
>
</div>
<div class=" flex-shrink-0 pl-2">
<div class=" flex-shrink-0 pr-1">
<button
class=" hover:text-blue-900 dark:hover:text-blue-300 transition"
on:click={() => {
console.log('closeToast');
localStorage.setItem('dismissedUpdateToast', Date.now().toString());
dispatch('closeToast');
dispatch('close');
}}
>
<XMark />

View File

@ -229,7 +229,13 @@
{#if version && compareVersion(version.latest, version.current)}
<div class=" absolute bottom-8 right-8 z-50" in:fade={{ duration: 100 }}>
<UpdateInfoToast {version} />
<UpdateInfoToast
{version}
on:close={() => {
localStorage.setItem('dismissedUpdateToast', Date.now().toString());
version = null;
}}
/>
</div>
{/if}