#![recursion_limit = "256"] //! Admin UI crate for Chattyness. //! //! This crate provides the Leptos-based admin interface that can be used by: //! - The Owner App (:3001) with `chattyness_owner` DB role (no RLS) //! - The Admin App (:3000/admin) with `chattyness_app` DB role (RLS enforced) //! //! The UI components are the same; only the database connection differs. //! //! ## Usage //! //! For standalone use (e.g., chattyness-owner): //! ```ignore //! use chattyness_admin_ui::AdminApp; //! // AdminApp includes its own Router //! ``` //! //! For embedding in a combined app (e.g., chattyness-app): //! ```ignore //! use chattyness_admin_ui::AdminRoutes; //! // AdminRoutes can be placed inside an existing Router //! ``` pub mod api; pub mod app; pub mod auth; pub mod components; pub mod hooks; pub mod models; pub mod pages; pub mod routes; pub mod utils; pub use app::{AdminApp, admin_shell}; pub use routes::AdminRoutes; // Re-export commonly used items for convenience pub use components::{ Alert, Card, DeleteConfirmation, DetailGrid, DetailItem, EmptyState, LoadingSpinner, MessageAlert, MessageAlertRw, NsfwBadge, PageHeader, Pagination, PrivacyBadge, RoleBadge, SearchForm, StatusBadge, SubmitButton, TempPasswordDisplay, }; pub use hooks::{PaginationState, use_fetch, use_fetch_if, use_message, use_pagination}; pub use models::*; pub use utils::{build_bounds_wkt, build_paginated_url, get_api_base, parse_bounds_wkt}; #[cfg(feature = "hydrate")] pub use utils::{confirm, navigate_to, reload_page}; #[cfg(feature = "ssr")] pub use app::AdminAppState;