feat: add auto-update functionality
This commit is contained in:
@@ -432,3 +432,30 @@ export namespace models {
|
||||
|
||||
}
|
||||
|
||||
export namespace updater {
|
||||
|
||||
export class UpdateInfo {
|
||||
available: boolean;
|
||||
currentVersion: string;
|
||||
latestVersion: string;
|
||||
releaseNotes: string;
|
||||
downloadURL: string;
|
||||
downloadSize: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new UpdateInfo(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.available = source["available"];
|
||||
this.currentVersion = source["currentVersion"];
|
||||
this.latestVersion = source["latestVersion"];
|
||||
this.releaseNotes = source["releaseNotes"];
|
||||
this.downloadURL = source["downloadURL"];
|
||||
this.downloadSize = source["downloadSize"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user