Skip to content

Commit

Permalink
Introduce final 'uninstall' step to the export process
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnonnenberg-signal committed Nov 16, 2018
1 parent acf90ad commit af6f32e
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 5 deletions.
25 changes: 25 additions & 0 deletions _locales/en/messages.json
@@ -1,4 +1,29 @@
{
"uninstallHeader": {
"message": "How to uninstall"
},
"uninstallStep1": {
"message": "Open this location in your Chrome browser:"
},
"uninstallStep2": {
"message": "Find 'Signal Private Messenger'"
},
"uninstallStep3": {
"message": "Select 'Remove'"
},
"uninstallStep4": {
"message": "Click 'Remove' to confirm"
},
"uninstallStep5": {
"message": "Delete your previously exported data here:"
},
"uninstallStep6": {
"message": "Remove the Signal Desktop Chrome App shortcut"
},
"linuxInstallInstructions": {
"message": "Debian-based Linux install instructions",
"description": "When exporting data for migration to Electron app, Linux instructions pop up."
},
"readOnlyMode": {
"message": "This application is in read-only mode. Please upgrade to the latest Signal Desktop.",
"description": "Shown when the user tries to send a message"
Expand Down
27 changes: 27 additions & 0 deletions background.html
Expand Up @@ -688,6 +688,33 @@ <h3>{{ message }}</h3>
</div>
</div>
{{/isStep4}}
{{#isStep5}}
<div id='step5' class='step'>
<div class='inner'>
<div class='step-body'>
<span class='banner-icon check-circle-outline'></span>
<div class='header'>{{ uninstallHeader }}</div>
<div class='body-text-wide center'>
<ol class='uninstall-steps'>
<li>{{ uninstallStep5 }}</li>
<div class='export-location'>{{ completeLocation }}</div>
{{ #uninstallStep6 }}
<li><a href="https://support.signal.org/hc/en-us/articles/360007320191" target="_blank">{{ uninstallStep6 }}</a></li>
{{ /uninstallStep6 }}
<li>{{ uninstallStep1 }} <div class='url'>chrome://extensions/</div></li>
<li>{{ uninstallStep2 }}</li>
<li>{{ uninstallStep3 }}</li>
<li>{{ uninstallStep4 }}</li>
</ol>
</div>
<div class='nav'>
<div>
<a class='link submit-debug-log'>{{ debugLogButton }}</a>
</div>
</div>
</div>
</div>
{{/isStep5}}
{{#isError}}
<div id='error' class='step'>
<div class='inner error-dialog clearfix'>
Expand Down
1 change: 1 addition & 0 deletions js/views/inbox_view.js
Expand Up @@ -144,6 +144,7 @@
this.appLoadingScreen = null;
}
this.showUpgradeScreen();
this.showUpgradeBanner();
}
else {
this.showUpgradeBanner();
Expand Down
19 changes: 14 additions & 5 deletions js/views/migration_view.js
Expand Up @@ -18,8 +18,7 @@
},
render_attributes: function() {
var attributes = this._super.render_attributes.call(this);
// TODO: i18n
attributes.header = 'Debian-based Linux install instructions';
attributes.header = i18n('linuxInstallInstructions');
return attributes;
},
ok: function(event) {
Expand All @@ -45,6 +44,7 @@
CHOOSE: 2,
EXPORTING: 3,
COMPLETE: 4,
UNINSTALL: 5,
};

var GET_YAML_PATH = /^path: (.+)$/m;
Expand Down Expand Up @@ -176,7 +176,7 @@
if (Whisper.Migration.everComplete()) {
// If the user has ever successfully exported before, we'll show the 'finished'
// screen with the 'Export again' button.
this.step = STEPS.COMPLETE;
this.step = STEPS.UNINSTALL;
Whisper.Migration.markComplete();
}

Expand All @@ -198,9 +198,9 @@
var userAgent = navigator.userAgent.toLowerCase();
var downloadLocation = '#';
if (userAgent.indexOf('windows') !== -1) {
downloadLocation = this.windowsLink;
downloadLocation = this.windowsLink || 'https://signal.org/download';
} else if (userAgent.indexOf('macintosh') !== -1) {
downloadLocation = this.macLink;
downloadLocation = this.macLink || 'https://signal.org/download';
} else {
downloadLocation = 'https://signal.org/download';
}
Expand Down Expand Up @@ -232,6 +232,15 @@
completeNextSteps: i18n('completeNextSteps'),
downloadLocation: downloadLocation,
installButton: i18n('getNewVersion'),

isStep5: this.step === 5,
uninstallHeader: i18n('uninstallHeader'),
uninstallStep1: i18n('uninstallStep1'),
uninstallStep2: i18n('uninstallStep2'),
uninstallStep3: i18n('uninstallStep3'),
uninstallStep4: i18n('uninstallStep4'),
uninstallStep5: i18n('uninstallStep5'),
uninstallStep6: userAgent.indexOf('macintosh') !== -1 ? i18n('uninstallStep6') : null,
};
},
onGetNewVersion: function(e) {
Expand Down
9 changes: 9 additions & 0 deletions stylesheets/_global.scss
Expand Up @@ -771,6 +771,15 @@ input[type=text], input[type=search], textarea {
margin-right: auto;
max-width: 35em;
}
.uninstall-steps {
margin-bottom: 4em;
li {
margin: 0.5em;
}
}
.url {
font-weight: bold;
}

.linux-install-instructions .content {
max-width: 1300px;
Expand Down
6 changes: 6 additions & 0 deletions stylesheets/manifest.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit af6f32e

Please sign in to comment.