Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give _t to PasswordNagBar, add CSS for UserSettings password warning #4366

Merged
merged 2 commits into from
Jun 20, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Give _t to PasswordNagBar, add CSS for UserSettings password warning
Luke Barnard committed Jun 20, 2017
commit d5d29c1c929c0e199b52c01b26cb69cfe2e30199
10 changes: 5 additions & 5 deletions src/components/views/globals/PasswordNagBar.js
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ import React from 'react';
import sdk from 'matrix-react-sdk';
import Modal from 'matrix-react-sdk/lib/Modal';
import dis from 'matrix-react-sdk/lib/dispatcher';
import { _t } from 'matrix-react-sdk/lib/languageHandler';

export default React.createClass({
onUpdateClicked: function() {
@@ -33,12 +34,11 @@ export default React.createClass({
dis.dispatch({
action: 'password_changed',
});
}
},
});
},

render: function() {
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
const toolbarClasses = "mx_MatrixToolbar mx_MatrixToolbar_clickable";
return (
<div className={toolbarClasses} onClick={this.onUpdateClicked}>
@@ -49,12 +49,12 @@ export default React.createClass({
alt="Warning"
/>
<div className="mx_MatrixToolbar_content">
To return to your account in future you need to <u>set a password</u>
{ _t("To return to your account in future you need to <u>set a password</u>") }
</div>
<button className="mx_MatrixToolbar_action">
Set Password
{ _t("Set Password") }
</button>
</div>
);
}
},
});
Original file line number Diff line number Diff line change
@@ -102,6 +102,19 @@ limitations under the License.
padding-right: 1em;
}

.mx_UserSettings_passwordWarning {
padding: 6px;
background-color: #76cfa6;
border-radius: 3px;
color: #fff;
margin-bottom: 5px;
}

.mx_UserSettings_passwordWarning_icon {
vertical-align: -6px;
margin-right: 3px;
}

.mx_UserSettings_importExportButtons {
padding-top: 10px;
padding-left: 40px;