Skip to content

Commit 68d408b

Browse files
committed
Wire up popup to the "What does this mean?" link
1 parent cdbbf4b commit 68d408b

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

‎skins/base/views/molecules/ServerConfig.js‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,34 @@ limitations under the License.
1717
'use strict';
1818

1919
var React = require('react');
20+
var Modal = require('../../../../src/Modal');
21+
var ComponentBroker = require('../../../../src/ComponentBroker');
22+
23+
var ErrorDialog = ComponentBroker.get('organisms/ErrorDialog');
2024

2125
var ServerConfigController = require("../../../../src/controllers/molecules/ServerConfig");
2226

2327
module.exports = React.createClass({
2428
displayName: 'ServerConfig',
2529
mixins: [ServerConfigController],
2630

31+
showHelpPopup: function() {
32+
Modal.createDialog(ErrorDialog, {
33+
title: 'Custom Server Options',
34+
description: "You can use the custom server options to log into other Matrix servers by specifying a different Home server URL. This allows you to use Vector with an existing Matrix account on a different Home server. You can also set a cutom Identity server but this will affect people ability to find you if you use a server in a group other than tha main Matrix.org group.",
35+
button: "Dismiss",
36+
focus: true
37+
});
38+
},
39+
2740
render: function() {
2841
return (
2942
<div className="mx_ServerConfig">
3043
<label className="mx_Login_label mx_ServerConfig_hslabel" htmlFor="hsurl">Home server URL</label>
3144
<input className="mx_Login_field" id="hsurl" type="text" value={this.state.hs_url} onChange={this.hsChanged} />
3245
<label className="mx_Login_label mx_ServerConfig_islabel" htmlFor="isurl">Identity server URL</label>
3346
<input className="mx_Login_field" type="text" value={this.state.is_url} onChange={this.isChanged} />
34-
<a className="mx_ServerConfig_help" href="#">What does this mean?</a>
47+
<a className="mx_ServerConfig_help" href="#" onClick={this.showHelpPopup}>What does this mean?</a>
3548
</div>
3649
);
3750
}

0 commit comments

Comments
 (0)