Make create key backup dialog async
So we can add zxcvbn to it without inflating the main bundle size
This commit is contained in:
parent
a9ae7f3eef
commit
4f8c4f1c6e
3 changed files with 15 additions and 7 deletions
|
@ -59,8 +59,14 @@ export default React.createClass({
|
||||||
|
|
||||||
_onResetRecoveryClick: function() {
|
_onResetRecoveryClick: function() {
|
||||||
this.props.onFinished(false);
|
this.props.onFinished(false);
|
||||||
const CreateKeyBackupDialog = sdk.getComponent("dialogs.keybackup.CreateKeyBackupDialog");
|
Modal.createTrackedDialogAsync('Key Backup', 'Key Backup',
|
||||||
Modal.createTrackedDialog('Create Key Backup', '', CreateKeyBackupDialog, {});
|
import('../../../../async-components/views/dialogs/keybackup/CreateKeyBackupDialog'),
|
||||||
|
{
|
||||||
|
onFinished: () => {
|
||||||
|
this._loadBackupStatus();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onRecoveryKeyChange: function(e) {
|
_onRecoveryKeyChange: function(e) {
|
||||||
|
|
|
@ -80,12 +80,14 @@ export default class KeyBackupPanel extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
_startNewBackup() {
|
_startNewBackup() {
|
||||||
const CreateKeyBackupDialog = sdk.getComponent('dialogs.keybackup.CreateKeyBackupDialog');
|
Modal.createTrackedDialogAsync('Key Backup', 'Key Backup',
|
||||||
Modal.createTrackedDialog('Key Backup', 'Key Backup', CreateKeyBackupDialog, {
|
import('../../../async-components/views/dialogs/keybackup/CreateKeyBackupDialog'),
|
||||||
|
{
|
||||||
onFinished: () => {
|
onFinished: () => {
|
||||||
this._loadBackupStatus();
|
this._loadBackupStatus();
|
||||||
},
|
},
|
||||||
});
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
_deleteBackup() {
|
_deleteBackup() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue