Feat: Import & Export Store + Update Trigger

This commit is contained in:
Youwes09
2026-04-23 20:09:50 -05:00
parent bb7256c4f8
commit 4e6be5d9f5
4 changed files with 212 additions and 22 deletions
@@ -3,6 +3,7 @@
import { listen } from "@tauri-apps/api/event";
import { getVersion } from "@tauri-apps/api/app";
import { open as openUrl } from "@tauri-apps/plugin-shell";
import { autoBackupAppData } from "@core/backup";
interface ReleaseInfo { tag_name: string; name: string; body: string; published_at: string; html_url: string; }
type UpdatePhase = "idle" | "downloading" | "launching" | "ready" | "error";
@@ -87,6 +88,7 @@
targetTag = release.tag_name; updatePhase = "downloading"; updateError = null; dlBytes = 0; dlTotal = null;
try {
if (IS_WINDOWS) {
await autoBackupAppData();
try { await invoke("kill_server"); } catch {}
await invoke("download_and_install_update", { tag: release.tag_name });
updatePhase = "ready";