diff --git a/res/css/structures/auth/_CompleteSecurity.scss b/res/css/structures/auth/_CompleteSecurity.scss index 7dba57305f..7ea78befb4 100644 --- a/res/css/structures/auth/_CompleteSecurity.scss +++ b/res/css/structures/auth/_CompleteSecurity.scss @@ -102,3 +102,7 @@ limitations under the License. } } } + +.mx_CompleteSecurity_resetText { + padding-top: 20px; +} diff --git a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js index 2147f2c8a8..a7114d9a73 100644 --- a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js +++ b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js @@ -359,6 +359,14 @@ export default class CreateSecretStorageDialog extends React.PureComponent { this.setState({phase: PHASE_CONFIRM_SKIP}); } + _onGoBackClick = () => { + if (this.state.backupInfo && !this.props.force) { + this.setState({phase: PHASE_MIGRATE}); + } else { + this.setState({phase: PHASE_INTRO}); + } + } + _onAccountPasswordChange = (e) => { this.setState({ accountPassword: e.target.value, @@ -492,6 +500,18 @@ export default class CreateSecretStorageDialog extends React.PureComponent { _renderPhaseIntro() { const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); + + let cancelButton; + if (this.props.force) { + // if this is a forced key reset then aborting will just leave the old keys + // in place, and is thereforece just 'cancel' + cancelButton = ; + } else { + // if it's setting up from scratch then aborting leaves the user without + // crypto set up, so they skipping the setup. + cancelButton = ; + } + return
{_t( "Create a Recovery Key to store encryption keys & secrets with your account data. " + @@ -502,7 +522,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent { onPrimaryButtonClick={this._onIntroContinueClick} hasCancel={false} > - + {cancelButton}