Adds self-hosted update system
Implements a self-hosted update mechanism, allowing the application to be updated from a corporate network share without relying on third-party services. This includes: - Functionality to check for updates - Download installers - Verify checksums - Install updates with UAC elevation Configuration is managed via the config.ini file, with automatic checks on startup. A new settings UI is also included.
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
WindowUnmaximise,
|
||||
WindowIsMaximised,
|
||||
Quit,
|
||||
EventsOn,
|
||||
EventsOff,
|
||||
} from "$lib/wailsjs/runtime/runtime";
|
||||
import { RefreshCcwDot } from "@lucide/svelte";
|
||||
import { IsDebuggerRunning, QuitApp, TakeScreenshot, SubmitBugReport, OpenFolderInExplorer } from "$lib/wailsjs/go/main/App";
|
||||
@@ -162,6 +164,26 @@
|
||||
}
|
||||
});
|
||||
|
||||
// Listen for automatic update notifications
|
||||
$effect(() => {
|
||||
if (!browser) return;
|
||||
|
||||
EventsOn("update:available", (status: any) => {
|
||||
toast.info(`Update ${status.availableVersion} is available!`, {
|
||||
description: "Go to Settings to download and install",
|
||||
duration: 10000,
|
||||
action: {
|
||||
label: "Open Settings",
|
||||
onClick: () => goto("/settings"),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
return () => {
|
||||
EventsOff("update:available");
|
||||
};
|
||||
});
|
||||
|
||||
async function captureScreenshot() {
|
||||
isCapturing = true;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user