Skip to content

Commit

Permalink
Merge pull request open-webui#5965 from open-webui/dev
Browse files Browse the repository at this point in the history
fix: update info toast dismiss issue
  • Loading branch information
tjbck authored Oct 7, 2024
2 parents ad7bc62 + ed9fbe1 commit 3f89258
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/lib/components/layout/UpdateInfoToast.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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 />
Expand Down
8 changes: 7 additions & 1 deletion src/routes/(app)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit 3f89258

Please sign in to comment.