Generated project
This commit is contained in:
40
frontend/views/login/login-view.ts
Normal file
40
frontend/views/login/login-view.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import '@vaadin/vaadin-login';
|
||||
import { LoginI18n } from '@vaadin/vaadin-login';
|
||||
import { html } from 'lit';
|
||||
import { customElement, state } from 'lit/decorators';
|
||||
import { View } from '../../views/view';
|
||||
|
||||
const loginI18nDefault: LoginI18n = {
|
||||
form: {
|
||||
title: 'Log in',
|
||||
username: 'Username',
|
||||
password: 'Password',
|
||||
submit: 'Log in',
|
||||
forgotPassword: 'Forgot password',
|
||||
},
|
||||
errorMessage: {
|
||||
title: 'Incorrect username or password',
|
||||
message: 'Check that you have entered the correct username and password and try again.',
|
||||
},
|
||||
};
|
||||
@customElement('login-view')
|
||||
export class LoginView extends View {
|
||||
@state()
|
||||
private error = false;
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<vaadin-login-overlay
|
||||
opened
|
||||
.error=${this.error}
|
||||
action="login"
|
||||
no-forgot-password
|
||||
.i18n=${Object.assign(
|
||||
{ header: { title: 'Fusion Management', description: 'Login using user/user or admin/admin' } },
|
||||
loginI18nDefault
|
||||
)}
|
||||
>
|
||||
</vaadin-login-overlay>
|
||||
`;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user