Skip to content

Commit

Permalink
feat: adds admin flag to user name in UI (#59)
Browse files Browse the repository at this point in the history
lgtm, close #58
  • Loading branch information
mshodge authored Dec 13, 2024
1 parent 777de16 commit 51564e7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion web-ui/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<ng-container *ngIf="!loading && this.user; else loader">
<ml-header [name]="user.display_name"></ml-header>
<ml-header
[name]="user.display_name"
[admin]="user.is_admin">
</ml-header>
<div class="container">
<div class="my-3">
<xng-breadcrumb></xng-breadcrumb>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
</button>
<span class="spacer"></span>

<span class="pe-1 ms-auto fs-16">Hello, {{name}}</span>
<span class="pe-1 ms-auto fs-16">
Hello, {{name}}
<ng-container *ngIf="admin">(Admin)</ng-container>
</span>
<button mat-button (click)="logout()">
<mat-icon>exit_to_app</mat-icon>
<span>Logout</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Component, Input, OnInit } from '@angular/core';
})
export class HeaderComponent implements OnInit {
@Input() name: string = '';
@Input() admin: boolean = false;

constructor() { }

Expand Down

0 comments on commit 51564e7

Please sign in to comment.