11<script setup lang="ts">
2- import { Eye , EyeOff } from ' lucide-vue-next'
2+ import { Eye , EyeOff , X } from ' lucide-vue-next'
33import { computed , reactive , ref } from ' vue'
44import { useI18n } from ' vue-i18n'
55import { useRoute , useRouter } from ' vue-router'
@@ -21,6 +21,7 @@ const form = reactive({
2121const errorMessage = ref (' ' )
2222const showPassword = ref (false )
2323const authMode = ref <' login' | ' register' >(' login' )
24+ const showLegalModal = ref <' none' | ' terms' | ' privacy' >(' none' )
2425const canSubmitCredentials = computed (
2526 () =>
2627 form .username .trim ().length > 0 &&
@@ -218,13 +219,49 @@ function toggleAuthMode() {
218219
219220 <p class =" mt-8 text-left text-sm font-medium leading-6 text-[#667085]" >
220221 {{ t('auth.termsPrefix') }}
221- <a href = " # " class =" font-semibold text-[#111827] hover:text-[#2563eb]" >{{ t('auth.termsOfUse') }}</a >
222+ <button type = " button " class =" font-semibold text-[#111827] hover:text-[#2563eb]" @click = " showLegalModal = 'terms' " >{{ t('auth.termsOfUse') }}</button >
222223 <span class =" px-1" >& ; </span >
223- <a href = " # " class =" font-semibold text-[#111827] hover:text-[#2563eb]" >{{ t('auth.privacyPolicy') }}</a >
224+ <button type = " button " class =" font-semibold text-[#111827] hover:text-[#2563eb]" @click = " showLegalModal = 'privacy' " >{{ t('auth.privacyPolicy') }}</button >
224225 </p >
225226 </div >
226227 </section >
227228
229+ <div
230+ v-if =" showLegalModal !== 'none'"
231+ class =" fixed inset-0 z-50 grid place-items-center bg-slate-950/55 p-4 backdrop-blur-sm"
232+ @click.self =" showLegalModal = 'none'"
233+ >
234+ <section class =" w-full max-w-md overflow-hidden rounded-2xl border border-app-border bg-white shadow-panel" >
235+ <header class =" flex items-start justify-between gap-4 border-b border-app-border px-5 py-4" >
236+ <p class =" text-base font-semibold text-text-primary" >
237+ {{ showLegalModal === 'terms' ? t('auth.termsOfUse') : t('auth.privacyPolicy') }}
238+ </p >
239+ <button
240+ type =" button"
241+ class =" grid h-8 w-8 shrink-0 place-items-center rounded-md text-text-muted transition hover:bg-app-bg2 hover:text-text-primary"
242+ :aria-label =" t('settings.close')"
243+ @click =" showLegalModal = 'none'"
244+ >
245+ <X class="h-4 w-4" />
246+ </button >
247+ </header >
248+ <div class =" px-5 py-8 text-center" >
249+ <p class =" text-sm leading-6 text-text-secondary" >
250+ {{ showLegalModal === 'terms' ? t('auth.termsModalPlaceholder') : t('auth.privacyModalPlaceholder') }}
251+ </p >
252+ </div >
253+ <footer class =" flex justify-end border-t border-app-border px-5 py-4" >
254+ <button
255+ type =" button"
256+ class =" rounded-md border border-app-border bg-white px-3 py-2 text-sm font-medium text-text-secondary transition hover:text-text-primary"
257+ @click =" showLegalModal = 'none'"
258+ >
259+ {{ t('settings.close') }}
260+ </button >
261+ </footer >
262+ </section >
263+ </div >
264+
228265 <footer class =" relative z-10 px-5 py-8 text-center text-base font-medium text-[#667085]" >
229266 © 2026 AetherFlow. All rights reserved.
230267 </footer >
0 commit comments