From 0c3a084c9bfdfda6196ef2ebd844011fb22b5af6 Mon Sep 17 00:00:00 2001 From: xfy Date: Fri, 5 Jun 2026 17:37:37 +0800 Subject: [PATCH] feat(admin): add edit button to post list --- src/pages/admin/posts.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/admin/posts.rs b/src/pages/admin/posts.rs index 1483241..953707a 100644 --- a/src/pages/admin/posts.rs +++ b/src/pages/admin/posts.rs @@ -124,7 +124,12 @@ fn PostRow(post: Post, deleting: bool, on_delete: EventHandler) -> Element td { class: "px-4 py-3 text-gray-500 dark:text-[#9b9c9d]", "{date_str}" } - td { class: "px-4 py-3 text-right", + td { class: "px-4 py-3 text-right space-x-3", + Link { + class: "text-xs text-gray-600 dark:text-[#9b9c9d] hover:text-gray-900 dark:hover:text-[#dadadb] transition-colors cursor-pointer", + to: Route::WriteEdit { id: post.id }, + "编辑" + } button { class: if deleting { "text-xs text-gray-400 cursor-not-allowed"