mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-25 10:58:19 +01:00
Display info in network status when unlinked
When we can't connect due to being unlinked, network status indicator will show an appropriate informational message and a button to open the installer window to relink. // FREEBIE
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
this.model = new Backbone.Model();
|
||||
this.listenTo(this.model, 'change', this.onChange);
|
||||
},
|
||||
events: {
|
||||
'click .openInstaller': extension.install
|
||||
},
|
||||
finishConnectingGracePeriod: function() {
|
||||
this.withinConnectingGracePeriod = false;
|
||||
},
|
||||
@@ -36,6 +39,8 @@
|
||||
var message = '';
|
||||
var instructions = '';
|
||||
var hasInterruption = false;
|
||||
var action = null;
|
||||
var buttonClass = null;
|
||||
|
||||
var socketStatus = this.getSocketStatus();
|
||||
switch(socketStatus) {
|
||||
@@ -68,12 +73,20 @@
|
||||
hasInterruption = true;
|
||||
message = i18n('offline');
|
||||
instructions = i18n('checkNetworkConnection');
|
||||
} else if (!Whisper.Registration.isDone()) {
|
||||
hasInterruption = true;
|
||||
message = i18n('Unlinked');
|
||||
instructions = i18n('unlinkedWarning');
|
||||
action = i18n('relink');
|
||||
buttonClass = 'openInstaller';
|
||||
}
|
||||
|
||||
return {
|
||||
message: message,
|
||||
instructions: instructions,
|
||||
hasInterruption: hasInterruption
|
||||
hasInterruption: hasInterruption,
|
||||
action: action,
|
||||
buttonClass: buttonClass
|
||||
};
|
||||
},
|
||||
update: function() {
|
||||
|
||||
Reference in New Issue
Block a user