burncloud_client_shared/components/
layout.rs

1use dioxus::prelude::*;
2use dioxus_router::prelude::*;
3
4use crate::styles::FLUENT_CSS;
5use super::sidebar::Sidebar;
6use super::title_bar::TitleBar;
7use super::placeholders::{Dashboard, ModelManagement, DeployConfig, ServiceMonitor, ApiManagement, SystemSettings};
8
9#[derive(Clone, Routable, Debug, PartialEq)]
10pub enum CoreRoute {
11    #[layout(Layout)]
12    #[route("/")]
13    Dashboard {},
14    #[route("/models")]
15    ModelManagement {},
16    #[route("/deploy")]
17    DeployConfig {},
18    #[route("/monitor")]
19    ServiceMonitor {},
20    #[route("/api")]
21    ApiManagement {},
22    #[route("/settings")]
23    SystemSettings {},
24}
25
26#[component]
27pub fn Layout() -> Element {
28    rsx! {
29        head {
30            style { "{FLUENT_CSS}" }
31        }
32        div { class: "app-container",
33            TitleBar {}
34            div { class: "app-body",
35                Sidebar {}
36                main { class: "main-content",
37                    Outlet::<CoreRoute> {}
38                }
39            }
40        }
41    }
42}