diff --git a/app/components/MonthlyChallengeTable.tsx b/app/components/MonthlyChallengeTable.tsx index 8165b31..1441050 100644 --- a/app/components/MonthlyChallengeTable.tsx +++ b/app/components/MonthlyChallengeTable.tsx @@ -105,24 +105,21 @@ export default function MonthlyChallengeTable({ - - - - - - @@ -131,7 +128,7 @@ export default function MonthlyChallengeTable({ key={challenge.id} className={`border-b ${darkMode ? 'border-gray-800 hover:bg-gray-700' : 'border-gray-100 hover:bg-gray-50'} transition-colors`} > - - - - - - ))} diff --git a/app/page.tsx b/app/page.tsx index eaaedcd..a07085f 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -72,18 +72,8 @@ export default function HomePage() { {/* 页面标题和刷新按钮 */}

- 每月课题数据 + 每月课题

- - {!isLoading && ( - - )}
{/* 加载状态 */} diff --git a/app/photos/page.tsx b/app/photos/page.tsx index 29194ca..84ff163 100644 --- a/app/photos/page.tsx +++ b/app/photos/page.tsx @@ -2,12 +2,12 @@ import { useState, useEffect, useCallback, useRef } from 'react'; import Navbar from '@/app/components/Navbar'; -import Sidebar from '@/app/components/Sidebar'; import PhotoGallery from '@/app/components/PhotoGallery'; import PhotoDetailModal from '@/app/components/PhotoDetailModal'; import ImageModal from '@/app/components/ImageModal'; import { Photo, Pagination } from '@/app/types'; import { fetchPhotos } from '@/app/lib/api'; +import { Search } from 'lucide-react'; export default function PhotosPage() { const [photos, setPhotos] = useState([]); @@ -16,8 +16,6 @@ export default function PhotosPage() { const [searchQuery, setSearchQuery] = useState(''); const [sortBy, setSortBy] = useState('newest'); const [darkMode, setDarkMode] = useState(false); - const [sidebarCollapsed, setSidebarCollapsed] = useState(false); - const [mobileMenuOpen, setMobileMenuOpen] = useState(false); const [pagination, setPagination] = useState({ page: 1, limit: 20, @@ -101,7 +99,8 @@ export default function PhotosPage() { // 处理排序变化 const handleSortChange = useCallback((value: string) => { setSortBy(value); - }, []); + fetchPhotosData(1, false); + }, [fetchPhotosData]); // 切换暗色模式 const toggleDarkMode = () => { @@ -116,21 +115,6 @@ export default function PhotosPage() { }); }; - // 切换侧边栏收缩状态 - const toggleSidebar = () => { - setSidebarCollapsed(!sidebarCollapsed); - }; - - // 切换移动端菜单 - const toggleMobileMenu = () => { - setMobileMenuOpen(!mobileMenuOpen); - }; - - // 关闭移动端菜单 - const closeMobileMenu = () => { - setMobileMenuOpen(false); - }; - // 打开图片模态框(点击卡片时) const openImageModal = (photo: Photo) => { setSelectedPhoto(photo); @@ -165,99 +149,90 @@ export default function PhotosPage() { return (
{/* 导航栏 */} - + - {/* 移动端菜单遮罩 */} - {mobileMenuOpen && ( -
- )} + {/* 主内容区域 */} +
+ {/* 顶部控制栏 */} +
+
+
+ {/* 搜索表单 */} +
+
+ + setSearchQuery(e.target.value)} + placeholder="搜索标题或日期..." + className="w-full pl-10 pr-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent" + /> +
+ + - {/* 移动端侧边栏菜单 */} -
-
-
-

- 照片展示系统 -

- + {/* 排序选项 */} +
+ + +
+ + {/* 桌面端搜索按钮 */} + +
- {/* 移动端侧边栏内容 */} -
-
- {/* 桌面端布局 */} -
- {/* 桌面端侧边栏 */} - +
- {/* 主内容区域 */} -
- -
+ {/* 图片模态框 */} + - {/* 图片模态框 */} - - - {/* 照片详情抽屉 */} - -
+ {/* 照片详情抽屉 */} +
); } diff --git a/public/level_1.png b/public/level_1.png new file mode 100644 index 0000000..68fbab7 Binary files /dev/null and b/public/level_1.png differ diff --git a/public/level_2.png b/public/level_2.png new file mode 100644 index 0000000..68c3732 Binary files /dev/null and b/public/level_2.png differ diff --git a/public/level_3.png b/public/level_3.png new file mode 100644 index 0000000..b4168fc Binary files /dev/null and b/public/level_3.png differ diff --git a/public/level_4.png b/public/level_4.png new file mode 100644 index 0000000..66ff8e6 Binary files /dev/null and b/public/level_4.png differ diff --git a/public/level_5.png b/public/level_5.png new file mode 100644 index 0000000..dc85276 Binary files /dev/null and b/public/level_5.png differ
+ 歌曲 + 难度 + 星数 + 过关分数 + 奖励 - 创建时间 -
+
{challenge.songTitleCn} @@ -143,33 +140,34 @@ export default function MonthlyChallengeTable({ )}
-
- - 难度{challenge.difficulty} +
+
+ {`难度
+
- {challenge.stars.toFixed(1)} + {challenge.stars.toFixed(1)}
+
- {formatScore(challenge.requiredScore)} + {formatScore(challenge.requiredScore)}
+
- {formatReward(challenge)} + {formatReward(challenge)}
- {new Date(challenge.createdAt).toLocaleDateString('zh-CN')} -