download/install indication
This commit is contained in:
parent
84b818655e
commit
0f0202a3aa
1 changed files with 9 additions and 2 deletions
|
@ -63,14 +63,22 @@ oml.ui.appDialog = function() {
|
||||||
width: 128
|
width: 128
|
||||||
}).bindEvent({
|
}).bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
|
var _this = this;
|
||||||
this.options({
|
this.options({
|
||||||
disabled: true,
|
disabled: true,
|
||||||
title: Ox._('Installing...')
|
title: Ox._('Downloading...')
|
||||||
});
|
});
|
||||||
oml.isRelaunching = true;
|
oml.isRelaunching = true;
|
||||||
oml.api.restart({update: true}, function(response) {
|
oml.api.restart({update: true}, function(response) {
|
||||||
if (response.status.code == 200) {
|
if (response.status.code == 200) {
|
||||||
|
_this.options({
|
||||||
|
title: Ox._('Installing...')
|
||||||
|
});
|
||||||
setTimeout(reload, 500);
|
setTimeout(reload, 500);
|
||||||
|
} else {
|
||||||
|
_this.options({
|
||||||
|
title: Ox._('Download failed...')
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -178,7 +186,6 @@ oml.ui.appDialog = function() {
|
||||||
ws.close();
|
ws.close();
|
||||||
};
|
};
|
||||||
ws.onclose = function(event) {
|
ws.onclose = function(event) {
|
||||||
console.log('waiting...');
|
|
||||||
setTimeout(reload, 500);
|
setTimeout(reload, 500);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue