overhaul gpx creation and usage
This commit is contained in:
@@ -5,8 +5,8 @@ globalThis.Wegwichtel = globalThis.Wegwichtel || {};
|
||||
|
||||
const DROPDOWN_ANIMATION_MS = 180;
|
||||
const pageTitles = Object.freeze({
|
||||
get privacy() { return ns.I18n.t("info.privacy"); },
|
||||
get imprint() { return ns.I18n.t("info.imprint"); },
|
||||
privacy: 'Datenschutzerklärung',
|
||||
imprint: 'Impressum',
|
||||
get technology() { return ns.I18n.t("info.storage"); }
|
||||
});
|
||||
function menuEntries() { return [
|
||||
@@ -438,7 +438,12 @@ globalThis.Wegwichtel = globalThis.Wegwichtel || {};
|
||||
}
|
||||
|
||||
function updateDialogTitle(pageName) {
|
||||
if (elements?.title) elements.title.textContent = pageTitles[pageName] ?? ns.I18n.t("info.title");
|
||||
if (!elements?.title) return;
|
||||
const isLegalPage = pageName === 'privacy' || pageName === 'imprint';
|
||||
if (isLegalPage) delete elements.title.dataset.i18n;
|
||||
else elements.title.dataset.i18n = 'info.storage';
|
||||
setAttribute(elements.title, 'lang', isLegalPage ? 'de' : ns.I18n.language);
|
||||
elements.title.textContent = pageTitles[pageName] ?? ns.I18n.t("info.title");
|
||||
}
|
||||
|
||||
function focusSafely(element) {
|
||||
|
||||
Reference in New Issue
Block a user