mirror of
https://github.com/element-hq/element-web
synced 2024-11-22 17:25:50 +03:00
Merge pull request #2291 from matrix-org/dbkr/create_key_backup_async
Make create key backup dialog async
This commit is contained in:
commit
0c6e98548e
3 changed files with 15 additions and 7 deletions
|
@ -59,8 +59,14 @@ export default React.createClass({
|
|||
|
||||
_onResetRecoveryClick: function() {
|
||||
this.props.onFinished(false);
|
||||
const CreateKeyBackupDialog = sdk.getComponent("dialogs.keybackup.CreateKeyBackupDialog");
|
||||
Modal.createTrackedDialog('Create Key Backup', '', CreateKeyBackupDialog, {});
|
||||
Modal.createTrackedDialogAsync('Key Backup', 'Key Backup',
|
||||
import('../../../../async-components/views/dialogs/keybackup/CreateKeyBackupDialog'),
|
||||
{
|
||||
onFinished: () => {
|
||||
this._loadBackupStatus();
|
||||
},
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
_onRecoveryKeyChange: function(e) {
|
||||
|
|
|
@ -80,12 +80,14 @@ export default class KeyBackupPanel extends React.Component {
|
|||
}
|
||||
|
||||
_startNewBackup() {
|
||||
const CreateKeyBackupDialog = sdk.getComponent('dialogs.keybackup.CreateKeyBackupDialog');
|
||||
Modal.createTrackedDialog('Key Backup', 'Key Backup', CreateKeyBackupDialog, {
|
||||
onFinished: () => {
|
||||
this._loadBackupStatus();
|
||||
Modal.createTrackedDialogAsync('Key Backup', 'Key Backup',
|
||||
import('../../../async-components/views/dialogs/keybackup/CreateKeyBackupDialog'),
|
||||
{
|
||||
onFinished: () => {
|
||||
this._loadBackupStatus();
|
||||
},
|
||||
},
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
_deleteBackup() {
|
||||
|
|
Loading…
Reference in a new issue