diff --git a/static/js/appDialog.js b/static/js/appDialog.js index 2e90b8e..c679591 100644 --- a/static/js/appDialog.js +++ b/static/js/appDialog.js @@ -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); }; }