From 077573af673fd620aea8ca8b9e75498761b61e57 Mon Sep 17 00:00:00 2001 From: xfy Date: Fri, 5 Jun 2026 17:55:18 +0800 Subject: [PATCH] fix(layout): highlight write nav for both /write and /write/:id --- src/components/admin_layout.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/admin_layout.rs b/src/components/admin_layout.rs index a939bfe..b990c4c 100644 --- a/src/components/admin_layout.rs +++ b/src/components/admin_layout.rs @@ -46,7 +46,7 @@ pub fn AdminLayout() -> Element { NavItemConfig { route: Route::Write {}, label: "写文章", - is_active: matches!(route, Route::Write {}), + is_active: matches!(route, Route::Write {}) || matches!(route, Route::WriteEdit { .. }), }, NavItemConfig { route: Route::Posts {},