Remove step 1 of previous setup flow, replaced by choice screen

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-08-02 15:18:09 -07:00
parent ba347744ff
commit ff1cb3598d
No known key found for this signature in database
GPG key ID: A4931C09644C654B
2 changed files with 10 additions and 19 deletions

View file

@ -44,7 +44,7 @@
}
this.$('#device-name').val(deviceName);
this.$('#step1').show();
this.$('#step2').show();
this.connect();
this.on('disconnected', this.reconnect);
@ -63,6 +63,10 @@
).catch(this.handleDisconnect.bind(this));
},
handleDisconnect: function(e) {
if (this.canceled) {
return;
}
if (e.message === 'websocket closed') {
this.showConnectionError();
this.trigger('disconnected');
@ -78,11 +82,15 @@
events: function() {
return {
'click .error-dialog .ok': 'connect',
'click .step1': this.selectStep.bind(this, 1),
'click .step1': 'onCancel',
'click .step2': this.selectStep.bind(this, 2),
'click .step3': this.selectStep.bind(this, 3)
};
},
onCancel: function() {
this.canceled = true;
this.trigger('cancel');
},
clearQR: function() {
this.$('#qr').text(i18n("installConnecting"));
},