DrSmoothl
c822c5dab6
refactor(webui): extract useFlashMessage hook for settings panels
三个 settings 面板各手写同一套 flash-message 状态机(msg state + setTimeout 自动
消失 + 卸载清 timer)。global-config / notifications 是完整版(逐字相同);
system-panel 是退化版(无 timer ref、无 cleanup、rapid flash 累积 timer、卸载后可能
stale setMsg)。抽 useFlashMessage(durationMs=2400) → { msg, flash, setMsg }。
- global-config / notifications:迁移后行为不变(2400ms;flash 瞬时 + setMsg 持久
错误保留)。
- system-panel:保留 4000ms(useFlashMessage(4000)),顺带补上 prior-timer 取消 +
卸载 cleanup(修 timer 泄漏,现代 React 里无害的小改善)。
webui typecheck(tsc -b) + vite build 干净;对抗性 Agent 逐行核对确认 hook 等价、
两面板行为不变、无依赖/import 回归。
2026-07-01 20:03:58 +08:00
..
2026-06-30 23:29:51 +08:00
2026-07-01 17:29:25 +08:00
2026-07-01 19:18:10 +08:00
2026-07-01 02:27:35 +08:00
2026-07-01 19:55:21 +08:00
2026-07-01 18:30:45 +08:00
2026-07-01 19:12:05 +08:00
2026-06-30 20:38:37 +08:00
2026-06-30 20:38:37 +08:00
2026-06-30 20:38:37 +08:00
2026-06-30 20:38:37 +08:00
2026-06-30 20:38:37 +08:00
2026-07-01 20:03:58 +08:00