mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-11-30 16:02:58 +08:00
feat: 增加更新页
This commit is contained in:
1 parent
eec6286a58
commit
9dee0bbd3c
28 files changed
+1079
-135
No files matched your search
@@ -1,25 +1,47 @@
|
||||
export const APP_UPDATE_RELEASES_URL = 'https://github.com/Wxw-Gu/TraceMemo/releases/latest'
|
||||
|
||||
export type AppUpdateStatus =
|
||||
| 'idle'
|
||||
| 'checking'
|
||||
| 'available'
|
||||
| 'not-available'
|
||||
| 'up-to-date'
|
||||
| 'downloading'
|
||||
| 'downloaded'
|
||||
| 'installing'
|
||||
| 'error'
|
||||
| 'unsupported'
|
||||
|
||||
export type AppUpdateCheckSource = 'startup' | 'manual'
|
||||
export type AppUpdateDelivery = 'automatic' | 'release-page'
|
||||
|
||||
export interface AppUpdateState {
|
||||
status: AppUpdateStatus
|
||||
currentVersion: string
|
||||
delivery: AppUpdateDelivery
|
||||
version?: string
|
||||
percent?: number
|
||||
transferred?: number
|
||||
total?: number
|
||||
bytesPerSecond?: number
|
||||
message?: string
|
||||
error?: string
|
||||
source?: AppUpdateCheckSource
|
||||
isSimulation?: boolean
|
||||
}
|
||||
|
||||
export interface AppUpdateCheckResult {
|
||||
success: boolean
|
||||
state: AppUpdateState
|
||||
}
|
||||
|
||||
export interface AppUpdateInstallResult {
|
||||
success: boolean
|
||||
simulated?: boolean
|
||||
message?: string
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface AppUpdateOpenDownloadPageResult {
|
||||
success: boolean
|
||||
error?: string
|
||||
}
|
||||
Reference in new issue
Block a user