修复: 项目详情页三态分离与反馈一致性
- notFound/已归档/加载失败三态分离:单查兜底+归档恢复入口+加载失败重试钮 - 反馈一致性六项:同步守卫与完成提示/首屏并行加载/筛选空态文案/计数改过滤口径/路径勾选 seq 守卫/删除确认危险态 - 文件列表滚动条对齐全局范式(scrollbar-width:thin 致 Chromium 忽略定制样式) - 删除失败不再跳转(store 返布尔)/幽灵勾选清理/折叠阈值与 CSS 对齐
This commit is contained in:
@@ -54,11 +54,14 @@ export function createProjectsStore() {
|
||||
return record
|
||||
}
|
||||
|
||||
async function deleteProject(id: string) {
|
||||
await runWithCatch(state, t('projects.err.deleteFailed'), async () => {
|
||||
async function deleteProject(id: string): Promise<boolean> {
|
||||
// 返成功布尔(失败时 runWithCatch 已置 state.error),详情页删除据此阻断失败后的误跳转
|
||||
const ok = await runWithCatch(state, t('projects.err.deleteFailed'), async () => {
|
||||
await projectApi.delete(id) // 软删 → 回收站(可恢复)
|
||||
state.projects = state.projects.filter(p => p.id !== id)
|
||||
return true
|
||||
})
|
||||
return ok === true
|
||||
}
|
||||
|
||||
async function loadDeletedProjects() {
|
||||
|
||||
Reference in New Issue
Block a user