This commit is contained in:
+23
-18
@@ -224,24 +224,29 @@
|
|||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@if (hasStatsAccess) {
|
@if (userService.userState$ | async; as statsUserState) {
|
||||||
<li>
|
@if (statsUserState.user?.permissions?.canAccessLibraryStats || statsUserState.user?.permissions?.admin) {
|
||||||
<button
|
<li>
|
||||||
class="mobile-menu-item"
|
<button
|
||||||
(click)="shouldShowStatsMenu ? statsMenuMobile.toggle($event) : handleStatsButtonClick($event)"
|
class="mobile-menu-item"
|
||||||
>
|
(click)="navigateToStats(); mobileMenu.hide()"
|
||||||
<svg class="multi-color-chart-icon" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
>
|
||||||
<rect x="1" y="13" width="2.5" height="6" rx="0.5" fill="#ef4444"/>
|
<i class="pi pi-chart-line topbar-icon"></i>
|
||||||
<rect x="5" y="10" width="2.5" height="9" rx="0.5" fill="#f59e0b"/>
|
{{ t('libraryStats') }}
|
||||||
<rect x="9" y="6" width="2.5" height="13" rx="0.5" fill="#10b981"/>
|
</button>
|
||||||
<rect x="13" y="8" width="2.5" height="11" rx="0.5" fill="#3b82f6"/>
|
</li>
|
||||||
</svg>
|
}
|
||||||
{{ t('charts') }}
|
@if (statsUserState.user?.permissions?.canAccessUserStats || statsUserState.user?.permissions?.admin) {
|
||||||
</button>
|
<li>
|
||||||
@if (shouldShowStatsMenu) {
|
<button
|
||||||
<p-menu #statsMenuMobile [model]="statsMenuItems" [popup]="true"/>
|
class="mobile-menu-item"
|
||||||
}
|
(click)="navigateToUserStats(); mobileMenu.hide()"
|
||||||
</li>
|
>
|
||||||
|
<i class="pi pi-users topbar-icon"></i>
|
||||||
|
{{ t('readingStats') }}
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@if (userService.userState$ | async; as userState) {
|
@if (userService.userState$ | async; as userState) {
|
||||||
@if (userState.user?.permissions?.canManageLibrary || userState.user?.permissions?.admin) {
|
@if (userState.user?.permissions?.canManageLibrary || userState.user?.permissions?.admin) {
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ export class AppTopBarComponent implements OnDestroy {
|
|||||||
@ViewChild('topbarmenubutton') topbarMenuButton!: ElementRef;
|
@ViewChild('topbarmenubutton') topbarMenuButton!: ElementRef;
|
||||||
@ViewChild('topbarmenu') menu!: ElementRef;
|
@ViewChild('topbarmenu') menu!: ElementRef;
|
||||||
@ViewChild('statsMenu') statsMenu: any;
|
@ViewChild('statsMenu') statsMenu: any;
|
||||||
@ViewChild('statsMenuMobile') statsMenuMobile: any;
|
|
||||||
|
|
||||||
isMenuVisible = true;
|
isMenuVisible = true;
|
||||||
progressHighlight = false;
|
progressHighlight = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user