feat(web): add i18n locale routes and language switcher component

Add locale-prefixed routes for admin, auth, dashboard, and public pages.
Add error, loading, and not-found pages for locale context. Add language
switcher UI component for Vietnamese/English toggle.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-09 09:44:18 +07:00
parent 2250e17a09
commit 7195064f12
43 changed files with 7418 additions and 1 deletions

View File

@@ -0,0 +1,40 @@
export default function AuthLoading() {
return (
<div className="rounded-lg border bg-card p-8 shadow-sm">
<div className="space-y-6">
{/* Logo / title skeleton */}
<div className="text-center">
<div className="mx-auto h-8 w-24 animate-pulse rounded bg-muted" />
<div className="mx-auto mt-3 h-5 w-40 animate-pulse rounded bg-muted" />
<div className="mx-auto mt-2 h-4 w-56 animate-pulse rounded bg-muted" />
</div>
{/* Form fields skeleton */}
<div className="space-y-4">
<div>
<div className="h-4 w-16 animate-pulse rounded bg-muted" />
<div className="mt-2 h-10 w-full animate-pulse rounded-md bg-muted" />
</div>
<div>
<div className="h-4 w-20 animate-pulse rounded bg-muted" />
<div className="mt-2 h-10 w-full animate-pulse rounded-md bg-muted" />
</div>
</div>
{/* Submit button skeleton */}
<div className="h-10 w-full animate-pulse rounded-md bg-muted" />
{/* OAuth buttons skeleton */}
<div className="space-y-3">
<div className="flex items-center gap-3">
<div className="h-px flex-1 bg-muted" />
<div className="h-3 w-12 animate-pulse rounded bg-muted" />
<div className="h-px flex-1 bg-muted" />
</div>
<div className="h-10 w-full animate-pulse rounded-md bg-muted" />
<div className="h-10 w-full animate-pulse rounded-md bg-muted" />
</div>
</div>
</div>
);
}