This commit is contained in:
zhuzichu
2023-09-04 18:37:55 +08:00
parent ba32c92133
commit f7b7d30a6f
9 changed files with 447 additions and 397 deletions

View File

@ -309,27 +309,33 @@ CustomWindow {
}
}
function checkUpdate(){
var callable = {}
callable.onStart = function(){
HttpCallable{
id:callable
onStart: {
console.debug("satrt check update...")
}
callable.onFinish = function(){
onFinish: {
console.debug("check update finish")
}
callable.onSuccess = function(result){
var data = JSON.parse(result)
console.debug("current version "+appInfo.version)
console.debug("new version "+data.tag_name)
if(data.tag_name !== appInfo.version){
dialog_update.newVerson = data.tag_name
dialog_update.body = data.body
dialog_update.open()
onSuccess:
(result)=>{
var data = JSON.parse(result)
console.debug("current version "+appInfo.version)
console.debug("new version "+data.tag_name)
if(data.tag_name !== appInfo.version){
dialog_update.newVerson = data.tag_name
dialog_update.body = data.body
dialog_update.open()
}
}
}
callable.onError = function(status,errorString){
console.debug(status+";"+errorString)
}
onError:
(status,errorString)=>{
console.debug(status+";"+errorString)
}
}
function checkUpdate(){
http.get("https://api.github.com/repos/zhuzichu520/FluentUI/releases/latest",callable)
}