//! Admin routes without Router wrapper (for embedding in combined apps). //! //! This module provides the `AdminRoutes` component which contains all admin //! route definitions without a Router wrapper. This allows the routes to be //! embedded in a parent Router (e.g., CombinedApp in chattyness-app). //! //! For standalone use (e.g., chattyness-owner), use `AdminApp` which wraps //! these routes with a Router. use leptos::prelude::*; use leptos_router::{ ParamSegment, StaticSegment, components::{Route, Routes}, }; use crate::components::{AuthenticatedLayout, LoginLayout}; use crate::pages::{ ConfigPage, DashboardPage, LoginPage, PropsDetailPage, PropsNewPage, PropsPage, RealmDetailPage, RealmNewPage, RealmsPage, SceneDetailPage, SceneNewPage, ScenesPage, StaffPage, UserDetailPage, UserNewPage, UsersPage, }; /// Admin routes that can be embedded in a parent Router. /// /// All paths are relative to the Router's base path. When used in: /// - `AdminApp`: The Router is configured with base="/admin" /// - `CombinedApp`: The Router should be configured with base="/admin" #[component] pub fn AdminRoutes() -> impl IntoView { view! { // Login page (no layout) } /> // Dashboard } /> // Config } /> // Users } /> } /> } /> // Staff } /> // Props } /> } /> } /> // Realms } /> } /> // Scenes (nested under realms) } /> } /> } /> // Realm detail (must come after more specific realm routes) } /> } }