Skip to content

Conversation

@magicdawn
Copy link
Contributor

场景:
添加一个任务A, 点击 "开始任务"
再添加一个任务 B, 点击 "开始任务" (注: 需要等 A 结束, 才能继续点击 "开始任务")

Before 这个修改:
A 已完成, 会重新开始任务

After 这个修改:
A 已完成, 不会重新开始处理


(注: 需要等 A 结束, 才能继续点击 "开始任务")
这里修改, 需要状态提升一下, 想问下你对状态管理器(valtio / zustand / jotai 等等)有偏好没有 😂, 因为你在维护

@buxuku
Copy link
Owner

buxuku commented May 7, 2025

我没太 get 到需要用到状态管理器的必要性。或者一个 useContext 就够了。
但如果有更好的实践,你可以尝试 zustand 实现的效果。

@magicdawn magicdawn force-pushed the feat-improve-task branch from 6b452d7 to 24a9ca1 Compare May 7, 2025 09:57
@magicdawn magicdawn changed the title feat: improve task management, completed task will not re-start again [WIP] feat: improve task management, completed task will not re-start again May 7, 2025
@vercel
Copy link

vercel bot commented May 17, 2025

@magicdawn is attempting to deploy a commit to the buxuku's projects Team on Vercel.

A member of the Team first needs to authorize it.

@magicdawn magicdawn marked this pull request as draft May 17, 2025 11:36
@magicdawn magicdawn marked this pull request as ready for review May 17, 2025 14:16
@magicdawn magicdawn changed the title [WIP] feat: improve task management, completed task will not re-start again feat: improve task management, completed task will not re-start again May 17, 2025
@magicdawn
Copy link
Contributor Author

场景:
添加一个任务A, 点击 "开始任务"
再添加一个任务 B, 点击 "开始任务" (注: 需要等 A 结束, 才能继续点击 "开始任务")

Before 这个修改:
A 已完成, 会重新开始任务

After 这个修改:
A 已完成, 不会重新开始处理


Before 这个修改:
需要等 A 结束, 才能继续点击 "开始任务", 开始任务 B

After 这个修改:
A 开始运行时, 添加一个 switch, "自动开始新任务", 如果勾选
添加文件B, 会自动添加到队列, A 任务完成后, 会自动开始 B

@buxuku
Copy link
Owner

buxuku commented Jun 4, 2025

请再处理一下冲突 tks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants