From 6128678678136207a0f458d0ff79c0b2862abb38 Mon Sep 17 00:00:00 2001 From: itskovacs Date: Fri, 25 Jul 2025 18:33:39 +0200 Subject: [PATCH] :sparkles: Dark mode --- backend/trip/__init__.py | 2 +- src/src/app/app.component.html | 2 +- .../dashboard/dashboard.component.html | 59 ++++++++++------- .../dashboard/dashboard.component.ts | 8 +++ .../app/components/trip/trip.component.html | 64 +++++++++++-------- .../trip-place-select-modal.component.html | 37 ++++++----- src/src/app/services/utils.service.ts | 20 ++++++ src/tailwind.config.js | 9 ++- 8 files changed, 128 insertions(+), 73 deletions(-) diff --git a/backend/trip/__init__.py b/backend/trip/__init__.py index 008aaa9..29654ee 100644 --- a/backend/trip/__init__.py +++ b/backend/trip/__init__.py @@ -1 +1 @@ -__version__ = "1.7.3" +__version__ = "1.8.0" diff --git a/src/src/app/app.component.html b/src/src/app/app.component.html index 8a9b22c..3fc7e75 100644 --- a/src/src/app/app.component.html +++ b/src/src/app/app.component.html @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/src/app/components/dashboard/dashboard.component.html b/src/src/app/components/dashboard/dashboard.component.html index c339ab8..9f44c51 100644 --- a/src/src/app/components/dashboard/dashboard.component.html +++ b/src/src/app/components/dashboard/dashboard.component.html @@ -6,16 +6,17 @@ (closeEmitter)="closePlaceBox()"> } -
+
-
+
-
+
@@ -23,23 +24,23 @@
+ class="absolute right-0 bottom-20 p-2 bg-white shadow rounded transition-all duration-200 opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto dark:bg-surface-900">
-
+
-
+
@if (viewMarkersList) {
+ class="absolute left-2 right-2 top-4 bottom-4 md:max-w-md bg-white z-40 rounded-xl shadow-2xl p-4 flex flex-col dark:bg-surface-900">

Points

@@ -63,31 +64,32 @@ } @for (p of visiblePlaces; track p.id) { -
-

{{ p.name }}

+

{{ p.name }}

{{ p.place }}
@if (p.allowdog) { - 🐶 + 🐶 } @else { - 🐶 + 🐶 } @if (p.visited) { - } @else { - } {{ p.category.name }}
@@ -103,7 +105,8 @@ } @if (viewFilters) { -
+
@@ -149,7 +152,8 @@ @if (viewSettings) {
-
+
@@ -169,7 +173,8 @@

Low Network Mode

- You can disable Low Network Mode. Default is true. Display Category + You can disable Low Network Mode. Default is true. + Display Category image instead of Place image.
@@ -177,11 +182,20 @@
+
+

Dark Mode

+
+
+
Enable Dark mode
+ +
+

Map parameters

- You can customize the default view on map loading + You can customize the default view on map + loading

Filters

- You can customize the categories to hide by default + You can customize the categories to hide by + default
@@ -234,7 +249,7 @@

Categories

- You can modify the categories. + You can modify the categories. You cannot delete a used category.
@@ -243,7 +258,7 @@
@for (category of categories; track category.id) { -
+
{{ category.name }}
@@ -297,7 +312,7 @@ }
-
Made with ❤️ in BZH
+
Made with ❤️ in BZH
diff --git a/src/src/app/components/dashboard/dashboard.component.ts b/src/src/app/components/dashboard/dashboard.component.ts index d969226..66c28bf 100644 --- a/src/src/app/components/dashboard/dashboard.component.ts +++ b/src/src/app/components/dashboard/dashboard.component.ts @@ -79,6 +79,7 @@ export class DashboardComponent implements AfterViewInit { searchInput = new FormControl(""); info: Info | undefined; isLowNet: boolean = false; + isDarkMode: boolean = false; viewSettings = false; viewFilters = false; @@ -113,6 +114,7 @@ export class DashboardComponent implements AfterViewInit { ) { this.currencySigns = this.utilsService.currencySigns(); this.isLowNet = this.utilsService.isLowNet; + this.isDarkMode = this.utilsService.isDarkMode; this.settingsForm = this.fb.group({ mapLat: [ @@ -253,6 +255,10 @@ export class DashboardComponent implements AfterViewInit { }, 200); } + toggleDarkMode() { + this.utilsService.toggleDarkMode(); + } + get filteredPlaces(): Place[] { return this.places.filter((p) => { if (!this.filter_display_visited && p.visited) return false; @@ -571,6 +577,8 @@ export class DashboardComponent implements AfterViewInit { } toggleMarkersList() { + this.searchInput.setValue(""); + this.viewMarkersListSearch = false; this.viewMarkersList = !this.viewMarkersList; if (this.viewMarkersList) this.setVisibleMarkers(); } diff --git a/src/src/app/components/trip/trip.component.html b/src/src/app/components/trip/trip.component.html index e8b968f..17b78e6 100644 --- a/src/src/app/components/trip/trip.component.html +++ b/src/src/app/components/trip/trip.component.html @@ -27,7 +27,8 @@
} - {{ + {{ totalPrice || '-' }} {{ currency$ | async }}
@@ -45,12 +46,13 @@ }
-
-
-

Plans

- {{ trip?.name }} plans -
+
+
+
+

Plans

+ {{ trip?.name }} plans +
} @else {-} - {{ tripitem.comment || '-' }} + {{ tripitem.comment || '-' }}
@if (tripitem.lat) { {{ tripitem.lat }}, {{ tripitem.lng }} } @@ -231,7 +233,7 @@
-
+
@@ -242,7 +244,8 @@

Places

{{ trip?.name }} places -