You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Add primary button to trigger restore flow
This commit is contained in:
@@ -170,6 +170,14 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
||||
this.props.onFinished(true);
|
||||
}
|
||||
|
||||
_onRestoreKeyBackupClick = () => {
|
||||
const RestoreKeyBackupDialog = sdk.getComponent('dialogs.keybackup.RestoreKeyBackupDialog');
|
||||
Modal.createTrackedDialog(
|
||||
'Restore Backup', '', RestoreKeyBackupDialog, null, null,
|
||||
/* priority = */ false, /* static = */ true,
|
||||
);
|
||||
}
|
||||
|
||||
_onOptOutClick = () => {
|
||||
this.setState({phase: PHASE_OPTOUT_CONFIRM});
|
||||
}
|
||||
@@ -285,9 +293,10 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
||||
"up from this session. To set up secret storage, " +
|
||||
"restore your key backup.",
|
||||
)}</p>
|
||||
<DialogButtons primaryButton={_t('Cancel')}
|
||||
onPrimaryButtonClick={this._onCancel}
|
||||
hasCancel={false}
|
||||
<DialogButtons primaryButton={_t('Restore')}
|
||||
onPrimaryButtonClick={this._onRestoreKeyBackupClick}
|
||||
onCancel={this._onCancel}
|
||||
hasCancel={true}
|
||||
>
|
||||
</DialogButtons>
|
||||
</div>;
|
||||
|
||||
Reference in New Issue
Block a user