Oops, the tf-auth lit was all wrong.

This commit is contained in:
Cory McWilliams 2024-04-13 10:28:35 -04:00
parent 95d3090b9b
commit c8b8a8fc03

View File

@ -19,8 +19,11 @@
Object.assign(app, g_data);
class TfAuthElement extends LitElement {
static get_properties() {
static get properties() {
return {
code_of_conduct: {type: String},
error: {type: String},
have_administrator: {type: Boolean},
name: {type: String},
tab: {type: String},
};
@ -31,11 +34,6 @@
this.tab = 'login';
}
tab_changed(name) {
this.tab = name;
this.requestUpdate();
}
render() {
let self = this;
return html`
@ -83,16 +81,16 @@
<h1 ?hidden=${this.name === undefined}>Welcome, ${this.name}.</h1>
<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>
<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>
<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>
<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>
</div>