Skip to content

Commit 1b78737

Browse files
authored
Merge pull request element-hq#3817 from vector-im/luke/password-nag-bar
Implement PasswordNagBar
2 parents 425719c + 5766a6e commit 1b78737

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

‎src/component-index.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ import views$globals$MatrixToolbar from './components/views/globals/MatrixToolba
6666
views$globals$MatrixToolbar && (module.exports.components['views.globals.MatrixToolbar'] = views$globals$MatrixToolbar);
6767
import views$globals$NewVersionBar from './components/views/globals/NewVersionBar';
6868
views$globals$NewVersionBar && (module.exports.components['views.globals.NewVersionBar'] = views$globals$NewVersionBar);
69+
import views$globals$PasswordNagBar from './components/views/globals/PasswordNagBar';
70+
views$globals$PasswordNagBar && (module.exports.components['views.globals.PasswordNagBar'] = views$globals$PasswordNagBar);
6971
import views$login$VectorCustomServerDialog from './components/views/login/VectorCustomServerDialog';
7072
views$login$VectorCustomServerDialog && (module.exports.components['views.login.VectorCustomServerDialog'] = views$login$VectorCustomServerDialog);
7173
import views$login$VectorLoginFooter from './components/views/login/VectorLoginFooter';
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
Copyright 2017 Vector Creations Ltd
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
'use strict';
18+
19+
import React from 'react';
20+
import sdk from 'matrix-react-sdk';
21+
import Modal from 'matrix-react-sdk/lib/Modal';
22+
23+
export default React.createClass({
24+
onUpdateClicked: function() {
25+
// TODO: Implement dialog to set password
26+
// const SetPasswordDialog = sdk.getComponent('dialogs.SetPasswordDialog');
27+
// Modal.createDialog(SetPasswordDialog, {
28+
// onFinished: () => {
29+
// }
30+
// });
31+
},
32+
33+
render: function() {
34+
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
35+
return (
36+
<div className="mx_MatrixToolbar">
37+
<img className="mx_MatrixToolbar_warning"
38+
src="img/warning.svg"
39+
width="24"
40+
height="23"
41+
alt="Warning"
42+
/>
43+
<div className="mx_MatrixToolbar_content">
44+
To be able to return to your account, you need to set a password.
45+
</div>
46+
<button className="mx_MatrixToolbar_action" onClick={this.onUpdateClicked}>
47+
Set Password
48+
</button>
49+
</div>
50+
);
51+
}
52+
});

0 commit comments

Comments
 (0)