Add private key user info to settings page.

This commit is contained in:
Spencer Ofwiti 2021-05-18 10:33:38 +03:00
parent 51f4f052c7
commit 506be2eb5b
3 changed files with 10 additions and 3 deletions

View File

@ -211,4 +211,8 @@ export class AuthService {
getPrivateKey(): any {
return this.mutableKeyStore.getPrivateKey();
}
getPrivateKeyInfo(): any {
return this.getPrivateKey().users[0].userId;
}
}

View File

@ -23,9 +23,10 @@
SETTINGS
</mat-card-title>
<div class="card-body">
<h4>Kobo Toolbox Credentials</h4>
<span><strong>Username: </strong> admin_reserve </span><br>
<span><strong>Password: </strong> ******** </span>
<h4>CICADA Admin Credentials</h4>
<span><strong>UserId: </strong> {{ userInfo.userid }} </span><br>
<span><strong>Username: </strong> {{ userInfo.name }} </span><br>
<span><strong>Email: </strong> {{ userInfo.email }} </span>
</div>
<hr>
<div class="card-body">

View File

@ -17,6 +17,7 @@ export class SettingsComponent implements OnInit {
dataSource: MatTableDataSource<any>;
displayedColumns: Array<string> = ['name', 'email', 'userId'];
trustedUsers: Array<Staff>;
userInfo: Staff;
@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;
@ -30,6 +31,7 @@ export class SettingsComponent implements OnInit {
this.dataSource = new MatTableDataSource<any>(this.trustedUsers);
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
this.userInfo = this.authService.getPrivateKeyInfo();
}
doFilter(value: string): void {