@@ -281,134 +281,136 @@ export default function ManagePage() {
281281 }
282282
283283 return (
284- < div className = "min-h-screen bg-gray-50 dark:bg-gray-900" >
285- < div className = "container mx-auto p-4" >
286- { /* 页头 */ }
287- < header className = "mb-4" role = "banner" >
288- < Space direction = "vertical" size = "small" className = "w-full" >
289- < div className = "flex justify-between items-center" >
290- { /* Logo/标题 */ }
291- < div className = "flex items-center gap-3 py-2" >
292- < img
293- src = "/logo.png"
294- alt = "网站Logo"
295- className = "w-6 h-6 object-contain"
296- />
297- < h1 className = "text-lg font-bold text-gray-900 dark:text-white whitespace-nowrap" >
298- 数据管理
299- </ h1 >
300- </ div >
301- < Button
302- icon = { < ArrowLeftOutlined aria-hidden = "true" /> }
303- onClick = { handleBack }
304- type = "text"
305- aria-label = "返回主页"
306- >
307- 返回主页
308- </ Button >
309- </ div >
310- </ Space >
311- </ header >
312-
313- { /* 导入导出工具栏 */ }
314- < div className = "bg-white dark:bg-gray-800 rounded-lg shadow-sm p-4 mb-4" >
315- < div className = "flex flex-col lg:flex-row justify-between items-start lg:items-center gap-4" >
316- < div className = "flex flex-wrap items-center gap-4" >
317- < ImportExport />
318- < span className = "text-sm text-gray-600 dark:text-gray-400" >
319- 已选择 { selectedRowKeys . length } 项
320- </ span >
284+ < div className = "h-screen flex flex-col bg-(--background) transition-theme" >
285+ { /* 页头 */ }
286+ < header className = "flex-none w-full bg-(--background-main) border-b border-gray-200 dark:border-neutral-700 transition-theme" role = "banner" >
287+ < div className = "container mx-auto px-4 py-3 sm:px-8 " >
288+ < div className = "flex justify-between items-center" >
289+ { /* Logo/标题 */ }
290+ < div className = "flex items-center gap-3 py-2" >
291+ < img
292+ src = "/logo.png"
293+ alt = "网站Logo"
294+ className = "w-5 h-5 object-contain"
295+ />
296+ < h1 className = "text-base font-bold text-gray-800 dark:text-white whitespace-nowrap" >
297+ 数据管理
298+ </ h1 >
321299 </ div >
322- < div className = 'flex flex-wrap gap-2 lg:gap-4' >
323- < Button
324- danger
325- icon = { < ReloadOutlined aria-hidden = "true" /> }
326- onClick = { handleResetClick }
327- aria-label = "重置数据"
328- >
329- < span className = "hidden md:inline" > 重置数据</ span >
330- </ Button >
331- < Popconfirm
332- title = { `确定要删除选中的 ${ selectedRowKeys . length } 个链接吗?` }
333- onConfirm = { handleBatchDelete }
334- okText = "确定"
335- cancelText = "取消"
336- disabled = { selectedRowKeys . length === 0 }
337- >
338- < Button
300+ < Button
301+ icon = { < ArrowLeftOutlined aria-hidden = "true" /> }
302+ onClick = { handleBack }
303+ type = "text"
304+ aria-label = "返回主页"
305+ >
306+ 返回主页
307+ </ Button >
308+ </ div >
309+ </ div >
310+ </ header >
311+ { /* 数据表格 */ }
312+ < div className = 'flex-1 overflow-y-auto' >
313+ < div className = "container flex flex-col mx-auto p-4 sm:px-8" >
314+ { /* 导入导出工具栏 */ }
315+ < div className = "bg-white dark:bg-gray-800 rounded-lg shadow-sm p-4 mb-4" >
316+ < div className = "flex flex-col lg:flex-row justify-between items-start lg:items-center gap-4" >
317+ < div className = "flex flex-wrap items-center gap-4" >
318+ < ImportExport />
319+ < span className = "text-sm text-gray-600 dark:text-gray-400" >
320+ 已选择 { selectedRowKeys . length } 项
321+ </ span >
322+ </ div >
323+ < div className = 'flex flex-wrap gap-2 lg:gap-4' >
324+ < Button
339325 danger
340- icon = { < DeleteOutlined aria-hidden = "true" /> }
341- onClick = { handleBatchDeleteClick }
342- aria-label = { selectedRowKeys . length > 0 ? `批量删除选中的 ${ selectedRowKeys . length } 个链接` : '批量删除' }
326+ icon = { < ReloadOutlined aria-hidden = "true" /> }
327+ onClick = { handleResetClick }
328+ aria-label = "重置数据"
343329 >
344- < span className = "hidden md:inline" > 批量删除 </ span >
330+ < span className = "hidden md:inline" > 重置数据 </ span >
345331 </ Button >
346- </ Popconfirm >
347- < Button
348- icon = { < TagsOutlined aria-hidden = "true" /> }
349- onClick = { handleBatchCategoryClick }
350- aria-label = { selectedRowKeys . length > 0 ? `批量分类选中的 ${ selectedRowKeys . length } 个链接` : '批量分类' }
351- >
352- < span className = "hidden md:inline" > 批量分类</ span >
353- </ Button >
354- < Button
355- type = "primary"
356- icon = { < PlusOutlined aria-hidden = "true" /> }
357- onClick = { handleAddNew }
358- aria-label = "添加新链接"
359- >
360- < span className = "hidden sm:inline" > 添加链接</ span >
361- </ Button >
332+ < Popconfirm
333+ title = { `确定要删除选中的 ${ selectedRowKeys . length } 个链接吗?` }
334+ onConfirm = { handleBatchDelete }
335+ okText = "确定"
336+ cancelText = "取消"
337+ disabled = { selectedRowKeys . length === 0 }
338+ >
339+ < Button
340+ danger
341+ icon = { < DeleteOutlined aria-hidden = "true" /> }
342+ onClick = { handleBatchDeleteClick }
343+ aria-label = { selectedRowKeys . length > 0 ? `批量删除选中的 ${ selectedRowKeys . length } 个链接` : '批量删除' }
344+ >
345+ < span className = "hidden md:inline" > 批量删除</ span >
346+ </ Button >
347+ </ Popconfirm >
348+ < Button
349+ icon = { < TagsOutlined aria-hidden = "true" /> }
350+ onClick = { handleBatchCategoryClick }
351+ aria-label = { selectedRowKeys . length > 0 ? `批量分类选中的 ${ selectedRowKeys . length } 个链接` : '批量分类' }
352+ >
353+ < span className = "hidden md:inline" > 批量分类</ span >
354+ </ Button >
355+ < Button
356+ type = "primary"
357+ icon = { < PlusOutlined aria-hidden = "true" /> }
358+ onClick = { handleAddNew }
359+ aria-label = "添加新链接"
360+ >
361+ < span className = "hidden sm:inline" > 添加链接</ span >
362+ </ Button >
363+ </ div >
362364 </ div >
363365 </ div >
364- </ div >
365366
366- { /* 数据表格 */ }
367- < div className = "bg-white dark:bg-gray-800 rounded-lg shadow-sm px-4 pt-4" >
368- < DataTable
369- links = { links }
370- onEdit = { handleEdit }
371- onDelete = { handleDelete }
372- onEditCategory = { handleEditCategory }
373- onDeleteCategory = { handleDeleteCategory }
374- selectedRowKeys = { selectedRowKeys }
375- onSelectionChange = { setSelectedRowKeys }
367+ { /* 数据表格 */ }
368+ < div className = "bg-white dark:bg-gray-800 rounded-lg shadow-sm px-4 pt-4 mb-4" >
369+ < DataTable
370+ links = { links }
371+ onEdit = { handleEdit }
372+ onDelete = { handleDelete }
373+ onEditCategory = { handleEditCategory }
374+ onDeleteCategory = { handleDeleteCategory }
375+ selectedRowKeys = { selectedRowKeys }
376+ onSelectionChange = { setSelectedRowKeys }
377+ />
378+ </ div >
379+
380+ { /* 编辑链接弹窗 */ }
381+ < EditLinkModal
382+ open = { editModalOpen }
383+ link = { currentLink }
384+ onCancel = { handleModalCancel }
385+ onSubmit = { handleModalSubmit }
386+ />
387+
388+ { /* 编辑分类弹窗 */ }
389+ < EditCategoryModal
390+ open = { categoryEditModalOpen }
391+ category = { currentCategory }
392+ onCancel = { ( ) => {
393+ setCategoryEditModalOpen ( false ) ;
394+ setCurrentCategory ( null ) ;
395+ } }
396+ onSubmit = { handleCategorySubmit }
397+ />
398+
399+ { /* 重置数据确认对话框 */ }
400+ < ResetDataModal
401+ open = { resetModalOpen }
402+ onConfirm = { handleResetConfirm }
403+ onCancel = { handleResetCancel }
376404 />
377- </ div >
378405
379- { /* 编辑链接弹窗 */ }
380- < EditLinkModal
381- open = { editModalOpen }
382- link = { currentLink }
383- onCancel = { handleModalCancel }
384- onSubmit = { handleModalSubmit }
385- />
386-
387- { /* 编辑分类弹窗 */ }
388- < EditCategoryModal
389- open = { categoryEditModalOpen }
390- category = { currentCategory }
391- onCancel = { ( ) => {
392- setCategoryEditModalOpen ( false ) ;
393- setCurrentCategory ( null ) ;
394- } }
395- onSubmit = { handleCategorySubmit }
396- />
397-
398- { /* 重置数据确认对话框 */ }
399- < ResetDataModal
400- open = { resetModalOpen }
401- onConfirm = { handleResetConfirm }
402- onCancel = { handleResetCancel }
403- />
404-
405- { /* 批量分类弹窗 */ }
406- < BatchCategoryModal
407- open = { batchCategoryModalOpen }
408- selectedCount = { selectedRowKeys . length }
409- onCancel = { ( ) => setBatchCategoryModalOpen ( false ) }
410- onSubmit = { handleBatchCategorySubmit }
411- />
406+ { /* 批量分类弹窗 */ }
407+ < BatchCategoryModal
408+ open = { batchCategoryModalOpen }
409+ selectedCount = { selectedRowKeys . length }
410+ onCancel = { ( ) => setBatchCategoryModalOpen ( false ) }
411+ onSubmit = { handleBatchCategorySubmit }
412+ />
413+ </ div >
412414 </ div >
413415 </ div >
414416 ) ;
0 commit comments