diff --git a/README.md b/README.md index 14e6b05..f16b892 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
-![](https://p.weizwz.com/nav/20251119_170634_d89c36024f0efbc4.webp) +![](https://p.weizwz.com/nav/20251120_110028_78c15d3713752f31.webp) 现代化的个人前端导航网站,为开发者提供高效、美观的资源导航体验 diff --git a/app/globals.css b/app/globals.css index 00b37cc..d13c46d 100644 --- a/app/globals.css +++ b/app/globals.css @@ -322,23 +322,6 @@ select:focus-visible { transition: none; } -/* DataTable 分类行样式 */ -.category-row > td { - background-color: #eff6ff !important; -} - -.dark .category-row > td { - background-color: rgba(30, 58, 138, 0.3) !important; -} - -.category-row:hover > td { - background-color: #dbeafe !important; -} - -.dark .category-row:hover > td { - background-color: rgba(30, 64, 175, 0.4) !important; -} - /* PWA 安装提示动画 */ @keyframes slide-up { from { diff --git a/app/manage/page.tsx b/app/manage/page.tsx index 56c9c50..2fbe708 100644 --- a/app/manage/page.tsx +++ b/app/manage/page.tsx @@ -281,134 +281,136 @@ export default function ManagePage() { } return ( -
-
- {/* 页头 */} -
- -
- {/* Logo/标题 */} -
- 网站Logo -

- 数据管理 -

-
- -
-
-
- - {/* 导入导出工具栏 */} -
-
-
- - - 已选择 {selectedRowKeys.length} 项 - +
+ {/* 页头 */} +
+
+
+ {/* Logo/标题 */} +
+ 网站Logo +

+ 数据管理 +

-
- - - +
+
+
+ {/* 数据表格 */} +
+
+ {/* 导入导出工具栏 */} +
+
+
+ + + 已选择 {selectedRowKeys.length} 项 + +
+
+ - - - + + + + + +
-
- {/* 数据表格 */} -
- + +
+ + {/* 编辑链接弹窗 */} + + + {/* 编辑分类弹窗 */} + { + setCategoryEditModalOpen(false); + setCurrentCategory(null); + }} + onSubmit={handleCategorySubmit} + /> + + {/* 重置数据确认对话框 */} + -
- {/* 编辑链接弹窗 */} - - - {/* 编辑分类弹窗 */} - { - setCategoryEditModalOpen(false); - setCurrentCategory(null); - }} - onSubmit={handleCategorySubmit} - /> - - {/* 重置数据确认对话框 */} - - - {/* 批量分类弹窗 */} - setBatchCategoryModalOpen(false)} - onSubmit={handleBatchCategorySubmit} - /> + {/* 批量分类弹窗 */} + setBatchCategoryModalOpen(false)} + onSubmit={handleBatchCategorySubmit} + /> +
); diff --git a/app/page.tsx b/app/page.tsx index 6a7d883..872d65e 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -146,7 +146,7 @@ export default function Home() { ); return ( -
+
{/* 固定顶部 Header */}
setDrawerOpen(true)} /> diff --git a/components/layout/Header.tsx b/components/layout/Header.tsx index c82b8d1..1d233d6 100644 --- a/components/layout/Header.tsx +++ b/components/layout/Header.tsx @@ -3,7 +3,7 @@ import React, { memo, useCallback } from 'react'; import { useRouter } from 'next/navigation'; import { Button, Tooltip } from 'antd'; -import { EditOutlined, MenuOutlined, GithubOutlined } from '@ant-design/icons'; +import { MenuOutlined, GithubOutlined, SettingOutlined } from '@ant-design/icons'; import SearchBar from './SearchBar'; import ThemeToggle from './ThemeToggle'; @@ -37,7 +37,7 @@ const Header = memo(function Header({ onMenuClick }: HeaderProps) { className="w-full bg-(--background-main) border-b border-gray-200 dark:border-neutral-700 transition-theme" role="banner" > -
+
{/* Desktop 布局 */}
{/* Logo/标题 */} @@ -45,9 +45,9 @@ const Header = memo(function Header({ onMenuClick }: HeaderProps) { 网站Logo -

+

唯知导航

@@ -58,70 +58,58 @@ const Header = memo(function Header({ onMenuClick }: HeaderProps) {
{/* 右侧工具栏 */} -
+
{/* Mobile 布局 */} -
+
{/* 顶部行:标题和工具栏 */}
网站Logo -

+

唯知导航

-
+
{onMenuClick && (
{/* 搜索栏 - 全宽 */} -
+
diff --git a/components/layout/SearchBar.tsx b/components/layout/SearchBar.tsx index ab4df92..8e453a9 100644 --- a/components/layout/SearchBar.tsx +++ b/components/layout/SearchBar.tsx @@ -157,8 +157,8 @@ export default function SearchBar() { return (
} - className="search-bar-modern" - style={{ - borderRadius: '24px', - paddingLeft: '12px', - }} + className="search-bar-modern bg-(--background)! pl-3! shadow-none!" aria-label="搜索输入框" role="searchbox" aria-describedby="search-description" diff --git a/components/layout/ThemeToggle.tsx b/components/layout/ThemeToggle.tsx index d3988e9..fb29e0b 100644 --- a/components/layout/ThemeToggle.tsx +++ b/components/layout/ThemeToggle.tsx @@ -76,16 +76,12 @@ export default function ThemeToggle() {
), }, { title: '操作', key: 'action', - width: 150, + width: 120, fixed: 'right', render: (_, record: TreeNode) => { if (record.isCategory) { @@ -218,7 +239,7 @@ export const DataTable: React.FC = ({ if (record.id === 'uncategorized') { return -; } - + // 分类节点的操作 const category: Category = { id: record.id, @@ -228,7 +249,7 @@ export const DataTable: React.FC = ({ createdAt: record.createdAt, updatedAt: record.updatedAt, }; - + return ( ); } - + // 链接节点的操作 return ( @@ -280,12 +296,7 @@ export const DataTable: React.FC = ({ okText="确定" cancelText="取消" > - @@ -300,7 +311,7 @@ export const DataTable: React.FC = ({ selectedRowKeys, onChange: (newSelectedRowKeys: React.Key[]) => { // 过滤掉分类节点 - const linkKeys = newSelectedRowKeys.filter(key => !String(key).startsWith('category-')); + const linkKeys = newSelectedRowKeys.filter((key) => !String(key).startsWith('category-')); if (onSelectionChange) { onSelectionChange(linkKeys); } else { @@ -321,15 +332,12 @@ export const DataTable: React.FC = ({ rowKey="key" size="middle" rowSelection={rowSelection} - rowClassName={(record) => - record.isCategory - ? 'category-row' - : '' - } + rowClassName={(record) => (record.isCategory ? 'category-row' : '')} expandable={{ expandedRowKeys, + indentSize: 0, onExpandedRowsChange: (keys) => setExpandedRowKeys([...keys]), - defaultExpandAllRows: true, + // defaultExpandAllRows: true, }} pagination={{ current: currentPage, @@ -347,7 +355,6 @@ export const DataTable: React.FC = ({ pageSizeOptions: ['10', '20', '50', '100'], }} scroll={{ x: 1200 }} - className="[&_.ant-empty]:z-0 [&_.category-row>td]:bg-blue-50! [&_.category-row>td]:dark:bg-blue-900/30! [&_.category-row:hover>td]:bg-blue-100! [&_.category-row:hover>td]:dark:bg-blue-800/40!" />
); diff --git a/components/modals/EditLinkModal.tsx b/components/modals/EditLinkModal.tsx index 1825319..3066bf1 100644 --- a/components/modals/EditLinkModal.tsx +++ b/components/modals/EditLinkModal.tsx @@ -367,7 +367,34 @@ export const EditLinkModal: React.FC = ({ - + + + + + + + {supportsEyeDropper && ( +