Enable continue button if a passphrase has been set

pull/21833/head
David Baker 2020-06-24 15:21:09 +01:00
parent bf15e96a6a
commit a23b784e00
1 changed files with 4 additions and 1 deletions

View File

@ -78,6 +78,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
passPhraseConfirm: '', passPhraseConfirm: '',
copied: false, copied: false,
downloaded: false, downloaded: false,
setPassphrase: false,
backupInfo: null, backupInfo: null,
backupSigStatus: null, backupSigStatus: null,
// does the server offer a UI auth flow with just m.login.password // does the server offer a UI auth flow with just m.login.password
@ -177,6 +178,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
this.setState({ this.setState({
copied: false, copied: false,
downloaded: false, downloaded: false,
setPassphrase: false,
phase: PHASE_SHOWKEY, phase: PHASE_SHOWKEY,
}); });
} else { } else {
@ -395,6 +397,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
this.setState({ this.setState({
copied: false, copied: false,
downloaded: false, downloaded: false,
setPassphrase: true,
phase: PHASE_SHOWKEY, phase: PHASE_SHOWKEY,
}); });
} }
@ -634,7 +637,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
let continueButton; let continueButton;
if (this.state.phase === PHASE_SHOWKEY) { if (this.state.phase === PHASE_SHOWKEY) {
continueButton = <DialogButtons primaryButton={_t("Continue")} continueButton = <DialogButtons primaryButton={_t("Continue")}
disabled={!this.state.downloaded && !this.state.copied} disabled={!this.state.downloaded && !this.state.copied && !this.state.setPassphrase}
onPrimaryButtonClick={this._onShowKeyContinueClick} onPrimaryButtonClick={this._onShowKeyContinueClick}
hasCancel={false} hasCancel={false}
/>; />;