diff --git a/res/css/_common.scss b/res/css/_common.scss index 51d985efb7..abc57a95ed 100644 --- a/res/css/_common.scss +++ b/res/css/_common.scss @@ -338,6 +338,14 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus { margin-bottom: 10px; } +.mx_Dialog_titleImage { + vertical-align: middle; + width: 25px; + height: 25px; + margin-left: -2px; + margin-right: 4px; +} + .mx_Dialog_title { font-size: 22px; line-height: 36px; diff --git a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js index d75126687c..a56a1ee905 100644 --- a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js +++ b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js @@ -155,7 +155,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent { } _doBootstrapUIAuth = async (makeRequest) => { - if (this.state.canUploadKeysWithPasswordOnly) { + if (this.state.canUploadKeysWithPasswordOnly && this.state.accountPassword) { await makeRequest({ type: 'm.login.password', identifier: { @@ -664,7 +664,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent { case PHASE_DONE: return _t('Encryption upgraded'); 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 (
diff --git a/src/components/views/dialogs/BaseDialog.js b/src/components/views/dialogs/BaseDialog.js index 19f22a15ad..9238024b60 100644 --- a/src/components/views/dialogs/BaseDialog.js +++ b/src/components/views/dialogs/BaseDialog.js @@ -65,6 +65,9 @@ export default createReactClass({ // Title for the dialog. 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: PropTypes.node, @@ -110,6 +113,13 @@ export default createReactClass({ ); } + let headerImage; + if (this.props.headerImage) { + headerImage = ; + } + return (
+ {headerImage} { this.props.title }
{ this.props.headerButton }