|
1 | | -<aside class="custom-scrollbar flex flex-column p-4 h-full"> |
2 | | - <img ngSrc="assets/images/logo.svg" alt="OSF Logo" height="36" width="106" /> |
3 | | - |
4 | | - <nav class="nav-menu m-t-36"> |
5 | | - <p-panelMenu [model]="mainMenuItems" [multiple]="false"> |
6 | | - <ng-template #item let-item> |
7 | | - <a |
8 | | - [routerLink]="item.routerLink" |
9 | | - routerLinkActive="active" |
10 | | - [routerLinkActiveOptions]="{ |
11 | | - exact: item.label !== 'navigation.myProjects' ? item.useExactMatch : true, |
12 | | - }" |
13 | | - class="nav-link flex align-items-center" |
14 | | - [class.mt-5]="item.label === 'navigation.settings' || item.label === 'navigation.myProjects'" |
15 | | - (click)="goToLink(item)" |
16 | | - > |
17 | | - @if (item.icon) { |
18 | | - <osf-icon [iconClass]="`nav-icon ${item.icon}`"></osf-icon> |
19 | | - } |
20 | | - <span>{{ item.label | translate }}</span> |
21 | | - @if (item.items) { |
22 | | - <osf-icon |
23 | | - class="ml-auto pt-1" |
24 | | - [iconClass]="item.expanded ? `fas fa-chevron-down fa-sm` : `fas fa-chevron-right fa-sm`" |
25 | | - ></osf-icon> |
26 | | - } |
27 | | - </a> |
28 | | - |
29 | | - @if (item.label === 'navigation.myProjects' && isProjectRoute()) { |
30 | | - <div class="ml-4"> |
31 | | - <p-panelMenu [model]="myProjectMenuItems" [multiple]="false"> |
32 | | - <ng-template #item let-item> |
33 | | - <a |
34 | | - [routerLink]="item.routerLink ? ['/my-projects', currentProjectId(), item.routerLink] : null" |
35 | | - [routerLinkActive]="item.routerLink ? 'active' : ''" |
36 | | - [routerLinkActiveOptions]="{ exact: true }" |
37 | | - class="nav-link flex align-items-center" |
38 | | - (click)="goToLink(item)" |
39 | | - > |
40 | | - @if (item.icon) { |
41 | | - <osf-icon [iconClass]="`nav-icon ${item.icon}`"></osf-icon> |
42 | | - } |
43 | | - <span>{{ item.label | translate }}</span> |
44 | | - @if (item.items) { |
45 | | - <osf-icon |
46 | | - class="ml-auto pt-1" |
47 | | - [iconClass]="item.expanded ? `fas fa-chevron-down fa-sm` : `fas fa-chevron-right fa-sm`" |
48 | | - ></osf-icon> |
49 | | - } |
50 | | - </a> |
51 | | - </ng-template> |
52 | | - </p-panelMenu> |
53 | | - </div> |
| 1 | +<nav class="nav-menu"> |
| 2 | + <p-panelMenu [model]="mainMenuItems" [multiple]="false"> |
| 3 | + <ng-template #item let-item> |
| 4 | + <a |
| 5 | + [routerLink]="item.routerLink" |
| 6 | + routerLinkActive="active" |
| 7 | + [routerLinkActiveOptions]="{ |
| 8 | + exact: item.label !== 'navigation.myProjects' ? item.useExactMatch : true, |
| 9 | + }" |
| 10 | + class="nav-link flex align-items-center" |
| 11 | + [class.mt-5]="item.label === 'navigation.settings' || item.label === 'navigation.myProjects'" |
| 12 | + (click)="goToLink(item)" |
| 13 | + > |
| 14 | + @if (item.icon) { |
| 15 | + <osf-icon [iconClass]="`nav-icon ${item.icon}`"></osf-icon> |
54 | 16 | } |
55 | | - </ng-template> |
56 | | - </p-panelMenu> |
57 | | - </nav> |
58 | | -</aside> |
| 17 | + <span>{{ item.label | translate }}</span> |
| 18 | + @if (item.items) { |
| 19 | + <osf-icon |
| 20 | + class="ml-auto pt-1" |
| 21 | + [iconClass]="item.expanded ? `fas fa-chevron-down fa-sm` : `fas fa-chevron-right fa-sm`" |
| 22 | + ></osf-icon> |
| 23 | + } |
| 24 | + </a> |
| 25 | + |
| 26 | + @if (item.label === 'navigation.myProjects' && isProjectRoute()) { |
| 27 | + <div class="ml-4"> |
| 28 | + <p-panelMenu [model]="myProjectMenuItems" [multiple]="false"> |
| 29 | + <ng-template #item let-item> |
| 30 | + <a |
| 31 | + [routerLink]="item.routerLink ? ['/my-projects', currentProjectId(), item.routerLink] : null" |
| 32 | + [routerLinkActive]="item.routerLink ? 'active' : ''" |
| 33 | + [routerLinkActiveOptions]="{ exact: true }" |
| 34 | + class="nav-link flex align-items-center" |
| 35 | + (click)="goToLink(item)" |
| 36 | + > |
| 37 | + @if (item.icon) { |
| 38 | + <osf-icon [iconClass]="`nav-icon ${item.icon}`"></osf-icon> |
| 39 | + } |
| 40 | + <span>{{ item.label | translate }}</span> |
| 41 | + @if (item.items) { |
| 42 | + <osf-icon |
| 43 | + class="ml-auto pt-1" |
| 44 | + [iconClass]="item.expanded ? `fas fa-chevron-down fa-sm` : `fas fa-chevron-right fa-sm`" |
| 45 | + ></osf-icon> |
| 46 | + } |
| 47 | + </a> |
| 48 | + </ng-template> |
| 49 | + </p-panelMenu> |
| 50 | + </div> |
| 51 | + } |
| 52 | + </ng-template> |
| 53 | + </p-panelMenu> |
| 54 | +</nav> |
0 commit comments