|
| 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