Commit Graph

70 Commits

Author SHA1 Message Date
5df11e5b00 fix: 修复 CI/CD 部署中的权限问题
- 使用 sudo 创建部署目录并设置正确的所有者权限
- 在 rsync 前确保目录归用户所有
- 添加最终权限设置确保文件可访问
- 修复了 "Permission denied" 错误

现在部署过程会:
1. 用 sudo 创建目录
2. 设置目录所有者为部署用户
3. 执行 rsync 上传文件
4. 最终设置正确的文件权限
2025-07-09 09:44:33 +08:00
a60c886c1b fix: 配置 Next.js 静态导出解决 CI/CD 部署问题
Some checks failed
Deploy Frontend / deploy (push) Has been cancelled
- 在 next.config.mjs 中添加 output: 'export' 配置
- 设置 distDir: 'out' 指定输出目录
- 添加 trailingSlash: true 优化静态文件服务
- 现在构建会生成 frontend/out 目录供 CI/CD 部署使用

修复了 rsync 找不到 frontend/out 目录的问题
2025-07-09 09:32:12 +08:00
fe59c8b499 feat: 添加 pre-commit hooks 配置
- 安装 husky 和 lint-staged 用于 Git hooks 管理
- 配置 pre-commit 检查:ESLint、TypeScript、Prettier
- 添加 Prettier 代码格式化配置和插件
- 更新项目文档说明 pre-commit 工作流程
- 配置文件包括:
  - .husky/pre-commit: Git pre-commit hook 脚本
  - lint-staged.config.js: lint-staged 配置
  - frontend/.prettierrc: Prettier 配置
  - frontend/.prettierignore: Prettier 忽略文件

现在每次提交前会自动运行代码检查和格式化
2025-07-09 09:29:33 +08:00
fc90eb3fa9 test: test pre-commit hooks on TypeScript file 2025-07-09 09:28:16 +08:00
b210b3b3e7 test: test pre-commit hooks 2025-07-09 09:27:55 +08:00
17bbb92da1 fix: 修复 navigation.tsx 中的 TypeScript 类型错误
Some checks failed
Deploy Frontend / deploy (push) Failing after 2m58s
- 修正 handleTabClick 函数的参数类型定义
- 将 icon 属性改为 href 属性以匹配实际的 navItems 数据结构
- 现在类型检查可以正常通过
2025-07-09 09:22:29 +08:00
0e9d9b9010 fix: 修复 ESLint 配置和代码检查错误
Some checks failed
Deploy Frontend / deploy (push) Failing after 1m39s
- 安装 ESLint 和 eslint-config-next 依赖
- 创建 .eslintrc.json 配置文件,使用 Next.js 严格模式
- 修复 TypeScript 代码中的类型错误:
  - 移除 any 类型,使用具体的类型定义
  - 修复未使用的函数参数和变量
  - 优化组件类型定义
- 现在 CI/CD 可以成功通过 lint 检查
2025-07-09 09:10:11 +08:00
9376a67052 init doc 2025-07-09 00:13:41 +08:00
0bfcbe54b1 fix bug
Some checks failed
Deploy Frontend / deploy (push) Failing after 3m31s
2025-07-08 23:52:09 +08:00
36eec64f92 更新 frontend/bun.sh
Some checks failed
Deploy Frontend / deploy (push) Failing after 1m44s
2025-07-08 14:06:30 +00:00
a7d7924047 更新 .gitignore 2025-07-08 14:05:53 +00:00
a90ce51709 更新 frontend/bun.sh
Some checks failed
Deploy Frontend / deploy (push) Has been cancelled
2025-07-08 13:32:10 +00:00
6a33450923 feat: add Gitea workflow for frontend deployment
- Add automated deployment workflow for frontend directory changes
- Support password authentication with sshpass
- Deploy to /data/photography directory on server
- Configure Caddy server reload after deployment
- Include build, type check, and lint steps
2025-07-08 18:51:25 +08:00
60742fd563 fix: correct .gitignore formatting 2025-07-08 17:44:53 +08:00
80622be036 feat: add frontend/node_modules to gitignore 2025-07-08 17:44:25 +08:00
55932ee587 feat: improve hydration handling and add dependencies
- Add hydration state check to PhotoGallery component to prevent SSR/client mismatch
- Update bun.lock with Express and CORS dependencies for mock API
- Add placeholder image for better development experience
2025-07-08 17:39:12 +08:00
4d85b6bd24 feat: add comprehensive .gitignore file
- Ignore node_modules, build files, and dependencies
- Exclude environment files and IDE configurations
- Add backend and admin specific ignores for future development
- Cover OS generated files and temporary files
2025-07-08 17:36:52 +08:00
8c5c9a5f8e fix: resolve hydration mismatch error and improve project setup
- Fix React hydration mismatch in ThemeProvider with mounted state check
- Update layout.tsx to use light theme by default instead of system
- Optimize photo filtering with useMemo in page.tsx
- Add Express mock API for development
- Update CLAUDE.md with comprehensive project documentation
- Create backend/ and admin/ directories for future development
2025-07-08 17:34:16 +08:00
3d197eb7e3 feat: setup frontend project with bun and dynamic data fetching
- Create new frontend project directory with Next.js 15 + React 19
- Migrate from pnpm to bun for faster package management
- Add TanStack Query + Axios for dynamic data fetching
- Create comprehensive Makefile with development commands
- Setup API layer with query hooks and error handling
- Configure environment variables and bun settings
- Add TypeScript type checking and project documentation
- Update CLAUDE.md with bun-specific development workflow
2025-07-08 15:28:26 +08:00
d06caee35a init ui 2025-07-08 14:39:08 +08:00