DisableEventIndexDialog: Use the DialogButtons element for the buttons.
This commit is contained in:
parent
72a58d0c2c
commit
cba7764784
1 changed files with 11 additions and 10 deletions
|
@ -53,7 +53,8 @@ export default class DisableEventIndexDialog extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
|
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
|
||||||
const InlineSpinner = sdk.getComponent('elements.InlineSpinner');
|
const Spinner = sdk.getComponent('elements.Spinner');
|
||||||
|
const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseDialog className='mx_ManageEventIndexDialog'
|
<BaseDialog className='mx_ManageEventIndexDialog'
|
||||||
|
@ -61,15 +62,15 @@ export default class DisableEventIndexDialog extends React.Component {
|
||||||
title={_t("Are you sure?")}
|
title={_t("Are you sure?")}
|
||||||
>
|
>
|
||||||
{_t("If disabled, messages from encrypted rooms won't appear in search results.")}
|
{_t("If disabled, messages from encrypted rooms won't appear in search results.")}
|
||||||
<div className="mx_Dialog_buttons">
|
{this.state.disabling ? <InlineSpinner /> : <div />}
|
||||||
<AccessibleButton kind="secondary" onClick={this.props.onFinished}>
|
<DialogButtons
|
||||||
{_t("Cancel")}
|
primaryButton={_t('Disable')}
|
||||||
</AccessibleButton>
|
onPrimaryButtonClick={this._onDisable}
|
||||||
<AccessibleButton kind="danger" disabled={this.state.disabling} onClick={this._onDisable}>
|
primaryButtonClass="danger"
|
||||||
{_t("Disable")}
|
onCancel={this.props.onFinished}
|
||||||
</AccessibleButton>
|
disabled={this.state.disabling}
|
||||||
{this.state.enabling ? <InlineSpinner /> : <div />}
|
>
|
||||||
</div>
|
</DialogButtons>
|
||||||
</BaseDialog>
|
</BaseDialog>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue