perf: Spostata funzione onclick

This commit is contained in:
Maicol Battistini 2021-12-14 10:44:10 +01:00
parent 70a21a8748
commit 3020cf0293
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A
1 changed files with 9 additions and 5 deletions

View File

@ -37,7 +37,15 @@ export default class LoginPage extends Page {
<mwc-formfield label={__('Ricordami')} style="display: block;">
<mwc-checkbox id="remember" name="remember"/>
</mwc-formfield>
<LoadingButton type="submit" raised id="login-button" label={__('Accedi')} icon="login-variant" style="float: right;"/>
<LoadingButton
type="submit"
raised
id="login-button"
label={__('Accedi')}
icon="login-variant"
style="float: right;"
onclick={this.onLoginButtonClicked.bind(this)}
/>
<mwc-button dense label="Password dimenticata" style="margin-top: 16px;">
<Mdi icon="lock-question" slot="icon"/>
</mwc-button>
@ -50,10 +58,6 @@ export default class LoginPage extends Page {
super.oncreate(vnode);
this.loading = $(this.element).find('#login-button mwc-circular-progress');
$(this.element)
.find('#login-button')
.on('click', this.onLoginButtonClicked.bind(this));
}
async onLoginButtonClicked(event: PointerEvent) {