Fix: Standort-Fehlermeldung schliessbar, manuelle Standorteingabe
Behebt Gitea Issue #1 "Eigenen Standort verwenden" (zwei Teilprobleme): 1. Die Fehlermeldung bei fehlgeschlagener Geolocation-Abfrage (#app-status) liess sich bisher nicht schliessen und blockierte dauerhaft die UI. Neuer Schliessen-Button (#app-status-close), unabhaengig vom restlichen Bootstrap-Ablauf verdrahtet, damit er auch bei einem fruehen Init-Fehler funktioniert. 2. Es gab keine Moeglichkeit, den Standort manuell zu setzen, wenn die Browser-Geolocation fehlschlaegt oder nicht verfuegbar ist. Neues Modal (js/ui/manualLocation.js) mit Breiten-/Laengengrad-Eingabe, Validierung (aria-invalid/Inline-Fehler analog zum Ausflugsziel-Formular), setzt bei gueltiger Eingabe state.userLocation direkt - Karte, Liste und Entfernungsfilter reagieren automatisch darauf.
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
/* Modal zur manuellen Eingabe des Nutzerstandorts (Bugfix, Gitea Issue #1):
|
||||
Anders als die übrigen Modals (css/detail.css, css/form.css,
|
||||
css/promptGenerator.css - jeweils vollflächig auf Mobile, zentriertes
|
||||
Panel ab 1024px) ist dieses Modal auf allen Breakpoints ein kompaktes,
|
||||
zentriertes Panel, da es nur zwei Eingabefelder enthält und ein
|
||||
Vollbild-Modal dafür unangemessen viel Leerraum erzeugen würde. Backdrop,
|
||||
Schließen-Button und Grundstruktur folgen trotzdem demselben Muster wie
|
||||
die übrigen Modals. Das Eingabeformular selbst nutzt bewusst dieselben
|
||||
Klassen wie das Ausflugsziel-Formular (.form-field, ...) aus css/form.css
|
||||
statt sie zu duplizieren. Struktur wird von js/ui/manualLocation.js in
|
||||
#manual-location-modal eingehängt. */
|
||||
|
||||
.manual-location-modal {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 2300;
|
||||
}
|
||||
|
||||
.manual-location-modal[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.manual-location-modal__backdrop {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.manual-location-modal__panel {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: min(360px, 90vw);
|
||||
max-height: 90vh;
|
||||
overflow-y: auto;
|
||||
background: var(--color-surface);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-card);
|
||||
padding: var(--space-lg);
|
||||
padding-top: calc(var(--space-lg) + 36px);
|
||||
}
|
||||
|
||||
.manual-location-modal__close {
|
||||
position: absolute;
|
||||
top: var(--space-sm);
|
||||
right: var(--space-sm);
|
||||
z-index: 1;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: rgba(0, 0, 0, 0.55);
|
||||
color: #fff;
|
||||
font-size: 1rem;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.manual-location-form__title {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: var(--space-sm);
|
||||
}
|
||||
|
||||
.manual-location-form__intro {
|
||||
color: var(--color-text-muted);
|
||||
font-size: 0.85rem;
|
||||
line-height: 1.4;
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.manual-location-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
.manual-location-form__actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-sm);
|
||||
padding-top: var(--space-sm);
|
||||
border-top: 1px solid var(--color-border);
|
||||
}
|
||||
Reference in New Issue
Block a user