Every script is a draft, saved on its own in ComfyUI's user folder (anomalous_model_browser/voice_over_drafts.json through /userdata), read again and joined before each write so two tabs keep each other's drafts. A bar over the script names it and leads to New, Drafts and Close; the box shows a card per draft (open, rename, copy, delete) and Recently deleted (30 days). A reload opens the draft that was open; a file voiced again from the gallery becomes a draft of its own; the one localStorage draft of the earlier build moves in once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
177 lines
3.7 KiB
CSS
177 lines
3.7 KiB
CSS
/* The drafts box over the voice-over script (ui_script_drafts.js). */
|
|
|
|
/* The bar: the open draft's name (a click renames it), whether it is saved, then New, Drafts, Close. */
|
|
.anomalous-sd-drafts-bar {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 6px 8px;
|
|
padding-bottom: 8px;
|
|
margin-bottom: 6px;
|
|
border-bottom: 1px solid var(--amb-border);
|
|
}
|
|
|
|
.anomalous-sd-drafts-title {
|
|
max-width: 50%;
|
|
overflow: hidden;
|
|
padding: 3px 6px;
|
|
margin-left: -6px;
|
|
border: 1px solid transparent;
|
|
border-radius: 6px;
|
|
background: none;
|
|
color: var(--amb-text-main);
|
|
font: inherit;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.anomalous-sd-drafts-title.is-button {
|
|
cursor: text;
|
|
}
|
|
|
|
.anomalous-sd-drafts-title.is-button:hover {
|
|
border-color: var(--amb-border);
|
|
background: rgba(var(--amb-ink-rgb), 0.04);
|
|
}
|
|
|
|
.anomalous-sd-drafts-note {
|
|
color: var(--amb-text-dim);
|
|
font-size: 11.5px;
|
|
}
|
|
|
|
.anomalous-sd-drafts-note.is-error {
|
|
color: var(--amb-warn-text);
|
|
}
|
|
|
|
.anomalous-sd-drafts-gap {
|
|
flex: 1;
|
|
}
|
|
|
|
/* The box: one card per draft, the last changed first, then a card for a blank script. */
|
|
.anomalous-sd-drafts {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
padding: 8px 16px 16px;
|
|
}
|
|
|
|
.anomalous-sd-drafts-empty,
|
|
.anomalous-sd-drafts-hint {
|
|
margin: 0 0 10px;
|
|
color: var(--amb-text-muted);
|
|
font-size: 12.5px;
|
|
}
|
|
|
|
.anomalous-sd-drafts-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
gap: 10px;
|
|
}
|
|
|
|
.anomalous-sd-draft-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
border: 1px solid var(--amb-border);
|
|
border-radius: 10px;
|
|
background: rgba(var(--amb-ink-rgb), 0.03);
|
|
transition: border-color 0.15s ease, background 0.15s ease;
|
|
}
|
|
|
|
.anomalous-sd-draft-card:hover {
|
|
border-color: var(--amb-border-strong);
|
|
background: rgba(var(--amb-ink-rgb), 0.06);
|
|
}
|
|
|
|
.anomalous-sd-draft-card.is-current {
|
|
border-color: color-mix(in srgb, var(--amb-link) 60%, transparent);
|
|
}
|
|
|
|
.anomalous-sd-draft-card.is-new {
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 92px;
|
|
border-style: dashed;
|
|
background: none;
|
|
color: var(--amb-text-soft);
|
|
font: inherit;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-sd-draft-open {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 3px;
|
|
padding: 10px 12px 6px;
|
|
border: none;
|
|
background: none;
|
|
color: inherit;
|
|
font: inherit;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-sd-draft-name {
|
|
overflow: hidden;
|
|
color: var(--amb-text-main);
|
|
font-size: 13.5px;
|
|
font-weight: 600;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.anomalous-sd-draft-who {
|
|
overflow: hidden;
|
|
color: var(--amb-text-soft);
|
|
font-size: 12px;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.anomalous-sd-draft-when {
|
|
color: var(--amb-text-dim);
|
|
font-size: 11.5px;
|
|
}
|
|
|
|
.anomalous-sd-draft-card.is-current .anomalous-sd-draft-when {
|
|
color: var(--amb-link);
|
|
}
|
|
|
|
.anomalous-sd-draft-tools {
|
|
display: flex;
|
|
gap: 12px;
|
|
padding: 0 12px 9px;
|
|
}
|
|
|
|
.anomalous-sd-link-btn.is-danger {
|
|
color: var(--amb-danger-text);
|
|
}
|
|
|
|
/* Recently deleted, folded under the cards. */
|
|
.anomalous-sd-drafts-deleted {
|
|
margin-top: 16px;
|
|
color: var(--amb-text-soft);
|
|
font-size: 12.5px;
|
|
}
|
|
|
|
.anomalous-sd-drafts-deleted > summary {
|
|
margin-bottom: 8px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-sd-drafts-deleted-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 6px 0;
|
|
border-top: 1px solid var(--amb-border);
|
|
}
|
|
|
|
.anomalous-sd-drafts-deleted-row > .anomalous-sd-draft-name {
|
|
flex: 1;
|
|
font-weight: 400;
|
|
}
|