|
@@ -2,12 +2,13 @@
|
|
|
import { onMount, getContext } from 'svelte';
|
|
|
import { Confetti } from 'svelte-confetti';
|
|
|
|
|
|
- import { WEBUI_NAME, config } from '$lib/stores';
|
|
|
+ import { WEBUI_NAME, config, settings } from '$lib/stores';
|
|
|
|
|
|
import { WEBUI_VERSION } from '$lib/constants';
|
|
|
import { getChangelog } from '$lib/apis';
|
|
|
|
|
|
import Modal from './common/Modal.svelte';
|
|
|
+ import { updateUserSettings } from '$lib/apis/users';
|
|
|
|
|
|
const i18n = getContext('i18n');
|
|
|
|
|
@@ -104,8 +105,10 @@
|
|
|
</div>
|
|
|
<div class="flex justify-end pt-3 text-sm font-medium">
|
|
|
<button
|
|
|
- on:click={() => {
|
|
|
+ on:click={async () => {
|
|
|
localStorage.version = $config.version;
|
|
|
+ await settings.set({ ...$settings, ...{ version: $config.version } });
|
|
|
+ await updateUserSettings(localStorage.token, { ui: $settings });
|
|
|
show = false;
|
|
|
}}
|
|
|
class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-lg"
|