Wire up popup to the "What does this mean?" link

This commit is contained in:
David Baker 2015-08-05 11:37:52 +01:00
parent cdbbf4bfef
commit 68d408bfff

View file

@ -17,6 +17,10 @@ limitations under the License.
'use strict'; 'use strict';
var React = require('react'); var React = require('react');
var Modal = require('../../../../src/Modal');
var ComponentBroker = require('../../../../src/ComponentBroker');
var ErrorDialog = ComponentBroker.get('organisms/ErrorDialog');
var ServerConfigController = require("../../../../src/controllers/molecules/ServerConfig"); var ServerConfigController = require("../../../../src/controllers/molecules/ServerConfig");
@ -24,6 +28,15 @@ module.exports = React.createClass({
displayName: 'ServerConfig', displayName: 'ServerConfig',
mixins: [ServerConfigController], mixins: [ServerConfigController],
showHelpPopup: function() {
Modal.createDialog(ErrorDialog, {
title: 'Custom Server Options',
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.",
button: "Dismiss",
focus: true
});
},
render: function() { render: function() {
return ( return (
<div className="mx_ServerConfig"> <div className="mx_ServerConfig">
@ -31,7 +44,7 @@ module.exports = React.createClass({
<input className="mx_Login_field" id="hsurl" type="text" value={this.state.hs_url} onChange={this.hsChanged} /> <input className="mx_Login_field" id="hsurl" type="text" value={this.state.hs_url} onChange={this.hsChanged} />
<label className="mx_Login_label mx_ServerConfig_islabel" htmlFor="isurl">Identity server URL</label> <label className="mx_Login_label mx_ServerConfig_islabel" htmlFor="isurl">Identity server URL</label>
<input className="mx_Login_field" type="text" value={this.state.is_url} onChange={this.isChanged} /> <input className="mx_Login_field" type="text" value={this.state.is_url} onChange={this.isChanged} />
<a className="mx_ServerConfig_help" href="#">What does this mean?</a> <a className="mx_ServerConfig_help" href="#" onClick={this.showHelpPopup}>What does this mean?</a>
</div> </div>
); );
} }