From 4f6a388129adf9ed5125a33175c148bd8ca476ab Mon Sep 17 00:00:00 2001 From: Tykayn Date: Tue, 14 Oct 2025 17:37:12 +0200 Subject: [PATCH] up --- frontend/src/app/pages/home/home.html | 17 ++++++++++------- frontend/src/app/pages/home/home.scss | 11 +++++++++++ frontend/src/app/pages/home/home.ts | 13 ++++++++++++- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/pages/home/home.html b/frontend/src/app/pages/home/home.html index 2013fc3..6984191 100644 --- a/frontend/src/app/pages/home/home.html +++ b/frontend/src/app/pages/home/home.html @@ -1,4 +1,5 @@
+ @if(showOptions){
@@ -29,13 +30,7 @@ Mode plein air - @if (pleinAirMode) { -
- - - -
- } +
@@ -191,6 +186,14 @@ + @if (pleinAirMode) { +
+ + + +
+ } + @if (toasts.length) {
@for (t of toasts; track t.id) { diff --git a/frontend/src/app/pages/home/home.scss b/frontend/src/app/pages/home/home.scss index dde7360..0b963fa 100644 --- a/frontend/src/app/pages/home/home.scss +++ b/frontend/src/app/pages/home/home.scss @@ -250,4 +250,15 @@ app-edit-form{ outline: none; } +} + +.quick-actions{ + margin-top: 8px; + display: inline-block; + gap: 6px; + flex-wrap: wrap; + position: fixed; + right: 5rem; + bottom: 1.1rem; + z-index: 100; } \ No newline at end of file diff --git a/frontend/src/app/pages/home/home.ts b/frontend/src/app/pages/home/home.ts index 662e23a..eeb90fc 100644 --- a/frontend/src/app/pages/home/home.ts +++ b/frontend/src/app/pages/home/home.ts @@ -88,6 +88,7 @@ export class Home implements OnInit, OnDestroy { const id = (map.get('id') || '').trim(); const what = (map.get('what') || '').trim(); const pleinAir = (map.get('pleinair') || '').trim().toLowerCase(); + const preset = (map.get('preset') || '').trim().toLowerCase(); const limitParam = map.get('limit'); const limit = limitParam ? Number(limitParam) : null; // Charger selon les query params @@ -104,6 +105,10 @@ export class Home implements OnInit, OnDestroy { if (pleinAir === '1' || pleinAir === 'true' || pleinAir === 'yes') { this.enablePleinAirMode(); } + // Support: preset=plein_air + if (preset === 'plein_air') { + this.enablePleinAirMode(); + } }); this.startAutoReload(); } @@ -355,7 +360,13 @@ export class Home implements OnInit, OnDestroy { geometry: { type: 'Point', coordinates: [lon, lat] } } as any; this.OedbApi.createEvent(feature).subscribe({ - next: () => { this.pushToast('success', 'Évènement créé'); this.selected = null; this.loadEvents(); }, + next: () => { + this.pushToast('success', 'Évènement créé'); + this.selected = null; + // Après création rapide en plein air: recharger uniquement ce type pour feedback instantané + this.selectedWhatFilter = w; + this.loadEvents({ what: w }); + }, error: () => { this.pushToast('error', 'Échec de création'); } }); }