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