Implement client connect form defaults
This commit is contained in:
parent
a9031eb532
commit
2ccca3a778
9 changed files with 127 additions and 57 deletions
|
@ -156,11 +156,11 @@ i[class^="icon-"]:before, i[class*=" icon-"]:before {
|
|||
.connect {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.connect .navicon, .settings .navicon {
|
||||
|
@ -169,6 +169,12 @@ i[class^="icon-"]:before, i[class*=" icon-"]:before {
|
|||
left: 0;
|
||||
}
|
||||
|
||||
.connect-form {
|
||||
margin: auto 0;
|
||||
padding-top: 20px;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.connect-form h1 {
|
||||
margin-bottom: 15px;
|
||||
text-align: center;
|
||||
|
@ -177,17 +183,19 @@ i[class^="icon-"]:before, i[class*=" icon-"]:before {
|
|||
.connect-form input {
|
||||
display: block;
|
||||
margin: 5px 0px;
|
||||
padding: 10px;
|
||||
padding: 15px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.connect-form input[type="submit"],
|
||||
.connect-form input[type="text"] {
|
||||
width: 200px;
|
||||
.connect-form input[type="text"],
|
||||
.connect-form input[type="password"] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.connect-form input[type="submit"] {
|
||||
height: 50px;
|
||||
margin-bottom: 20px;
|
||||
font-family: Montserrat, sans-serif;
|
||||
background: #6BB758;
|
||||
color: #FFF;
|
||||
|
@ -569,4 +577,10 @@ i[class^="icon-"]:before, i[class*=" icon-"]:before {
|
|||
.search {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.connect-form {
|
||||
width: 100%;
|
||||
margin: auto 50px;
|
||||
max-width: 400px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,13 +51,19 @@ class Connect extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const defaults = window.__ENV__.defaults;
|
||||
let optionals = null;
|
||||
|
||||
if (this.state.showOptionals) {
|
||||
optionals = (
|
||||
<div>
|
||||
<input name="username" type="text" placeholder="Username" />
|
||||
<input name="password" type="text" placeholder="Password" />
|
||||
<input
|
||||
name="password"
|
||||
type="password"
|
||||
placeholder="Password"
|
||||
defaultValue={defaults.password}
|
||||
/>
|
||||
<input name="realname" type="text" placeholder="Realname" />
|
||||
</div>
|
||||
);
|
||||
|
@ -68,13 +74,18 @@ class Connect extends Component {
|
|||
<Navicon />
|
||||
<form ref="form" className="connect-form" onSubmit={this.handleSubmit}>
|
||||
<h1>Connect</h1>
|
||||
<input name="name" type="text" placeholder="Name" defaultValue="Freenode" />
|
||||
<input name="address" type="text" placeholder="Address" defaultValue="irc.freenode.net" />
|
||||
<input name="name" type="text" placeholder="Name" defaultValue={defaults.name} />
|
||||
<input name="address" type="text" placeholder="Address" defaultValue={defaults.address} />
|
||||
<input name="nick" type="text" placeholder="Nick" />
|
||||
<input name="channels" type="text" placeholder="Channels" />
|
||||
<input
|
||||
name="channels"
|
||||
type="text"
|
||||
placeholder="Channels"
|
||||
defaultValue={defaults.channels ? defaults.channels.join(',') : null}
|
||||
/>
|
||||
{optionals}
|
||||
<p>
|
||||
<label><input name="ssl" type="checkbox" />SSL</label>
|
||||
<label><input name="ssl" type="checkbox" defaultChecked={defaults.ssl} />SSL</label>
|
||||
<i className="icon-ellipsis" onClick={this.handleShowClick}></i>
|
||||
</p>
|
||||
<input type="submit" value="Connect" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue