Skip to main content

yggdrasil/pages/admin/
mod.rs

1//! 管理后台页面模块。
2//!
3//! `AdminShellRoute` 是 `/admin` 的懒加载父路由,视图渲染后台外壳(`AdminLayout`),
4//! 子路由出口 `<Outlet/>` 在外壳内部。
5
6use leptos::prelude::*;
7use leptos_router::{lazy_route, LazyRoute};
8
9use crate::components::admin_layout::AdminLayout;
10
11pub mod assets;
12pub mod comments;
13pub mod dashboard;
14pub mod friends;
15pub mod logs;
16pub mod mcp;
17mod note_drafts;
18pub mod note_editor;
19pub mod notes;
20pub mod posts;
21pub mod posts_trash;
22pub mod preview;
23pub mod profile;
24pub mod runner;
25pub mod settings;
26pub mod system;
27pub mod write;
28
29pub struct AdminShellRoute;
30
31#[lazy_route]
32impl LazyRoute for AdminShellRoute {
33    fn data() -> Self {
34        crate::static_assets::ensure_admin_css();
35        Self
36    }
37
38    fn view(_this: Self) -> AnyView {
39        view! { <AdminLayout/> }.into_any()
40    }
41}