From d08c7f45afa5238fdb950fecc6c7a4ae471c5dfb Mon Sep 17 00:00:00 2001 From: Armin Stanitzok <21990230+GODrums@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:35:05 +0200 Subject: [PATCH] Fix: Improve filter layout for mobile (#120) --- webapp/src/app/home/home.component.html | 2 +- .../leaderboard/filter/filter.component.html | 4 ++-- .../filter/repository/repository.component.ts | 16 +++++++--------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/webapp/src/app/home/home.component.html b/webapp/src/app/home/home.component.html index 19787091..2d9fd936 100644 --- a/webapp/src/app/home/home.component.html +++ b/webapp/src/app/home/home.component.html @@ -1,6 +1,6 @@
-
+

Artemis Leaderboard

diff --git a/webapp/src/app/home/leaderboard/filter/filter.component.html b/webapp/src/app/home/leaderboard/filter/filter.component.html index 6ece45f4..cbc4edaf 100644 --- a/webapp/src/app/home/leaderboard/filter/filter.component.html +++ b/webapp/src/app/home/leaderboard/filter/filter.component.html @@ -1,9 +1,9 @@ -
+

Filter

-
+ @if (repositories() && repositories()!.length > 1) { diff --git a/webapp/src/app/home/leaderboard/filter/repository/repository.component.ts b/webapp/src/app/home/leaderboard/filter/repository/repository.component.ts index a9a3c7ae..982bf837 100644 --- a/webapp/src/app/home/leaderboard/filter/repository/repository.component.ts +++ b/webapp/src/app/home/leaderboard/filter/repository/repository.component.ts @@ -26,15 +26,13 @@ export class LeaderboardFilterRepositoryComponent { }); options = computed(() => { - const options: SelectOption[] = !this.repositories() - ? [] - : this.repositories()!.map((name, index) => { - return { - id: index + 1, - value: name, - label: name - }; - }); + const options: SelectOption[] = this.repositories().map((name, index) => { + return { + id: index + 1, + value: name, + label: name + }; + }); options.unshift({ id: 0, value: 'all',