Skip to content

Commit d5d29c1

Browse files
author
Luke Barnard
committed
Give _t to PasswordNagBar, add CSS for UserSettings password warning
Codep matrix-org/matrix-react-sdk#1123
1 parent 7fda26f commit d5d29c1

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

‎src/components/views/globals/PasswordNagBar.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import React from 'react';
2020
import sdk from 'matrix-react-sdk';
2121
import Modal from 'matrix-react-sdk/lib/Modal';
2222
import dis from 'matrix-react-sdk/lib/dispatcher';
23+
import { _t } from 'matrix-react-sdk/lib/languageHandler';
2324

2425
export default React.createClass({
2526
onUpdateClicked: function() {
@@ -33,12 +34,11 @@ export default React.createClass({
3334
dis.dispatch({
3435
action: 'password_changed',
3536
});
36-
}
37+
},
3738
});
3839
},
3940

4041
render: function() {
41-
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
4242
const toolbarClasses = "mx_MatrixToolbar mx_MatrixToolbar_clickable";
4343
return (
4444
<div className={toolbarClasses} onClick={this.onUpdateClicked}>
@@ -49,12 +49,12 @@ export default React.createClass({
4949
alt="Warning"
5050
/>
5151
<div className="mx_MatrixToolbar_content">
52-
To return to your account in future you need to <u>set a password</u>
52+
{ _t("To return to your account in future you need to <u>set a password</u>") }
5353
</div>
5454
<button className="mx_MatrixToolbar_action">
55-
Set Password
55+
{ _t("Set Password") }
5656
</button>
5757
</div>
5858
);
59-
}
59+
},
6060
});

‎src/skins/vector/css/matrix-react-sdk/structures/_UserSettings.scss‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,19 @@ limitations under the License.
102102
padding-right: 1em;
103103
}
104104

105+
.mx_UserSettings_passwordWarning {
106+
padding: 6px;
107+
background-color: #76cfa6;
108+
border-radius: 3px;
109+
color: #fff;
110+
margin-bottom: 5px;
111+
}
112+
113+
.mx_UserSettings_passwordWarning_icon {
114+
vertical-align: -6px;
115+
margin-right: 3px;
116+
}
117+
105118
.mx_UserSettings_importExportButtons {
106119
padding-top: 10px;
107120
padding-left: 40px;

0 commit comments

Comments
 (0)