Export: Improve usability - timing expectations, install button (#1474)

Because export might take a couple minutes, we now set expectations
that it might take 'several minutes' instead of just 'please wait.'

We also promote 'Install new Signal Desktop' from a text link in the
instructions to a button. This is important on the 'Completed' screen
because it is bigger and to the left of the 'Export Again' button, which
previously drew primary focus on that screen.

Lastly, we also remove the title-specific element of the support link,
so we're resilient to title changes in the future.

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-09-13 13:33:40 -07:00 committed by GitHub
parent 1e694fe8d7
commit 00e1a6a36a
3 changed files with 19 additions and 3 deletions

View file

@ -45,8 +45,9 @@
templateName: 'app-migration-screen',
className: 'app-loading-screen',
events: {
'click .install': 'onClickInstall',
'click .export': 'onClickExport',
'click .debug-log': 'onClickDebugLog'
'click .debug-log': 'onClickDebugLog',
},
initialize: function() {
if (!Whisper.Migration.inProgress()) {
@ -69,6 +70,7 @@
var exportButton;
var hideProgress = Whisper.Migration.isComplete();
var debugLogButton = i18n('submitDebugLog');
var installButton = i18n('installNewSignal');
if (this.error) {
return {
@ -91,12 +93,14 @@
break;
case State.DISCONNECTING:
message = i18n('migrationDisconnecting');
installButton = null;
break;
default:
hideProgress = true;
message = i18n('exportInstructions');
exportButton = i18n('export');
debugLogButton = null;
installButton = null;
}
return {
@ -104,8 +108,13 @@
message: message,
exportButton: exportButton,
debugLogButton: debugLogButton,
installButton: installButton,
};
},
onClickInstall: function() {
var url = 'https://support.whispersystems.org/hc/en-us/articles/214507138';
window.open(url, '_blank');
},
onClickDebugLog: function() {
this.openDebugLog();
},