login.component.html 924 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
	<form *ngIf="idps"
			(ngSubmit)="userService.login(selectedIdP)" #loginForm="ngForm">
		<mat-form-field>
			<mat-select name="idp" required [(ngModel)]="selectedIdP">
6
				<mat-option *ngFor="let idp of idps" [value]="idp">
Lukas Burgey's avatar
Lukas Burgey committed
7
8
9
10
11
12
					{{ 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">
Lukas Burgey's avatar
Lukas Burgey committed
15
16
17
	<button mat-button mat-icon-button (click)="dialog.openAccount()">
		<mat-icon>settings</mat-icon>
	</button>
18
	<button mat-button mat-icon-button (click)="dialog.openSshKeys()">
Lukas Burgey's avatar
Lukas Burgey committed
19
20
		<mat-icon>vpn_key</mat-icon>
	</button>
21
	<button mat-button (click)="dialog.openProfile()">
22
		{{ userService.user?.email }}
Lukas Burgey's avatar
Lukas Burgey committed
23
24
25
	</button>
	<button mat-raised-button color="accent" (click)="userService.logout()">Logout</button>
</span>