Add cancel button to error stage

pull/21833/head
David Baker 2018-10-26 17:55:59 +01:00
parent b59b8b7fca
commit de366fa0e8
1 changed files with 6 additions and 3 deletions

View File

@ -181,12 +181,15 @@ export default React.createClass({
let content;
if (this.state.error) {
const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
content = <div>
<p>{_t("Unable to create key backup")}</p>
<div className="mx_Dialog_buttons">
<button onClick={this._createBackup}>
{_t("Retry")}
</button>
<DialogButtons primaryButton={_t('Retry')}
onPrimaryButtonClick={this._createBackup}
hasCancel={true}
onCancel={this._onCancel}
/>
</div>
</div>;
} else {