Skip to content

Commit f14c2a0

Browse files
author
Luke Barnard
committed
Implement PasswordNagBar
This will tell the user that they need to set a password to return to their account.
1 parent 425719c commit f14c2a0

2 files changed

Lines changed: 50 additions & 3 deletions

File tree

‎src/component-index.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
Copyright 2015, 2016 OpenMarket Ltd
3+
Copyright 2017 Vector Creations Ltd
34
45
Licensed under the Apache License, Version 2.0 (the "License");
56
you may not use this file except in compliance with the License.
@@ -19,9 +20,6 @@ limitations under the License.
1920
* You can edit it you like, but your changes will be overwritten,
2021
* so you'd just be trying to swim upstream like a salmon.
2122
* You are not a salmon.
22-
*
23-
* To update it, run:
24-
* ./reskindex.js -h header
2523
*/
2624

2725
module.exports.components = require('matrix-react-sdk/lib/component-index').components;
@@ -66,6 +64,8 @@ import views$globals$MatrixToolbar from './components/views/globals/MatrixToolba
6664
views$globals$MatrixToolbar && (module.exports.components['views.globals.MatrixToolbar'] = views$globals$MatrixToolbar);
6765
import views$globals$NewVersionBar from './components/views/globals/NewVersionBar';
6866
views$globals$NewVersionBar && (module.exports.components['views.globals.NewVersionBar'] = views$globals$NewVersionBar);
67+
import views$globals$PasswordNagBar from './components/views/globals/PasswordNagBar';
68+
views$globals$PasswordNagBar && (module.exports.components['views.globals.PasswordNagBar'] = views$globals$PasswordNagBar);
6969
import views$login$VectorCustomServerDialog from './components/views/login/VectorCustomServerDialog';
7070
views$login$VectorCustomServerDialog && (module.exports.components['views.login.VectorCustomServerDialog'] = views$login$VectorCustomServerDialog);
7171
import views$login$VectorLoginFooter from './components/views/login/VectorLoginFooter';
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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" src="img/warning.svg" width="24" height="23" alt="/!\"/>
38+
<div className="mx_MatrixToolbar_content">
39+
To be able to return to your account, you need to set a password.
40+
</div>
41+
<button className="mx_MatrixToolbar_action" onClick={this.onUpdateClicked}>
42+
Set Password
43+
</button>
44+
</div>
45+
);
46+
}
47+
});

0 commit comments

Comments
 (0)