feat(photo-wall): 修复4个问题 + 特殊文件夹(共享公共相册) **照片墙修复:** - 右键菜单 z-index 40→9999,不再被元素遮挡 - 图片放大后强制重建 DOM(img key 绑定 w/h) - 右键菜单添加滑条调节旋转步长(1°-90°)和缩放步长(照片 px / 其他 scale) - Delete 键可删除右键菜单选中的元素(便签也能删) **特殊文件夹功能(按设计文档实现):** - 后端:FolderRegistry 解析 special_folders.txt 注册表 + FolderStore 按文件夹存图 - 后端:5 个接口(存在性检查/列表/上传/获取/删除),白名单 + 管理员鉴权 - 前端:App.tsx 按 hash 路由到特殊文件夹,复用 PhotoWallPage - 前端:文件夹模式无张数上限,localStorage 按文件夹隔离 - 前端:管理员配额警告条(超 1GiB 时显示) - 前端:403 无权访问时退回起始页 Co-Authored-By: Claude <noreply@anthropic.com> @ |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .env | ||
| .env.production | ||
| .gitignore | ||
| eslint.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])