mirror of
https://github.com/open-webui/open-webui.git
synced 2026-01-02 06:35:20 +00:00
feat: make changelog modal X button persist dismissal like "Okay, Let's Go!" button (#20258)
* Update ChangelogModal.svelte * function
This commit is contained in:
parent
4750a7cab0
commit
214dd50ce9
1 changed files with 9 additions and 10 deletions
|
|
@ -23,6 +23,13 @@
|
|||
changelog = await getChangelog();
|
||||
};
|
||||
|
||||
const closeModal = async () => {
|
||||
localStorage.version = $config.version;
|
||||
await settings.set({ ...$settings, ...{ version: $config.version } });
|
||||
await updateUserSettings(localStorage.token, { ui: $settings });
|
||||
show = false;
|
||||
};
|
||||
|
||||
$: if (show) {
|
||||
init();
|
||||
}
|
||||
|
|
@ -38,10 +45,7 @@
|
|||
</div>
|
||||
<button
|
||||
class="self-center"
|
||||
on:click={() => {
|
||||
localStorage.version = $config.version;
|
||||
show = false;
|
||||
}}
|
||||
on:click={closeModal}
|
||||
aria-label={$i18n.t('Close')}
|
||||
>
|
||||
<XMark className={'size-5'}>
|
||||
|
|
@ -102,12 +106,7 @@
|
|||
</div>
|
||||
<div class="flex justify-end pt-3 text-sm font-medium">
|
||||
<button
|
||||
on:click={async () => {
|
||||
localStorage.version = $config.version;
|
||||
await settings.set({ ...$settings, ...{ version: $config.version } });
|
||||
await updateUserSettings(localStorage.token, { ui: $settings });
|
||||
show = false;
|
||||
}}
|
||||
on:click={closeModal}
|
||||
class="px-3.5 py-1.5 text-sm font-medium bg-black hover:bg-gray-900 text-white dark:bg-white dark:text-black dark:hover:bg-gray-100 transition rounded-full"
|
||||
>
|
||||
<span class="relative">{$i18n.t("Okay, Let's Go!")}</span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue