diff --git a/CHANGELOG.md b/CHANGELOG.md index bf895c1..0218690 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - **Current node (当前节点, formerly Node Assistant)**: the panel no longer splits into "actions" and "parameter sets" tabs; it is one page with the model actions on top and **Parameters** below. Parameters lists every saved set of values for this kind of node in one list — from the material library and from recipes' parameter sets, the same values saved twice shown once — and each entry says exactly what it would change on the selected node ("steps: 20 → 30"). **Apply these N** changes only those; seeds and model files stay (change the model above), and the receipt undoes it. **Save these values** keeps the node's current values in the material library, so the next node of that kind can use them. - **Translation moved onto the node (翻译挪到节点上)**: Current node now lists the selected node's prompt boxes, each marked positive or negative by its wiring. A box written in Chinese has **Translate to English**, which writes the English back (the receipt undoes it); an English box has **Show in Chinese**, which shows the meaning underneath and writes nothing. The separate Prompt Translator window is gone; Prompt Studio keeps its own translate buttons. - **No more toolbox (工具箱拆掉了)**: every tool now opens from the page it belongs to. Workflow share codes (import / export) are the ⇅ button at the top right of **Workflows** (where a disabled import button used to sit); **Prompt Studio** and **Prompt Notes** are at the top right of **Materials**; **Model Sources** is at the end of the type chips on **Models**, and Model Doctor has **Where to download** for the open workflow's models; translation is on the prompt boxes in **Current node**. The rail keeps scan, Model Doctor and Current node. +- **One look everywhere (配色统一)**: pages made at different times used their own greys (bluish slate here, neutral grey there) and their own accent (sky blue, violet, indigo). They now all take the Home page's colours: neutral surfaces, the same text greys and one accent for links and selection, and they follow the Abyssal Scarlet theme too (the Material Library, Prompt Studio, voices and several dialogs used to stay blue-grey in it). The workflow share-code dialogs lost their blue and orange buttons for the usual ones. Status colours and prompt-role colours are unchanged. - **See it before you let go (拖的时候先看到结果)**: dragging a prompt over a prompt box shows, in that box and in the opposite box on the same sampler, the text releasing would put there; move away and they go back. Dragging saved values over a node of their kind lists what would change, such as "steps 12 → 28, cfg 4.5 → 5.5", or says nothing would change. - **The scan page in plain words (扫描页说人话)**: it says what a scan does (the file's fingerprint is looked up on Civitai), and why a model was not found: not published on Civitai (voice, upscale and detection models mostly come from HuggingFace or GitHub), trained or merged by you, or changed after download; it works as usual, and you can add its download link. A model Civitai does not know that is no known image model says it may be a voice or upscale model. Model files in other formats (.pth, .ckpt, .bin…), which scans never read, are listed under **Other formats** with why, so they are no longer a mystery. - **Undo what you dropped (拖错了可以撤回)**: anything Anomalous writes on the canvas (a material dropped on a node, a prompt put in a box, values applied in Current node, a model swapped or a LoRA inserted, a recipe or prompt note sent to the canvas) is now one step of ComfyUI's own **Ctrl+Z**; before, a drop was not, and Ctrl+Z could undo the step before it instead. After a drop, the message at the top right has **Undo** and stays while the pointer is on it. Dropping a prompt on empty canvas can be undone the same way. In **Activity**, canvas changes made since the page was opened have **Undo** while nothing has changed them since; entries that removed nodes or rewired existing ones only record. diff --git a/docs/architecture/frontend.md b/docs/architecture/frontend.md index 47844b6..f07165e 100644 --- a/docs/architecture/frontend.md +++ b/docs/architecture/frontend.md @@ -303,13 +303,22 @@ guards the unique ordered list and byte-for-byte reconstructed bundle. Shared `- tokens express surfaces, text, borders and control shapes; theme overrides must be scoped to `.theme-abyssal-scarlet` rather than changing unrelated surfaces. +Colours come from the tokens in `00-foundation-models.css`, which both themes define: +surfaces (`--amb-bg-page`, `-panel`, `-card`, `-card-hover`, `-input`), text +(`--amb-text-main`, `-soft`, `-muted`, `-dim`), borders (`--amb-border`, `-strong`, +`-hover`), the primary button (`--amb-btn-primary-*`) and one accent, `--amb-link`, for +links, selection and focus; its tints are `color-mix(in srgb, var(--amb-link) N%, +transparent)`. CSS injected from JS and inline styles use the same tokens. Literal +colours stay only where the colour is the meaning: status (red, green, amber), prompt +roles, voice emotions, canvas node colours and translucent shadows or overlays. + Studio drawer rules keep the source deck at the screen edge and the assembly track next to the canvas. Common geometry is shared between dock directions; direction-specific rules set column order and separators. The removed embedded composer's `#anomalous-container.anomalous-docked` overrides must not return. Before adding an override or `!important`, locate and edit the owning rule. -Older component and theme overrides elsewhere in the ordered bundle still need a -separate, visually verified consolidation. +Older theme overrides in `08-theme-gallery-overrides.css` predate the tokens; many are +now redundant and can go as the rules they override are touched. ## Verification diff --git a/web/main.js b/web/main.js index 1c64a70..fa96553 100644 --- a/web/main.js +++ b/web/main.js @@ -235,7 +235,7 @@ const AMB_WorkflowShare = { const toast = document.createElement('div'); toast.textContent = message; toast.style.cssText = ` - position: fixed; bottom: 30px; right: 30px; background: #2a2a2b; color: ${color || '#fff'}; + position: fixed; bottom: 30px; right: 30px; background: var(--amb-bg-card-hover); color: ${color || '#fff'}; padding: 12px 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.5); font-family: Arial, sans-serif; font-size: 14px; z-index: 9999999; opacity: 0; transition: opacity 0.3s ease; border-left: 4px solid ${color || '#fff'}; @@ -248,141 +248,99 @@ const AMB_WorkflowShare = { }, 3000); }, - showExportModal() { + /** A dimmed overlay with one dialog box; looks come from .anomalous-share-* in the styles. */ + createShareDialog(id, titleText, variant = '') { const overlay = document.createElement('div'); - overlay.id = 'amb-export-modal'; - overlay.style.cssText = ` - position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; - background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); - z-index: 999999; display: flex; justify-content: center; align-items: center; - font-family: Arial, sans-serif; - `; - + if (id) overlay.id = id; + overlay.className = 'anomalous-share-overlay'; const content = document.createElement('div'); - content.style.cssText = ` - background: #2a2a2b; color: #fff; padding: 30px; border-radius: 12px; - width: 500px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); - display: flex; flex-direction: column; gap: 20px; - `; - + content.className = `anomalous-share-dialog${variant ? ` ${variant}` : ''}`; const title = document.createElement('h2'); - title.style.margin = '0'; - title.textContent = t('mainExportTitle'); - + title.className = 'anomalous-share-title'; + title.textContent = titleText; + content.appendChild(title); + overlay.appendChild(content); + return { overlay, content }; + }, + + shareButton(label, variant = '') { + const button = document.createElement('button'); + button.type = 'button'; + button.className = `anomalous-share-btn${variant ? ` ${variant}` : ''}`; + button.textContent = label; + return button; + }, + + showExportModal() { + const { overlay, content } = this.createShareDialog('amb-export-modal', t('mainExportTitle')); + const typeSelectContainer = document.createElement('div'); + typeSelectContainer.className = 'anomalous-share-options'; typeSelectContainer.innerHTML = ` -