Fixed visibility of top bar's impersonation.
This commit is contained in:
parent
d011571164
commit
d69fc68ec1
@ -5,7 +5,7 @@
|
||||
</button>
|
||||
|
||||
<span>Tom-to-Speech</span>
|
||||
@if (isTTSLoggedIn) {
|
||||
@if (isLoggedIn) {
|
||||
<span class="spacer"></span>
|
||||
<div class="links">
|
||||
@if (showImpersonation) {
|
||||
@ -19,10 +19,12 @@
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@if (isAdminLoggedIn) {
|
||||
<button mat-icon-button
|
||||
(click)="showImpersonation = !showImpersonation">
|
||||
<mat-icon>supervisor_account</mat-icon>
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</mat-toolbar>
|
@ -44,8 +44,12 @@ export class Topbar implements OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
get isTTSLoggedIn() {
|
||||
return this.client.logged_in;
|
||||
get isLoggedIn() {
|
||||
return this.auth.isAuthenticated();
|
||||
}
|
||||
|
||||
get isAdminLoggedIn() {
|
||||
return this.auth.isAuthenticated() && this.auth.isAdmin();
|
||||
}
|
||||
|
||||
get username() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user