Commit b7fcc664 authored by Lukas Burgey's avatar Lukas Burgey

Add user info link to account dialog

parent d61c0cbf
<div *ngIf="(userService.subscribeSpecific(userService.userSelector) | async) as user" class="mat-typography" style="margin-bottom: 50px;">
<h2>User Info</h2>
<p>
You can inspect the user information we received about you.
</p>
<button mat-raised-button mat-dialog-close color="primary" (click)="openProfile(user)">
Show User Info
</button>
</div>
<div class="mat-typography" style="margin-bottom: 50px;">
<h2>Key Management</h2>
<div style="margin-bottom: 15px;">
......
import { Component, OnInit } from '@angular/core';
import { DataSource } from '@angular/cdk/collections';
import { MatDialog } from '@angular/material/dialog';
import { UserService } from '../../user.service';
import { ProfileComponent } from '../profile/profile.component';
import { SSHKey, NewSSHKey } from '../../types/types.module';
import { SSHKeysDataSource } from './sshkeys-data-source';
......@@ -27,6 +30,7 @@ export class AccountComponent implements OnInit {
constructor(
public userService: UserService,
public dialog: MatDialog,
) {
this.resetKeyUpload();
}
......@@ -35,6 +39,17 @@ export class AccountComponent implements OnInit {
this.sshKeyTable = new SSHKeysDataSource(this.userService);
}
public openProfile(user) {
this.dialog.open(
ProfileComponent,
{
data: {
user: user,
}
}
);
}
resetKeyUpload() {
this.upload = false;
this.formKey = {
......
<div class="mat-typography">
<h3>User Info</h3>
<h2>User Info</h2>
<mat-table [dataSource]="dataSource()">
<ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef>Name</mat-header-cell>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment