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