parent
7e82d1295c
commit
4198987723
3 changed files with 11 additions and 3 deletions
|
@ -154,6 +154,10 @@
|
|||
"message": "Connecting...",
|
||||
"description": "Displayed when waiting for the QR Code"
|
||||
},
|
||||
"installConnectionFailed": {
|
||||
"message": "Failed to connect to server.",
|
||||
"description": "Displayed when we can't connect to the server."
|
||||
},
|
||||
"installGeneratingKeys": {
|
||||
"message": "Generating Keys"
|
||||
},
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
view.showSync();
|
||||
}).catch(function(e) {
|
||||
if (e.message === 'websocket closed') {
|
||||
init();
|
||||
view.showConnectionError();
|
||||
setTimeout(init, 10000);
|
||||
} else if (e.name === 'HTTPError' && e.code == 411) {
|
||||
view.showTooManyDevices();
|
||||
}
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
this.$('#qr').text(i18n("installConnecting"));
|
||||
},
|
||||
setProvisioningUrl: function(url) {
|
||||
this.$('#qr').html('');
|
||||
new QRCode(this.$('#qr')[0]).makeCode(url);
|
||||
this.$('#qr').html('');
|
||||
new QRCode(this.$('#qr')[0]).makeCode(url);
|
||||
},
|
||||
confirmNumber: function(number) {
|
||||
var parsed = libphonenumber.parse(number);
|
||||
|
@ -88,6 +88,9 @@
|
|||
},
|
||||
showTooManyDevices: function() {
|
||||
this.selectStep('TooManyDevices');
|
||||
},
|
||||
showConnectionError: function() {
|
||||
this.$('#qr').text(i18n("installConnectionFailed"));
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue