mirror of
https://github.com/complexcaresolutions/dak.c2s.git
synced 2026-03-17 16:03:41 +00:00
feat: add Impressum and Datenschutz links on login page
Legal links shown below the login card, opening iframe dialog to keep users on the page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4dae529520
commit
551212b217
1 changed files with 33 additions and 0 deletions
|
|
@ -5,6 +5,9 @@ import { z } from 'zod'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import { useAuth } from '@/context/AuthContext'
|
import { useAuth } from '@/context/AuthContext'
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
|
||||||
|
import {
|
||||||
|
Dialog, DialogContent, DialogHeader, DialogTitle,
|
||||||
|
} from '@/components/ui/dialog'
|
||||||
import { Input } from '@/components/ui/input'
|
import { Input } from '@/components/ui/input'
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { Label } from '@/components/ui/label'
|
import { Label } from '@/components/ui/label'
|
||||||
|
|
@ -27,6 +30,7 @@ export function LoginPage() {
|
||||||
const [error, setError] = useState<string | null>(null)
|
const [error, setError] = useState<string | null>(null)
|
||||||
const [showMfa, setShowMfa] = useState(false)
|
const [showMfa, setShowMfa] = useState(false)
|
||||||
const [isSubmitting, setIsSubmitting] = useState(false)
|
const [isSubmitting, setIsSubmitting] = useState(false)
|
||||||
|
const [legalDialog, setLegalDialog] = useState<{ title: string; url: string } | null>(null)
|
||||||
|
|
||||||
const {
|
const {
|
||||||
register,
|
register,
|
||||||
|
|
@ -150,6 +154,35 @@ export function LoginPage() {
|
||||||
</form>
|
</form>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
<div className="mt-4 flex items-center gap-3 text-xs text-muted-foreground">
|
||||||
|
<button
|
||||||
|
onClick={() => setLegalDialog({ title: 'Impressum', url: 'https://complexcaresolutions.de/impressum/' })}
|
||||||
|
className="hover:text-foreground underline underline-offset-2 transition-colors"
|
||||||
|
>
|
||||||
|
Impressum
|
||||||
|
</button>
|
||||||
|
<span>·</span>
|
||||||
|
<button
|
||||||
|
onClick={() => setLegalDialog({ title: 'Datenschutzerklärung', url: 'https://www.complexcaresolutions.de/datenschutzerklaerung/' })}
|
||||||
|
className="hover:text-foreground underline underline-offset-2 transition-colors"
|
||||||
|
>
|
||||||
|
Datenschutz
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Dialog open={!!legalDialog} onOpenChange={(open) => { if (!open) setLegalDialog(null) }}>
|
||||||
|
<DialogContent className="max-w-4xl h-[85vh] flex flex-col p-0">
|
||||||
|
<DialogHeader className="px-6 pt-6 pb-2">
|
||||||
|
<DialogTitle>{legalDialog?.title}</DialogTitle>
|
||||||
|
</DialogHeader>
|
||||||
|
<iframe
|
||||||
|
src={legalDialog?.url}
|
||||||
|
className="flex-1 w-full border-0 rounded-b-lg"
|
||||||
|
title={legalDialog?.title}
|
||||||
|
/>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue