From b2080e79b29bf4365f7ac24ba40ba9330cc39214 Mon Sep 17 00:00:00 2001 From: Claude Agent Date: Fri, 10 Jul 2026 18:10:17 +0000 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20pagini=20Termeni,=20Confiden?= =?UTF-8?q?=C8=9Bialitate/GDPR=20=C8=99i=20Contact?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Activează linkurile din footer-ul landing-ului către pagini reale, în stilul paginilor statice din autopass. - Componentă comună LegalPage.vue: același antet (brand + selector de temă), footer și paletă (8 teme) ca landing-ul, cu slot "prose" - Logica temei extrasă în composable useLandingTheme (partajat de landing și paginile legale, persistat în localStorage) - Rute publice /termeni, /confidentialitate, /contact (fullBleed) - Footer-ul (landing + pagini) trimite acum la aceste rute Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/src/components/LegalPage.vue | 232 ++++++++++++++++++++ frontend/src/composables/useLandingTheme.ts | 43 ++++ frontend/src/router/index.ts | 18 ++ frontend/src/views/Confidentialitate.vue | 76 +++++++ frontend/src/views/Contact.vue | 30 +++ frontend/src/views/Landing.vue | 39 +--- frontend/src/views/Termeni.vue | 60 +++++ 7 files changed, 464 insertions(+), 34 deletions(-) create mode 100644 frontend/src/components/LegalPage.vue create mode 100644 frontend/src/composables/useLandingTheme.ts create mode 100644 frontend/src/views/Confidentialitate.vue create mode 100644 frontend/src/views/Contact.vue create mode 100644 frontend/src/views/Termeni.vue diff --git a/frontend/src/components/LegalPage.vue b/frontend/src/components/LegalPage.vue new file mode 100644 index 0000000..090a51d --- /dev/null +++ b/frontend/src/components/LegalPage.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/frontend/src/composables/useLandingTheme.ts b/frontend/src/composables/useLandingTheme.ts new file mode 100644 index 0000000..3922764 --- /dev/null +++ b/frontend/src/composables/useLandingTheme.ts @@ -0,0 +1,43 @@ +import { ref, computed } from 'vue' + +/** + * Theme selector for the public pages (landing + legal/contact). + * Same 8 themes and cycle order as the ROA app / autopass landing. + * Persisted under its own key so it doesn't clash with the in-app theme. + */ +const THEMES: [string, string][] = [ + ['light', 'Light'], + ['dark', 'Dark'], + ['petrol', 'Petrol'], + ['grafit', 'Grafit'], + ['cobalt', 'Cobalt'], + ['cupru', 'Cupru'], + ['hartie', 'Hârtie'], + ['auto', 'Auto'] +] +const THEME_KEY = 'roa-landing-theme' +const VALID = new Set(THEMES.map((t) => t[0])) + +function resolve(id: string): string { + if (id === 'auto') { + return window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark' + } + return id +} + +// Module-level singleton so every public page shares the same selection. +const stored = localStorage.getItem(THEME_KEY) +const themeId = ref(stored && VALID.has(stored) ? stored : 'grafit') + +export function useLandingTheme() { + const theme = computed(() => resolve(themeId.value)) + const themeLabel = computed(() => THEMES.find((t) => t[0] === themeId.value)?.[1] ?? 'Grafit') + + function cycleTheme() { + const idx = THEMES.findIndex((t) => t[0] === themeId.value) + themeId.value = THEMES[(idx + 1) % THEMES.length][0] + localStorage.setItem(THEME_KEY, themeId.value) + } + + return { themeId, theme, themeLabel, cycleTheme } +} diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 1b3f188..bd83962 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -12,6 +12,24 @@ const router = createRouter({ component: () => import('@/views/Landing.vue'), meta: { requiresAuth: false, fullBleed: true } }, + { + path: '/termeni', + name: 'Termeni', + component: () => import('@/views/Termeni.vue'), + meta: { requiresAuth: false, fullBleed: true } + }, + { + path: '/confidentialitate', + name: 'Confidentialitate', + component: () => import('@/views/Confidentialitate.vue'), + meta: { requiresAuth: false, fullBleed: true } + }, + { + path: '/contact', + name: 'Contact', + component: () => import('@/views/Contact.vue'), + meta: { requiresAuth: false, fullBleed: true } + }, { path: '/login', name: 'Login', diff --git a/frontend/src/views/Confidentialitate.vue b/frontend/src/views/Confidentialitate.vue new file mode 100644 index 0000000..d95d1bd --- /dev/null +++ b/frontend/src/views/Confidentialitate.vue @@ -0,0 +1,76 @@ + + + diff --git a/frontend/src/views/Contact.vue b/frontend/src/views/Contact.vue new file mode 100644 index 0000000..6fef3f9 --- /dev/null +++ b/frontend/src/views/Contact.vue @@ -0,0 +1,30 @@ + + + diff --git a/frontend/src/views/Landing.vue b/frontend/src/views/Landing.vue index bd2e680..3467f26 100644 --- a/frontend/src/views/Landing.vue +++ b/frontend/src/views/Landing.vue @@ -172,9 +172,9 @@ @@ -185,40 +185,11 @@