download/install indication

This commit is contained in:
j 2016-01-12 15:25:48 +05:30
parent 84b818655e
commit 0f0202a3aa
1 changed files with 9 additions and 2 deletions

View File

@ -63,14 +63,22 @@ oml.ui.appDialog = function() {
width: 128
}).bindEvent({
click: function() {
var _this = this;
this.options({
disabled: true,
title: Ox._('Installing...')
title: Ox._('Downloading...')
});
oml.isRelaunching = true;
oml.api.restart({update: true}, function(response) {
if (response.status.code == 200) {
_this.options({
title: Ox._('Installing...')
});
setTimeout(reload, 500);
} else {
_this.options({
title: Ox._('Download failed...')
});
}
});
}
@ -178,7 +186,6 @@ oml.ui.appDialog = function() {
ws.close();
};
ws.onclose = function(event) {
console.log('waiting...');
setTimeout(reload, 500);
};
}