Add icon to bootstrap dialogs
This commit is contained in:
parent
644d68d836
commit
e98269822c
3 changed files with 27 additions and 2 deletions
|
@ -338,6 +338,14 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_Dialog_titleImage {
|
||||||
|
vertical-align: middle;
|
||||||
|
width: 25px;
|
||||||
|
height: 25px;
|
||||||
|
margin-left: -2px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_Dialog_title {
|
.mx_Dialog_title {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
|
|
|
@ -155,7 +155,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
_doBootstrapUIAuth = async (makeRequest) => {
|
_doBootstrapUIAuth = async (makeRequest) => {
|
||||||
if (this.state.canUploadKeysWithPasswordOnly) {
|
if (this.state.canUploadKeysWithPasswordOnly && this.state.accountPassword) {
|
||||||
await makeRequest({
|
await makeRequest({
|
||||||
type: 'm.login.password',
|
type: 'm.login.password',
|
||||||
identifier: {
|
identifier: {
|
||||||
|
@ -664,7 +664,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
||||||
case PHASE_DONE:
|
case PHASE_DONE:
|
||||||
return _t('Encryption upgraded');
|
return _t('Encryption upgraded');
|
||||||
default:
|
default:
|
||||||
return null;
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -719,10 +719,16 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let headerImage;
|
||||||
|
if (this._titleForPhase(this.state.phase)) {
|
||||||
|
headerImage = require("../../../../../res/img/e2e/normal.svg");
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseDialog className='mx_CreateSecretStorageDialog'
|
<BaseDialog className='mx_CreateSecretStorageDialog'
|
||||||
onFinished={this.props.onFinished}
|
onFinished={this.props.onFinished}
|
||||||
title={this._titleForPhase(this.state.phase)}
|
title={this._titleForPhase(this.state.phase)}
|
||||||
|
headerImage={headerImage}
|
||||||
hasCancel={[PHASE_PASSPHRASE].includes(this.state.phase)}
|
hasCancel={[PHASE_PASSPHRASE].includes(this.state.phase)}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -65,6 +65,9 @@ export default createReactClass({
|
||||||
// Title for the dialog.
|
// Title for the dialog.
|
||||||
title: PropTypes.node.isRequired,
|
title: PropTypes.node.isRequired,
|
||||||
|
|
||||||
|
// Path to an icon to put in the header
|
||||||
|
headerImage: PropTypes.string,
|
||||||
|
|
||||||
// children should be the content of the dialog
|
// children should be the content of the dialog
|
||||||
children: PropTypes.node,
|
children: PropTypes.node,
|
||||||
|
|
||||||
|
@ -110,6 +113,13 @@ export default createReactClass({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let headerImage;
|
||||||
|
if (this.props.headerImage) {
|
||||||
|
headerImage = <img className="mx_Dialog_titleImage" src={this.props.headerImage}
|
||||||
|
alt=""
|
||||||
|
/>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MatrixClientContext.Provider value={this._matrixClient}>
|
<MatrixClientContext.Provider value={this._matrixClient}>
|
||||||
<FocusLock
|
<FocusLock
|
||||||
|
@ -135,6 +145,7 @@ export default createReactClass({
|
||||||
'mx_Dialog_headerWithButton': !!this.props.headerButton,
|
'mx_Dialog_headerWithButton': !!this.props.headerButton,
|
||||||
})}>
|
})}>
|
||||||
<div className={classNames('mx_Dialog_title', this.props.titleClass)} id='mx_BaseDialog_title'>
|
<div className={classNames('mx_Dialog_title', this.props.titleClass)} id='mx_BaseDialog_title'>
|
||||||
|
{headerImage}
|
||||||
{ this.props.title }
|
{ this.props.title }
|
||||||
</div>
|
</div>
|
||||||
{ this.props.headerButton }
|
{ this.props.headerButton }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue