From e73c0784637d0542edd71038684fc7943f10eae1 Mon Sep 17 00:00:00 2001 From: elpatron Date: Sat, 30 May 2026 20:55:14 +0200 Subject: [PATCH] fix(seo): replaceState nur bei abweichendem lng und Manifest auf Deutsch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vermeidet unnötige History-Änderungen beim Seitenaufbau und stellt die PWA-Beschreibung konsistent zu lang: 'de' bereit. Co-authored-by: Cursor --- client/src/utils/seo.ts | 3 +++ client/vite.config.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/utils/seo.ts b/client/src/utils/seo.ts index 114115b..40f6d8d 100644 --- a/client/src/utils/seo.ts +++ b/client/src/utils/seo.ts @@ -22,6 +22,9 @@ function setMeta(attr: 'name' | 'property', key: string, content: string) { function syncLanguageUrl(lang: SeoLang) { const url = new URL(window.location.href) + const currentLng = url.searchParams.get('lng') + if (currentLng && normalizeSeoLang(currentLng) === lang) return + url.searchParams.set('lng', lang) const next = `${url.pathname}${url.search}${url.hash}` window.history.replaceState({}, '', next) diff --git a/client/vite.config.ts b/client/vite.config.ts index 362d4ab..db6bf84 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -51,7 +51,7 @@ export default defineConfig({ short_name: 'Daagbok', lang: 'de', description: - 'Digitales Yacht-Logbuch — E2E-verschlüsselt, offline-fähig. Digital yacht logbook — E2E encrypted, offline-capable PWA.', + 'Digitales Yacht-Logbuch — E2E-verschlüsselt, offline-fähig.', theme_color: '#1e293b', background_color: '#0f172a', display: 'standalone',