login.component.html 819 Bytes
Newer Older
Lukas Burgey's avatar
Lukas Burgey committed
1
<span *ngIf="userService.loggedIn ? false : true">
Lukas Burgey's avatar
Lukas Burgey committed
2
3
4
5
6
7
8
9
10
11
12
	<form *ngIf="idps"
			(ngSubmit)="userService.login(selectedIdP)" #loginForm="ngForm">
		<mat-form-field>
			<mat-select name="idp" required [(ngModel)]="selectedIdP">
				<mat-option *ngFor="let idp of idps" [value]="idp.id">
					{{ idp.name }}
				</mat-option>
			</mat-select>
		</mat-form-field>
		<button mat-raised-button [disabled]="!loginForm.form.valid" color="accent" type="submit">Login</button>
	</form>
Lukas Burgey's avatar
Lukas Burgey committed
13
14
</span>
<span *ngIf="userService.loggedIn">
15
	<button mat-button mat-icon-button (click)="dialog.openSshKeys()">
Lukas Burgey's avatar
Lukas Burgey committed
16
17
		<mat-icon>vpn_key</mat-icon>
	</button>
18
	<button mat-button (click)="dialog.openProfile()">
Lukas Burgey's avatar
Lukas Burgey committed
19
20
21
22
		{{ userService.user?.username }}
	</button>
	<button mat-raised-button color="accent" (click)="userService.logout()">Logout</button>
</span>