From cc0a39c2c4508b86342403e67f6a9863796bf67c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Jun 2024 09:25:30 +0200 Subject: [PATCH] Fix "update your settings" keyboard navigation --- .../video-filters-header.component.html | 24 ++++++++++++------- .../shared/settings/menu-focus-fixed.ts | 1 + 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/client/src/app/shared/shared-video-miniature/video-filters-header.component.html b/client/src/app/shared/shared-video-miniature/video-filters-header.component.html index b6258fb25..50c68c828 100644 --- a/client/src/app/shared/shared-video-miniature/video-filters-header.component.html +++ b/client/src/app/shared/shared-video-miniature/video-filters-header.component.html @@ -1,9 +1,8 @@
Update - - - your settings
@@ -17,8 +16,11 @@ [attr.aria-expanded]="!areFiltersCollapsed" aria-controls="collapseBasic" [ngClass]="{ active: !areFiltersCollapsed }" > - More filters - Hide filters + @if (areFiltersCollapsed) { + More filters + } @else { + Hide filters + } @@ -54,9 +56,15 @@ Sort by "Original Publication Date" Sort by "Name" - Sort by "Recent Views" - Sort by "Hot" - Sort by "Likes" + + @if (isTrendingSortEnabled('most-viewed')) { + Sort by "Recent Views" + } @else if (isTrendingSortEnabled('hot')) { + Sort by "Hot" + } @else if (isTrendingSortEnabled('most-liked')) { + Sort by "Likes" + } + Sort by "Global Views" diff --git a/client/src/assets/player/shared/settings/menu-focus-fixed.ts b/client/src/assets/player/shared/settings/menu-focus-fixed.ts index 0c835c7fa..9950006fc 100644 --- a/client/src/assets/player/shared/settings/menu-focus-fixed.ts +++ b/client/src/assets/player/shared/settings/menu-focus-fixed.ts @@ -16,6 +16,7 @@ class MenuFocusFixed extends Menu { return } + // FIXME: super misses handleKeyDown // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error return super.handleKeyDown(event)