mirror of
https://github.com/open-webui/computer.git
synced 2026-11-26 15:21:01 -05:00
refac
This commit is contained in:
1 parent
efa8f0a96b
commit
cef556ba31
2 files changed
+4
-2
No files matched your search
@@ -2,6 +2,7 @@
|
||||
import { fetchJSON } from '$lib/apis';
|
||||
import Modal from './Modal.svelte';
|
||||
import Icon from './Icon.svelte';
|
||||
import { savePreferences } from '$lib/apis/state';
|
||||
import { appVersion, lastSeenVersion, showChangelog } from '$lib/stores';
|
||||
import Spinner from '$lib/components/common/Spinner.svelte';
|
||||
import { t } from '$lib/i18n';
|
||||
@@ -29,6 +30,8 @@
|
||||
function handleClose() {
|
||||
if ($appVersion) {
|
||||
lastSeenVersion.set($appVersion);
|
||||
// Persist immediately so Done and the close button survive a quick reload.
|
||||
savePreferences({ version: $appVersion }).catch(() => {});
|
||||
}
|
||||
showChangelog.set(false);
|
||||
}
|
||||
|
||||
@@ -130,8 +130,7 @@
|
||||
// First-time load: initialize the last seen version to the current version so we don't pop up immediately
|
||||
lastSeenVersion.set(currentVer);
|
||||
} else {
|
||||
// Update: record this version as seen before showing the changelog so it doesn't reopen repeatedly.
|
||||
lastSeenVersion.set(currentVer);
|
||||
// Update: show the changelog until the user dismisses it.
|
||||
showChangelog.set(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user