feat(console): 附件全链路接线(预览/下载/删除 + 已建任务交互)
- app/src/api.js: 新增 attachmentUrl(inline/下载 URL 构造)与 deleteAttachment 封装 - app/src/app.jsx: taskOps 增 delAttachment(删除→toast→局部刷新) - design/ui_kits/console/TaskTree.jsx: TaskDetail 附件区从纯文本升级为画廊 (图片缩略图点击新标签预览 + 下载按钮 + 确认删除),URL 内联零依赖、删除走 taskOps - design/ui_kits/console/i18n.js: 新增 attSection/attDownload/attDeleteConfirm/ attDeleted/attDeleteFailed(zh/en/es/ja/fr 五语齐全) tsk_dbtI_ffTJll9 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -387,6 +387,11 @@ export function App() {
|
||||
try { await api.deleteTask(taskId); toast('warn', '已删除'); loadProject(currentId); loadGlobal(); }
|
||||
catch (e) { toast('warn', '删除失败:' + e.message); }
|
||||
},
|
||||
// 删除已建任务的单个附件(name = 磁盘文件名 basename(att.path)),成功后局部刷新
|
||||
delAttachment: async (taskId, name) => {
|
||||
try { await api.deleteAttachment(taskId, name); toast('warn', t.attDeleted); loadProject(currentId); }
|
||||
catch (e) { toast('warn', t.attDeleteFailed + e.message); }
|
||||
},
|
||||
};
|
||||
const [showNewProject, setShowNewProject] = React.useState(false);
|
||||
const createProject = async (body) => {
|
||||
|
||||
Reference in New Issue
Block a user