Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 3x 3x 3x 3x 3x 3x 32x 32x 32x | import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';
import { RouterLink, RouterLinkActive } from '@angular/router';
import { DrawerService } from '@drevo-web/core';
import { IconComponent } from '@drevo-web/ui';
interface NavItem {
readonly label: string;
readonly route: string;
readonly icon: string;
}
const NAV_ITEMS: NavItem[] = [
{ label: 'Изменения', route: '/history/articles', icon: 'history' },
{ label: 'Иллюстрации', route: '/pictures', icon: 'image' },
];
@Component({
selector: 'app-sidebar-nav',
imports: [RouterLink, RouterLinkActive, IconComponent],
templateUrl: './sidebar-nav.component.html',
styleUrl: './sidebar-nav.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
host: {
'[class.compact]': 'isCompact()',
},
})
export class SidebarNavComponent {
private readonly drawerService = inject(DrawerService);
readonly navItems = NAV_ITEMS;
readonly isCompact = computed(() => !this.drawerService.isOpen());
}
|