update banner via gitea releases
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user