diff --git a/src/api/posts.rs b/src/api/posts.rs index 92ef091..9cc18e4 100644 --- a/src/api/posts.rs +++ b/src/api/posts.rs @@ -565,7 +565,6 @@ async fn row_to_post_full(client: &tokio_postgres::Client, row: &tokio_postgres: // ============================================================================ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] -#[allow(dead_code)] pub struct CreatePostRequest { pub title: String, pub slug: Option, diff --git a/src/components/admin_skeleton.rs b/src/components/admin_skeleton.rs index 1f5caf1..2910754 100644 --- a/src/components/admin_skeleton.rs +++ b/src/components/admin_skeleton.rs @@ -39,40 +39,4 @@ pub fn AdminDashboardSkeleton() -> Element { } } -/// 完整的仪表盘页面骨架(含 header/footer + 内容) -#[component] -pub fn AdminSkeleton() -> Element { - rsx! { - div { class: "min-h-screen flex flex-col bg-white dark:bg-[#1d1e20]", - // Header 骨架 - header { class: "sticky top-0 z-40 w-full border-b border-gray-200 dark:border-[#333] bg-white/80 dark:bg-[#1d1e20]/80 backdrop-blur-sm", - nav { class: "max-w-3xl mx-auto px-6 h-[60px] flex items-center justify-between", - // Logo 占位 - SkeletonBox { class: "w-32 h-7 rounded" } - // 导航项 + 右侧按钮占位 - div { class: "flex items-center gap-4", - div { class: "hidden md:flex items-center gap-2", - SkeletonBox { class: "w-12 h-5 rounded" } - SkeletonBox { class: "w-12 h-5 rounded" } - SkeletonBox { class: "w-10 h-5 rounded" } - } - SkeletonBox { class: "w-10 h-5 rounded" } - } - } - } - // 内容区骨架 - main { class: "flex-1 w-full max-w-5xl mx-auto px-6 py-8", - AdminDashboardSkeleton {} - } - - // Footer 骨架 - footer { class: "w-full border-t border-gray-200 dark:border-[#333] py-6", - div { class: "max-w-3xl mx-auto px-6 flex justify-between items-center", - SkeletonBox { class: "h-4 w-32 rounded" } - SkeletonBox { class: "h-4 w-24 rounded" } - } - } - } - } -} diff --git a/src/components/post/post_nav_links.rs b/src/components/post/post_nav_links.rs index 3a2b75d..2e7e9ce 100644 --- a/src/components/post/post_nav_links.rs +++ b/src/components/post/post_nav_links.rs @@ -6,21 +6,13 @@ use crate::router::Route; #[component] pub fn PostNavLinks(prev: Option, next: Option) -> Element { - if let Some(ref p) = prev { - println!("[PostNavLinks] prev={} {}", p.slug, p.title); - } - if let Some(ref n) = next { - println!("[PostNavLinks] next={} {}", n.slug, n.title); - } rsx! { nav { class: "paginav", if let Some(prev_post) = prev { Link { class: "prev", to: Route::PostDetail { slug: prev_post.slug.clone() }, - onclick: move |evt: dioxus::events::MouseEvent| { - println!("[PostNavLinks] clicked prev: {}", prev_post.slug); - }, + onclick: move |_evt: dioxus::events::MouseEvent| {}, span { class: "title", "« Prev" } span { class: "post-title-nav", "{prev_post.title}" } } @@ -32,9 +24,7 @@ pub fn PostNavLinks(prev: Option, next: Option) -> Element { Link { class: "next", to: Route::PostDetail { slug: next_post.slug.clone() }, - onclick: move |evt: dioxus::events::MouseEvent| { - println!("[PostNavLinks] clicked next: {}", next_post.slug); - }, + onclick: move |_evt: dioxus::events::MouseEvent| {}, span { class: "title", "Next »" } span { class: "post-title-nav", "{next_post.title}" } }