diff --git a/app/web/app.js b/app/web/app.js
index 199859c..42f0b34 100644
--- a/app/web/app.js
+++ b/app/web/app.js
@@ -316,6 +316,7 @@ let activeSources = []; // laufende AudioBufferSourceNodes (stoppbar per Barge-
// /api/me abgeleitet; bis dahin null -> ensureSession() wartet auf loadMe().
let sessionId = null;
let mePromise = null;
+let myPrefs = {}; // Prefs des aktuellen Nutzers (u. a. location_consent für den Notruf-Standort)
let currentUserId = null;
const sessionKey = (uid) => "va-session-" + uid;
@@ -368,6 +369,14 @@ function loadMe() {
}
// Gespeicherte Nutzer-Präferenzen in die Dropdowns laden.
const prefs = me.prefs || {};
+ myPrefs = prefs;
+ // Standort-Erlaubnis ggf. vorab anfragen, damit im Notfall kein Browser-Dialog kommt.
+ if (prefs.location_consent && navigator.geolocation) {
+ try {
+ navigator.geolocation.getCurrentPosition(() => {}, () => {},
+ { maximumAge: 600000, timeout: 8000 });
+ } catch (e) { /* ignore */ }
+ }
applyAllowedLanguages(prefs);
applyPlaybackChoice(prefs.tts_provider);
applyGenderChoice(prefs.voice_gender || 'f');
@@ -1073,6 +1082,36 @@ function buildUserCard(u) {
+
+
+
+
+
+