feat: use constant dashboard skeleton for all loading states (Standard 1)
All checks were successful
Build MIPS Binary / build (push) Successful in 12m58s
All checks were successful
Build MIPS Binary / build (push) Successful in 12m58s
This commit is contained in:
@@ -146,36 +146,10 @@ fn InnerApp() -> impl IntoView {
|
|||||||
});
|
});
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<Show when=move || !is_loading.0.get() fallback=move || {
|
<Show when=move || !is_loading.0.get() fallback=|| {
|
||||||
let path = loc.pathname.get();
|
// Standard 1: Always show Dashboard Skeleton
|
||||||
if path == "/login" {
|
|
||||||
// Login Skeleton
|
|
||||||
view! {
|
view! {
|
||||||
<div class="flex items-center justify-center min-h-screen bg-muted/40 px-4">
|
<div class="flex h-screen bg-background text-foreground overflow-hidden">
|
||||||
<Card class="w-full max-w-sm shadow-lg border-none">
|
|
||||||
<CardHeader class="pb-2 items-center space-y-4">
|
|
||||||
<Skeleton class="w-12 h-12 rounded-xl" />
|
|
||||||
<Skeleton class="h-8 w-32" />
|
|
||||||
<Skeleton class="h-4 w-48" />
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent class="pt-4 space-y-6">
|
|
||||||
<div class="space-y-2">
|
|
||||||
<Skeleton class="h-4 w-24" />
|
|
||||||
<Skeleton class="h-10 w-full" />
|
|
||||||
</div>
|
|
||||||
<div class="space-y-2">
|
|
||||||
<Skeleton class="h-4 w-24" />
|
|
||||||
<Skeleton class="h-10 w-full" />
|
|
||||||
</div>
|
|
||||||
<Skeleton class="h-10 w-full rounded-md mt-4" />
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
}.into_any()
|
|
||||||
} else {
|
|
||||||
// Dashboard Skeleton
|
|
||||||
view! {
|
|
||||||
<div class="flex h-screen bg-background">
|
|
||||||
// Sidebar skeleton
|
// Sidebar skeleton
|
||||||
<div class="w-56 border-r border-border p-4 space-y-4">
|
<div class="w-56 border-r border-border p-4 space-y-4">
|
||||||
<Skeleton class="h-8 w-3/4" />
|
<Skeleton class="h-8 w-3/4" />
|
||||||
@@ -189,7 +163,7 @@ fn InnerApp() -> impl IntoView {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
// Main content skeleton
|
// Main content skeleton
|
||||||
<div class="flex-1 flex flex-col">
|
<div class="flex-1 flex flex-col min-w-0">
|
||||||
<div class="border-b border-border p-4 flex items-center gap-4">
|
<div class="border-b border-border p-4 flex items-center gap-4">
|
||||||
<Skeleton class="h-8 w-48" />
|
<Skeleton class="h-8 w-48" />
|
||||||
<Skeleton class="h-8 w-64" />
|
<Skeleton class="h-8 w-64" />
|
||||||
@@ -209,7 +183,6 @@ fn InnerApp() -> impl IntoView {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}.into_any()
|
}.into_any()
|
||||||
}
|
|
||||||
}>
|
}>
|
||||||
<Show when=move || is_authenticated.0.get() fallback=|| ()>
|
<Show when=move || is_authenticated.0.get() fallback=|| ()>
|
||||||
<Protected>
|
<Protected>
|
||||||
|
|||||||
Reference in New Issue
Block a user