diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index 52cf1a998..8c7202bdb 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -519,5 +519,14 @@
"invalidNumberError": {
"message": "Invalid number",
"description": "When a person inputs a number that is invalid"
+ },
+ "unlinkedWarning": {
+ "message": "Relink Signal Desktop to your mobile device to continue messaging."
+ },
+ "unlinked": {
+ "message": "Unlinked"
+ },
+ "relink": {
+ "message": "Relink"
}
}
diff --git a/background.html b/background.html
index c33f3377f..74671985c 100644
--- a/background.html
+++ b/background.html
@@ -501,6 +501,11 @@
{{ attemptingReconnectionMessage }}
{{/reconnectDurationAsSeconds }}
+ {{ #action }}
+
+
+
+ {{/action }}
diff --git a/js/views/network_status_view.js b/js/views/network_status_view.js
index 4d7d994a0..951329540 100644
--- a/js/views/network_status_view.js
+++ b/js/views/network_status_view.js
@@ -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() {
diff --git a/stylesheets/_index.scss b/stylesheets/_index.scss
index e80b8aabe..c869821e0 100644
--- a/stylesheets/_index.scss
+++ b/stylesheets/_index.scss
@@ -49,6 +49,16 @@
padding: 0.5em 0;
}
}
+ .action {
+ button {
+ border-radius: $border-radius;
+ border: solid 1px #ccc;
+ cursor: pointer;
+ font-family: inherit;
+ color: white;
+ background: $blue;
+ }
+ }
}
}
diff --git a/stylesheets/manifest.css b/stylesheets/manifest.css
index 57012a8ef..a4f5e61ab 100644
--- a/stylesheets/manifest.css
+++ b/stylesheets/manifest.css
@@ -763,6 +763,13 @@ img.emoji {
display: inline-block;
font-size: 12px;
padding: 0.5em 0; }
+ .network-status-container .network-status .action button {
+ border-radius: 5px;
+ border: solid 1px #ccc;
+ cursor: pointer;
+ font-family: inherit;
+ color: white;
+ background: #2090ea; }
.conversation-stack {
padding-left: 300px; }