Reviewed-on: #20 Co-authored-by: Patrick Müller <mail@pmueller.me> Co-committed-by: Patrick Müller <mail@pmueller.me>
This commit was merged in pull request #20.
This commit is contained in:
@@ -1,27 +1,25 @@
|
||||
<div *ngIf="!isLoggedIn" class="form-container">
|
||||
<p>Please log in:</p>
|
||||
<label for="email">Your @nachklang.art email: </label>
|
||||
<input id="email" type="text" aria-label="Your Email" [(ngModel)]="email"><br>
|
||||
<label for="password">Password: </label>
|
||||
<input id="password" type="password" aria-label="Password" (keyup.enter)="login()" [(ngModel)]="password"><br>
|
||||
<button (click)="login()">Login</button>
|
||||
<br><br>
|
||||
<p>If you dont' have an account yet, please use the following form to register:</p>
|
||||
<label for="name">Your full name: </label>
|
||||
<input id="name" type="text" aria-label="Your Name" [(ngModel)]="name"><br>
|
||||
<label for="registerEmail">Your @nachklang.art email: </label>
|
||||
<input id="registerEmail" type="text" aria-label="Your Email" [(ngModel)]="registerEmail"><br>
|
||||
<label for="registerPassword">Password: </label>
|
||||
<input id="registerPassword" type="password" aria-label="Password" [(ngModel)]="registerPassword"><br>
|
||||
<label for="registerPasswordConfirm">Confirm password: </label>
|
||||
<input id="registerPasswordConfirm" type="password" aria-label="Password" (keyup.enter)="register()" [(ngModel)]="registerPasswordConfirm"><br>
|
||||
<p *ngIf="!checkPasswordPolicy()">Passwords have to use uppercase and lowercase letters, numbers and must have at least 12 characters!</p>
|
||||
<p *ngIf="!checkPasswordsMatch()">Passwords do not match!</p>
|
||||
<button (click)="register()">Register</button>
|
||||
<!--
|
||||
No sign-in form and no registration form: accounts live in the admin app and
|
||||
the session is one cookie shared by all four apps. What is left here is a
|
||||
link to the right place, plus the two states that must not turn into a
|
||||
redirect loop - see `failure` in the component.
|
||||
-->
|
||||
<div *ngIf="!isLoggedIn && failure === null" class="form-container">
|
||||
<p>Signing you in…</p>
|
||||
<button (click)="signIn()">Go to sign-in</button>
|
||||
</div>
|
||||
<div *ngIf="isLoggedIn">
|
||||
<div *ngIf="failure === 'denied'" class="form-container">
|
||||
<p>This account does not have access to the calendar.</p>
|
||||
<p>Ask an administrator to grant it in the admin app, then reload.</p>
|
||||
<button (click)="reload()">Reload</button>
|
||||
<button (click)="logout()">Sign out</button>
|
||||
</div>
|
||||
<div *ngIf="failure === 'unavailable'" class="form-container">
|
||||
<p>The administration service cannot be reached right now.</p>
|
||||
<button (click)="reload()">Reload</button>
|
||||
</div>
|
||||
<div *ngIf="isLoggedIn && failure === null">
|
||||
<span>Logged in as {{getUserName()}}</span>
|
||||
<span *ngIf="checkUserInactive()"> (inactive)</span>
|
||||
<span> </span>
|
||||
<button (click)="logout()">Logout</button>
|
||||
<span> | </span>
|
||||
|
||||
Reference in New Issue
Block a user