Oops, the tf-auth lit was all wrong.
This commit is contained in:
parent
95d3090b9b
commit
c8b8a8fc03
@ -19,8 +19,11 @@
|
|||||||
Object.assign(app, g_data);
|
Object.assign(app, g_data);
|
||||||
|
|
||||||
class TfAuthElement extends LitElement {
|
class TfAuthElement extends LitElement {
|
||||||
static get_properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
|
code_of_conduct: {type: String},
|
||||||
|
error: {type: String},
|
||||||
|
have_administrator: {type: Boolean},
|
||||||
name: {type: String},
|
name: {type: String},
|
||||||
tab: {type: String},
|
tab: {type: String},
|
||||||
};
|
};
|
||||||
@ -31,11 +34,6 @@
|
|||||||
this.tab = 'login';
|
this.tab = 'login';
|
||||||
}
|
}
|
||||||
|
|
||||||
tab_changed(name) {
|
|
||||||
this.tab = name;
|
|
||||||
this.requestUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let self = this;
|
let self = this;
|
||||||
return html`
|
return html`
|
||||||
@ -83,16 +81,16 @@
|
|||||||
<h1 ?hidden=${this.name === undefined}>Welcome, ${this.name}.</h1>
|
<h1 ?hidden=${this.name === undefined}>Welcome, ${this.name}.</h1>
|
||||||
|
|
||||||
<div style="display: flex; flex-direction: row; width: 100%">
|
<div style="display: flex; flex-direction: row; width: 100%">
|
||||||
<input type="radio" name="tab" id="login" value="Login" ?checked=${this.tab == 'login'} @change=${() => self.tab_changed('login')}></input>
|
<input type="radio" name="tab" id="login" value="Login" ?checked=${this.tab == 'login'} @change=${() => self.tab = 'login'}></input>
|
||||||
<label for="login" id="login_label">Login</label>
|
<label for="login" id="login_label">Login</label>
|
||||||
|
|
||||||
<input type="radio" name="tab" id="register" value="Register" ?checked=${this.tab == 'register'} @change=${() => self.tab_changed('register')}></input>
|
<input type="radio" name="tab" id="register" value="Register" ?checked=${this.tab == 'register'} @change=${() => self.tab = 'register'}></input>
|
||||||
<label for="register" id="register_label">Register</label>
|
<label for="register" id="register_label">Register</label>
|
||||||
|
|
||||||
<input type="radio" name="tab" id="guest" value="Guest" ?checked=${this.tab == 'guest'} @change=${() => self.tab_changed('guest')}></input>
|
<input type="radio" name="tab" id="guest" value="Guest" ?checked=${this.tab == 'guest'} @change=${() => self.tab = 'guest'}></input>
|
||||||
<label for="guest" id="guest_label">Guest</label>
|
<label for="guest" id="guest_label">Guest</label>
|
||||||
|
|
||||||
<input type="radio" name="tab" id="change" value="Change Password" ?checked=${this.tab == 'change'} @change=${() => self.tab_changed('change')}></input>
|
<input type="radio" name="tab" id="change" value="Change Password" ?checked=${this.tab == 'change'} @change=${() => self.tab = 'change'}></input>
|
||||||
<label for="change" id="change_label">Change Password</label>
|
<label for="change" id="change_label">Change Password</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user