feat(kayıt): yeni hane kaydı yalnızca davetle (REGISTRATION=invite_only)

- REGISTRATION ortam değişkeni: invite_only (varsayılan) | open
- invite_only: ilk hane serbest, sonrasında yalnızca davet koduyla katılım
- Backend'de zorunlu: 403 registration_closed; GET /api/auth/registration
- Kayıt ekranı: kayıt kapalıyken yalnızca davet kodu ve açıklama
- Entegrasyon testleri: kayıt politikası (2)
- Prettier ayarı eklendi (proje stiliyle uyumlu), kaynaklar biçimlendirildi

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-12 01:04:48 +03:00
parent 9cbeaaaf76
commit e188922c0f
29 changed files with 547 additions and 230 deletions
+18 -4
View File
@@ -22,7 +22,11 @@ export function FormField({
hint?: string
className?: string
/** Alanı üreten fonksiyon: kimlik ve aria özelliklerini alır */
children: (field: { id: string; 'aria-invalid': boolean; 'aria-describedby'?: string }) => ReactNode
children: (field: {
id: string
'aria-invalid': boolean
'aria-describedby'?: string
}) => ReactNode
}) {
const id = useId()
const messageId = `${id}-message`
@@ -37,7 +41,10 @@ export function FormField({
'aria-describedby': message ? messageId : undefined,
})}
{message && (
<p id={messageId} className={cn('text-sm', error ? 'text-expense' : 'text-muted-foreground')}>
<p
id={messageId}
className={cn('text-sm', error ? 'text-expense' : 'text-muted-foreground')}
>
{message}
</p>
)}
@@ -50,7 +57,11 @@ export function PasswordInput(props: ComponentProps<typeof Input>) {
const [visible, setVisible] = useState(false)
return (
<div className="relative">
<Input {...props} type={visible ? 'text' : 'password'} className={cn('pr-12', props.className)} />
<Input
{...props}
type={visible ? 'text' : 'password'}
className={cn('pr-12', props.className)}
/>
<button
type="button"
onClick={() => setVisible((v) => !v)}
@@ -68,7 +79,10 @@ export function PasswordInput(props: ComponentProps<typeof Input>) {
export function FormError({ message }: { message?: string }) {
if (!message) return null
return (
<p role="alert" className="rounded-lg border border-expense/30 bg-expense/10 px-3 py-2.5 text-sm text-expense">
<p
role="alert"
className="rounded-lg border border-expense/30 bg-expense/10 px-3 py-2.5 text-sm text-expense"
>
{message}
</p>
)