update banner via gitea releases

This commit is contained in:
2026-05-12 00:20:49 +03:00
parent 5a916d2ad2
commit 297f307588
5 changed files with 209 additions and 0 deletions
+10
View File
@@ -51,6 +51,13 @@ export type DownloadProgress = {
total: number | null
}
export type UpdateInfo = {
version: string
current_version: string
release_url: string
body: string
}
export type CaptureRect = {
x: number
y: number
@@ -104,6 +111,9 @@ export const api = {
getOverlayRect: () => invoke<CaptureRect>("get_overlay_rect"),
extractThumbnails: (fps: number) =>
invoke<string[]>("extract_thumbnails", { fps }),
openUrl: (url: string) => invoke<void>("open_url", { url }),
onUpdateAvailable: (handler: (info: UpdateInfo) => void): Promise<UnlistenFn> =>
listen<UpdateInfo>("update-available", (e) => handler(e.payload)),
}
export function formatBytes(n: number): string {