feat: 实现时间线拖拽排序功能及PWA支持
Some checks failed
test/timeline-frontend/pipeline/head Something is wrong with the build of this commit

新增时间线节点的拖拽排序功能,使用dnd-kit库实现可排序网格布局。添加PWA支持,包括Service Worker注册和manifest配置。优化移动端适配,改进批量操作工具栏和撤销/重做功能。

重构用户登录和注册页面,修复登录跳转逻辑。调整画廊视图在不同设备上的显示效果。新增协作成员管理功能,支持批量修改权限。

修复请求错误处理中的跳转逻辑问题,避免重复跳转登录页。优化样式表,增强时间线卡片和图片展示的响应式布局。

新增多个API接口支持批量操作,包括排序、删除和时间修改。引入useBatchSelection和useHistory自定义Hook管理状态。添加UndoRedoToolbar组件提供撤销/重做功能。

实现Service Worker离线缓存策略,支持静态资源和API请求的缓存。新增PWA工具函数处理安装提示和更新检测。优化移动端交互,调整组件布局和操作按钮。
This commit is contained in:
2026-02-24 10:33:10 +08:00
parent 5139817b3c
commit 97a5ad3a00
24 changed files with 3012 additions and 247 deletions

107
public/manifest.json Normal file
View File

@@ -0,0 +1,107 @@
{
"name": "Timeline - 时间线记录",
"short_name": "Timeline",
"description": "记录生活中的每一个精彩时刻",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#1890ff",
"orientation": "portrait-primary",
"scope": "/",
"lang": "zh-CN",
"icons": [
{
"src": "/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable any"
}
],
"screenshots": [
{
"src": "/screenshots/home.png",
"sizes": "1080x1920",
"type": "image/png",
"form_factor": "narrow",
"label": "首页"
},
{
"src": "/screenshots/timeline.png",
"sizes": "1080x1920",
"type": "image/png",
"form_factor": "narrow",
"label": "时间线"
}
],
"shortcuts": [
{
"name": "创建时刻",
"short_name": "创建",
"description": "快速创建新的时间线时刻",
"url": "/story/create",
"icons": [
{
"src": "/icons/add-96x96.png",
"sizes": "96x96"
}
]
},
{
"name": "我的时间线",
"short_name": "时间线",
"description": "查看我的时间线",
"url": "/story",
"icons": [
{
"src": "/icons/timeline-96x96.png",
"sizes": "96x96"
}
]
}
],
"categories": ["lifestyle", "productivity", "social"],
"prefer_related_applications": false,
"related_applications": []
}