- Add admin book borrowing dialog with user selection
- Add useAdminBorrowBook mutation with success/error toasts
- Fix sidebar z-index layering on admin layout
- Add RootRedirect component that routes based on admin role
1. **AdminLayout.tsx** - Major changes:
- Added imports for `NavLink`, `useNavigate`, `BookOpenIcon`, `ListIcon`, `LogOutIcon`, `Button`, `useAuthStore`, `usePlatform`
- Added navigation items array with book management and borrow management
- Added admin layout with sidebar navigation, header with username, and logout functionality
- Added responsive layout for desktop/mobile
2. **router/index.tsx** - Changes:
- Removed placeholder components (`AdminBooksPage`, `AdminBorrowsPage`, `AdminIndexPage`)
- Added imports from actual admin feature pages
- Updated routes to use real admin layout and pages
This is clearly a **feat** (new feature) commit, adding admin layout with navigation and routing to real pages. The scope would be **admin** or **ui**.
The key changes are:
- Adding admin sidebar navigation with book/borrow management links
- Adding logout functionality with username display
- Replacing placeholder admin page components with real page implementations
- Integrating admin layout with the router
Let me write a concise commit message following the rules.","signature":"2099424a-0948-4423-a191-3c37d24e52ed"}],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":25016,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":0,"service_tier":"standard"},"context_management":null},"parent_tool_use_id":null,"session_id":"bf312622-fae8-446d-8b67-c708b9d3a022","uuid":"50eb9e22-cc58-4b45-8f03-95386c522466"}{"type":"assistant","message":{"id":"2099424a-0948-4423-a191-3c37d24e52ed","type":"message","role":"assistant","model":"deepseek-v4-flash","content":[{"type":"text","text":"<commit>
feat(admin): add sidebar navigation and real page routes
Implement admin layout with sidebar navigation for book and borrow
management, including logout functionality and username display.
Replace placeholder admin page components with actual page routes."}],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":25016,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":0,"service_tier":"standard"},"context_management":null},"parent_tool_use_id":null,"session_id":"bf312622-fae8-446d-8b67-c708b9d3a022","uuid":"1ca45e82-b885-4fa0-b886-fdfced0dc2e4"}<commit>
1. **AdminLayout.tsx** - Major changes:
- Added imports for `NavLink`, `useNavigate`, `BookOpenIcon`, `ListIcon`, `LogOutIcon`, `Button`, `useAuthStore`, `usePlatform`
- Added navigation items array with book management and borrow management
- Added admin layout with sidebar navigation, header with username, and logout functionality
- Added responsive layout for desktop/mobile
2. **router/index.tsx** - Changes:
- Removed placeholder components (`AdminBooksPage`, `AdminBorrowsPage`, `AdminIndexPage`)
- Added imports from actual admin feature pages
- Updated routes to use real admin layout and pages
This is clearly a **feat** (new feature) commit, adding admin layout with navigation and routing to real pages. The scope would be **admin** or **ui**.
The key changes are:
- Adding admin sidebar navigation with book/borrow management links
- Adding logout functionality with username display
- Replacing placeholder admin page components with real page implementations
- Integrating admin layout with the router
Let me write a concise commit message following the rules.","signature":"2099424a-0948-4423-a191-3c37d24e52ed"}],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":25016,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":0,"service_tier":"standard"},"context_management":null},"parent_tool_use_id":null,"session_id":"bf312622-fae8-446d-8b67-c708b9d3a022","uuid":"50eb9e22-cc58-4b45-8f03-95386c522466"}{"type":"assistant","message":{"id":"2099424a-0948-4423-a191-3c37d24e52ed","type":"message","role":"assistant","model":"deepseek-v4-flash","content":[{"type":"text","text":"<commit>
feat(admin): add sidebar navigation and real page routes
Implement admin layout with sidebar navigation for book and borrow
management, including logout functionality and username display.
Replace placeholder admin page components with actual page routes."}],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":25016,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":0,"service_tier":"standard"},"context_management":null},"parent_tool_use_id":null,"session_id":"bf312622-fae8-446d-8b67-c708b9d3a022","uuid":"1ca45e82-b885-4fa0-b886-fdfced0dc2e4"}<commit>
- Add sticky header with book management nav links and logout button
- Replace placeholder page components with real feature imports
- Add login page route to router
- Fix date-time formatting for consistent YYYY-MM-DD HH:mm output
Replace raw axios promise returns with async functions that unwrap
response data, providing stronger type guarantees at call sites.
- Unwrap `res.data.data` in all API functions instead of exposing
AxiosResponse to consumers
- Add missing return types (LoginVo, BorrowInfoVo, Book, etc.)
- Convert all exported functions to async syntax
Replace raw axios promise returns with async functions that unwrap
response data, providing stronger type guarantees at call sites.
- Unwrap `res.data.data` in all API functions instead of exposing
AxiosResponse to consumers
- Add missing return types (LoginVo, BorrowInfoVo, Book, etc.)
- Convert all exported functions to async syntax
- Replace Vite boilerplate with React Router for page navigation
- Add React Query for server state and cache management
- Integrate shadcn/ui component library with Tailwind CSS v4
- Configure @/ path alias for clean module imports
- Set up Vite dev proxy to API backend
- Remove default App.css, App.tsx, and react.svg assets