From d9ce967de7f24efd71f0a60f53f48753639f28a3 Mon Sep 17 00:00:00 2001 From: DemonGatanjieu <1027066412@qq.com> Date: Thu, 17 Sep 2026 00:59:09 +0800 Subject: [PATCH] docs: record recipe detail split progress --- docs/plans/code-structure-refactor.md | 7 ++++++- web/modules/ui_recipe_detail_dom.js | 8 +++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/plans/code-structure-refactor.md b/docs/plans/code-structure-refactor.md index f0e38ec..dfdf54b 100644 --- a/docs/plans/code-structure-refactor.md +++ b/docs/plans/code-structure-refactor.md @@ -205,4 +205,9 @@ 已验证设置/工具箱互斥、固定工具过滤、语言刷新及既有快捷栏测试。尚未拆 `main.js` 的 `browser.js` / `browser_entry.js` / `interface_settings.js`,也尚未把 笔记模块的公共返回协调迁入导航模块;真实 ComfyUI 拖动、停靠与窗口缩放待宿主验收。 -- 阶段 3–7:待执行。 +- 阶段 3(进行中,`d8691d881`):配方版本历史/差异/恢复归 + `ui_recipe_versions.js`,结果图库与图片工作台跳转归 `ui_recipe_gallery.js`,跨子页 + 共用的 DOM、长值展示和复制控件归 `ui_recipe_detail_dom.js`。删除了无人调用的旧图库 + 对比实现;图库不再借道素材目录模块打开图片工作台。新增检查覆盖版本恢复请求、刷新回调 + 和图库工作台条目交接。模型匹配、参数方案、总览与配方目录拆分仍待执行。 +- 阶段 4–7:待执行。 diff --git a/web/modules/ui_recipe_detail_dom.js b/web/modules/ui_recipe_detail_dom.js index fd93a2d..7230778 100644 --- a/web/modules/ui_recipe_detail_dom.js +++ b/web/modules/ui_recipe_detail_dom.js @@ -47,7 +47,7 @@ export async function copyTextWithFeedback(buttonElement, value) { const original = buttonElement.textContent; const isIcon = original.length <= 2; const copied = await copyText(value); - + if (isIcon) { buttonElement.textContent = copied ? '✓' : '!'; } else { @@ -55,11 +55,11 @@ export async function copyTextWithFeedback(buttonElement, value) { ? `✓ ${t('recipeCopied')}` : `! ${t('recipeCopyFailed')}`; } - + buttonElement.style.color = copied ? '#6ee7b7' : '#fca5a5'; buttonElement.style.borderColor = copied ? 'rgba(110, 231, 183, 0.7)' : 'rgba(252, 165, 165, 0.7)'; buttonElement.style.transition = 'all 0.2s ease'; - + window.setTimeout(() => { buttonElement.textContent = original; buttonElement.style.color = ''; @@ -67,7 +67,6 @@ export async function copyTextWithFeedback(buttonElement, value) { }, 1200); return copied; } - export function appendCopyButton(parent, value, label = t('recipeCopyParameter')) { const copy = button(parent, '', 'anomalous-recipe-copy-param anomalous-recipe-detail-copy'); copy.innerHTML = ``; @@ -102,4 +101,3 @@ export function appendValueViewer(parent, value, className = '', options = {}) { const PROMPT_ROLES = new Set(['positive', 'negative', 'both', 'ignored', 'unknown']); const PROMPT_WIDGET_NAME = /^(?:text|prompt|text_[gl]|positive|negative)$/i; -