mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
Hide server URL input if set in config or query
Closes: https://todo.sr.ht/~emersion/gamja/52
This commit is contained in:
parent
04932317f6
commit
8c02cdc094
1 changed files with 12 additions and 5 deletions
|
@ -74,6 +74,17 @@ export default class ConnectForm extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
var serverURL = null;
|
||||
if (!this.props.params || !this.props.params.url) {
|
||||
serverURL = html`
|
||||
<label>
|
||||
Server URL:<br/>
|
||||
<input type="text" name="url" value=${this.state.url} disabled=${this.props.disabled} inputmode="url"/>
|
||||
</label>
|
||||
<br/><br/>
|
||||
`;
|
||||
}
|
||||
|
||||
return html`
|
||||
<form onChange=${this.handleChange} onSubmit=${this.handleSubmit}>
|
||||
<h2>Connect to IRC</h2>
|
||||
|
@ -101,11 +112,7 @@ export default class ConnectForm extends Component {
|
|||
|
||||
<br/>
|
||||
|
||||
<label>
|
||||
Server URL:<br/>
|
||||
<input type="text" name="url" value=${this.state.url} disabled=${this.props.disabled} inputmode="url"/>
|
||||
</label>
|
||||
<br/><br/>
|
||||
${serverURL}
|
||||
|
||||
<label>
|
||||
Username:<br/>
|
||||
|
|
Loading…
Reference in a new issue