diff --git a/frontend/src/app.rs b/frontend/src/app.rs index f51a095..e37ee3b 100644 --- a/frontend/src/app.rs +++ b/frontend/src/app.rs @@ -1,12 +1,13 @@ use crate::components::layout::protected::Protected; use crate::components::ui::skeleton::Skeleton; +use crate::components::ui::card::{Card, CardHeader, CardContent}; use crate::components::torrent::table::TorrentTable; use crate::components::auth::login::Login; use crate::components::auth::setup::Setup; use leptos::prelude::*; use leptos::task::spawn_local; use leptos_router::components::{Router, Routes, Route}; -use leptos_router::hooks::use_navigate; +use leptos_router::hooks::{use_navigate, use_location}; use crate::components::ui::toast::Toaster; use crate::components::hooks::use_theme_mode::ThemeMode; @@ -31,7 +32,9 @@ pub fn App() -> impl IntoView { view! { - + + + } } @@ -39,6 +42,7 @@ pub fn App() -> impl IntoView { fn InnerApp() -> impl IntoView { crate::store::provide_torrent_store(); let store = use_context::(); + let loc = use_location(); let is_loading = signal(true); let is_authenticated = signal(false); @@ -98,98 +102,150 @@ fn InnerApp() -> impl IntoView { view! {
- - "404 Not Found"
}> - } - } /> - } - } /> + "404 Not Found" }> + } + } /> + } + } /> - - // Sidebar skeleton -
- -
- - - - - - -
+ } + }); + + view! { + + + + + + + + +
+ + +
+
+ + +
+ +
+
- // Main content skeleton -
-
- - -
-
-
- - - - - - -
-
- -
-
- - }.into_any()> - - -
-
- + }.into_any() + } else { + // Dashboard Skeleton + view! { +
+ // Sidebar skeleton +
+ +
+ + + + + +
- - + // Main content skeleton +
+
+ + +
+
+
+ + + + + + +
+
+ +
+
+
+ }.into_any() + } + }> + + +
+
+ +
+
+
- }.into_any() - }/> + + }.into_any() + }/> + + + + +
"Settings Page (Coming Soon)"
+
+
+ + } + }/> + +
+ } +}