From 3a341393efc25fde3457f8118039d7f0402db438 Mon Sep 17 00:00:00 2001 From: msksbr515 Date: Sun, 24 May 2026 21:51:29 +0800 Subject: [PATCH] feat(admin): add search with submit and safe-area layout Add submit-based search to admin books page and switch borrows search from debounced to submit-based for consistency. Update layout headers and nav bars to respect mobile safe-area insets via CSS custom properties. --- index.html | 2 +- src/components/layout/AdminLayout.tsx | 4 +- src/components/layout/AppLayout.tsx | 2 +- src/features/admin/AdminBooksPage.tsx | 220 ++++++++++++--------- src/features/admin/AdminBorrowsPage.tsx | 179 +++++++++-------- src/features/admin/hooks.ts | 10 +- src/features/books/BooksPage.tsx | 201 +++++++++++-------- src/features/books/hooks.ts | 10 +- src/features/borrows/MyBorrowsPage.tsx | 253 ++++++++++++++---------- src/features/borrows/hooks.ts | 10 +- src/hooks/useIsMobile.ts | 24 +++ src/hooks/usePlatform.tsx | 38 ++-- src/index.css | 22 ++- src/main.tsx | 2 + 14 files changed, 576 insertions(+), 401 deletions(-) diff --git a/index.html b/index.html index ff93803..5723adf 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - + Tauri + React + Typescript diff --git a/src/components/layout/AdminLayout.tsx b/src/components/layout/AdminLayout.tsx index 94af0c4..e7bd075 100644 --- a/src/components/layout/AdminLayout.tsx +++ b/src/components/layout/AdminLayout.tsx @@ -59,7 +59,7 @@ export default function AdminLayout() { return (
-
+
管理后台
{username} @@ -71,7 +71,7 @@ export default function AdminLayout() {
-