From 4cb0589a6459aea7aad976f5d49f6d65ef061776 Mon Sep 17 00:00:00 2001 From: Denis Lugowski Date: Sat, 22 Nov 2025 08:56:15 +0100 Subject: [PATCH] feat(#22): Add settings page with language switcher --- CLAUDE.md | 2 + legalconsenthub/app/app.vue | 10 +- .../app/components/DeleteModal.vue | 2 +- legalconsenthub/app/components/UserMenu.vue | 115 +-------------- legalconsenthub/app/pages/settings.vue | 135 ++++++++++++++++++ legalconsenthub/i18n/locales/de.json | 30 ++-- legalconsenthub/i18n/locales/en.json | 30 ++-- legalconsenthub/nuxt.config.ts | 1 + 8 files changed, 190 insertions(+), 135 deletions(-) create mode 100644 legalconsenthub/app/pages/settings.vue diff --git a/CLAUDE.md b/CLAUDE.md index 9a220dd..66d06c5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -231,6 +231,8 @@ legalconsenthub/ │ │ ├── permissions.global.ts # Authorization check │ │ └── refreshToken.global.ts # Token refresh logic │ ├── pages/ # Route pages +│ │ ├── settings.vue # User settings page (language, theme, appearance) +│ │ ├── administration.vue # Admin template editor │ │ ├── application-forms/ │ │ ├── callback.vue # OAuth callback │ │ ├── create.vue diff --git a/legalconsenthub/app/app.vue b/legalconsenthub/app/app.vue index 57b60a6..df7550f 100644 --- a/legalconsenthub/app/app.vue +++ b/legalconsenthub/app/app.vue @@ -1,5 +1,5 @@ diff --git a/legalconsenthub/i18n/locales/de.json b/legalconsenthub/i18n/locales/de.json index e575e66..730c569 100644 --- a/legalconsenthub/i18n/locales/de.json +++ b/legalconsenthub/i18n/locales/de.json @@ -6,7 +6,7 @@ "noPermission": "Keine Berechtigung", "noPermissionDescription": "Sie haben keine Berechtigung zum Erstellen von Anträgen.", "backToOverview": "Zurück zur Übersicht", - "deleteConfirm": "Möchten Sie wirklich den Mitbestimmungsantrag {name} löschen?", + "deleteConfirm": "Möchten Sie wirklich den Mitbestimmungsantrag \"{name}\" löschen?", "deleteTitle": "Mitbestimmungsantrag löschen", "lastEditedBy": "Zuletzt bearbeitet von", "createdBy": "Erstellt von", @@ -102,16 +102,28 @@ "accessDenied": "Zugriff verweigert" }, "user": { - "profile": "Profil", "administration": "Administration", "settings": "Einstellungen", - "logout": "Abmelden", - "theme": "Design", - "themePrimary": "Primärfarbe", - "themeNeutral": "Neutralfarbe", - "appearance": "Erscheinungsbild", - "light": "Hell", - "dark": "Dunkel" + "logout": "Abmelden" + }, + "settings": { + "title": "Einstellungen", + "language": { + "title": "Sprache", + "description": "Wählen Sie Ihre bevorzugte Sprache" + }, + "appearance": { + "title": "Erscheinungsbild", + "description": "Wählen Sie zwischen hellem und dunklem Modus", + "light": "Hell", + "dark": "Dunkel" + }, + "theme": { + "title": "Farbschema", + "description": "Passen Sie die Farben der Anwendung an", + "primary": "Primärfarbe", + "neutral": "Neutralfarbe" + } }, "organization": { "current": "Aktuelle Organisation" diff --git a/legalconsenthub/i18n/locales/en.json b/legalconsenthub/i18n/locales/en.json index 80389c6..15dd78d 100644 --- a/legalconsenthub/i18n/locales/en.json +++ b/legalconsenthub/i18n/locales/en.json @@ -6,7 +6,7 @@ "noPermission": "No Permission", "noPermissionDescription": "You do not have permission to create applications.", "backToOverview": "Back to Overview", - "deleteConfirm": "Do you really want to delete the co-determination application {name}?", + "deleteConfirm": "Do you really want to delete the co-determination application \"{name}\"?", "deleteTitle": "Delete Co-determination Application", "lastEditedBy": "Last edited by", "createdBy": "Created by", @@ -102,16 +102,28 @@ "accessDenied": "Access denied" }, "user": { - "profile": "Profile", "administration": "Administration", "settings": "Settings", - "logout": "Log out", - "theme": "Theme", - "themePrimary": "Primary Color", - "themeNeutral": "Neutral Color", - "appearance": "Appearance", - "light": "Light", - "dark": "Dark" + "logout": "Log out" + }, + "settings": { + "title": "Settings", + "language": { + "title": "Language", + "description": "Choose your preferred language" + }, + "appearance": { + "title": "Appearance", + "description": "Choose between light and dark mode", + "light": "Light", + "dark": "Dark" + }, + "theme": { + "title": "Color Theme", + "description": "Customize the application colors", + "primary": "Primary Color", + "neutral": "Neutral Color" + } }, "organization": { "current": "Current Organization" diff --git a/legalconsenthub/nuxt.config.ts b/legalconsenthub/nuxt.config.ts index 176bce4..b7b17fe 100644 --- a/legalconsenthub/nuxt.config.ts +++ b/legalconsenthub/nuxt.config.ts @@ -28,6 +28,7 @@ export default defineNuxtConfig({ ], i18n: { defaultLocale: 'de', + strategy: 'no_prefix', locales: [ { code: 'en', name: 'English', file: 'en.json' }, { code: 'de', name: 'Deutsch', file: 'de.json' }