Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/app/core/components/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
computed,
inject,
} from '@angular/core';
import { Router, RouterLink } from '@angular/router';
import { Router } from '@angular/router';
import { toSignal } from '@angular/core/rxjs-interop';
import { map } from 'rxjs';
import { BreadcrumbComponent } from '@core/components/breadcrumb/breadcrumb.component';
Expand All @@ -17,13 +17,7 @@ import { TranslatePipe } from '@ngx-translate/core';
@Component({
standalone: true,
selector: 'osf-header',
imports: [
BreadcrumbComponent,
MenuModule,
ButtonModule,
TranslatePipe,
RouterLink,
],
imports: [BreadcrumbComponent, MenuModule, ButtonModule, TranslatePipe],
templateUrl: './header.component.html',
styleUrl: './header.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
8 changes: 7 additions & 1 deletion src/app/core/components/nav-menu/nav-menu.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, computed, inject } from '@angular/core';
import { Component, computed, inject, output } from '@angular/core';
import {
RouterLink,
RouterLinkActive,
Expand Down Expand Up @@ -32,6 +32,8 @@ export class NavMenuComponent {
this.#convertToMenuItem(item),
);

closeMenu = output<void>();

protected readonly currentRoute = toSignal(
this.#router.events.pipe(
filter((event): event is NavigationEnd => event instanceof NavigationEnd),
Expand Down Expand Up @@ -71,4 +73,8 @@ export class NavMenuComponent {

return { projectId, section };
}

goToLink() {
this.closeMenu.emit();
}
}
2 changes: 1 addition & 1 deletion src/app/core/components/topnav/topnav.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(visibleChange)="isDrawerVisible.set($event)"
[closable]="false"
>
<osf-nav-menu />
<osf-nav-menu (closeMenu)="toggleMenuVisibility()" />
</p-drawer>
<p-button
class="topnav-btn"
Expand Down
4 changes: 2 additions & 2 deletions src/app/shared/components/resources/resources.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ <h3>Sort by:</h3>
height="13"
viewBox="0 0 10 10"
class="switch-icon"
(click)="switchPage(next() ?? first())"
(keydown.enter)="switchPage(next() ?? first())"
(click)="switchPage(!next() ? first() : next())"
(keydown.enter)="switchPage(!next() ? first() : next())"
>
<path
d="M7.70715 5.7063C8.09762 5.31584 8.09762 4.68173 7.70715 4.29127L3.70871 0.292933C3.42132 0.00555328 2.99336 -0.0787866 2.61851 0.0773983C2.24365 0.233583 2 0.595932 2 1.00201V8.99868C2 9.40164 2.24365 9.76711 2.61851 9.92329C2.99336 10.0795 3.42132 9.99201 3.70871 9.70776L7.70715 5.70942V5.7063Z"
Expand Down
7 changes: 3 additions & 4 deletions src/assets/icons/source/filter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.