mirror of
https://github.com/open-webui/open-webui.git
synced 2026-01-02 14:45:18 +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();
|
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) {
|
$: if (show) {
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
@ -38,10 +45,7 @@
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
class="self-center"
|
class="self-center"
|
||||||
on:click={() => {
|
on:click={closeModal}
|
||||||
localStorage.version = $config.version;
|
|
||||||
show = false;
|
|
||||||
}}
|
|
||||||
aria-label={$i18n.t('Close')}
|
aria-label={$i18n.t('Close')}
|
||||||
>
|
>
|
||||||
<XMark className={'size-5'}>
|
<XMark className={'size-5'}>
|
||||||
|
|
@ -102,12 +106,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-end pt-3 text-sm font-medium">
|
<div class="flex justify-end pt-3 text-sm font-medium">
|
||||||
<button
|
<button
|
||||||
on:click={async () => {
|
on:click={closeModal}
|
||||||
localStorage.version = $config.version;
|
|
||||||
await settings.set({ ...$settings, ...{ version: $config.version } });
|
|
||||||
await updateUserSettings(localStorage.token, { ui: $settings });
|
|
||||||
show = false;
|
|
||||||
}}
|
|
||||||
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"
|
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>
|
<span class="relative">{$i18n.t("Okay, Let's Go!")}</span>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue