The page's three rows (kind pills, search, tag select, count and close; view, share and save; the drag tip strip) become one bar: search, a Filter menu (kind and tag), the count, grid or list, share and import, save the canvas. Cards keep the picture, the name, a line of steps, sampler, LoRAs and size, and the model; the models' state is a dot (words only when some are missing), 功能模块 marks a partial workflow, and Open and ⋯ (edit, export, delete) show on hover. ui_popup_menu.js is the small menu both use. The page's styles move to styles/28-workflows.css; the card and bar rules spread over four stylesheets and the ~240 lines of CSS injected from ui_recipe_cards.js are removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
448 lines
10 KiB
CSS
448 lines
10 KiB
CSS
/* The Workflows page (ui_recipe_catalog.js, ui_recipe_cards.js): one bar, then cards as a grid
|
|
or a list; the small menu of ui_popup_menu.js; the empty page's guide. */
|
|
|
|
.anomalous-wf-bar {
|
|
display: flex;
|
|
flex-shrink: 0;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--amb-border);
|
|
}
|
|
|
|
.anomalous-wf-search {
|
|
display: flex;
|
|
flex: 1 1 auto;
|
|
align-items: center;
|
|
gap: 8px;
|
|
min-width: 0;
|
|
height: 32px;
|
|
padding: 0 10px;
|
|
border: 1px solid var(--amb-border-strong);
|
|
border-radius: var(--amb-radius-control);
|
|
background: var(--amb-bg-input);
|
|
color: var(--amb-text-dim);
|
|
}
|
|
|
|
.anomalous-wf-search:focus-within { border-color: var(--amb-link); }
|
|
|
|
.anomalous-wf-search input {
|
|
flex: 1;
|
|
min-width: 0;
|
|
border: none;
|
|
outline: none;
|
|
background: transparent;
|
|
color: var(--amb-text-main);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.anomalous-wf-filter,
|
|
.anomalous-wf-icon-btn,
|
|
.anomalous-wf-save {
|
|
flex: 0 0 auto;
|
|
height: 32px;
|
|
padding: 0 12px;
|
|
border: 1px solid var(--amb-border-strong);
|
|
border-radius: var(--amb-radius-control);
|
|
background: transparent;
|
|
color: var(--amb-text-soft);
|
|
font-size: 13px;
|
|
white-space: nowrap;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-wf-icon-btn {
|
|
width: 32px;
|
|
padding: 0;
|
|
font-size: 15px;
|
|
}
|
|
|
|
.anomalous-wf-filter:hover,
|
|
.anomalous-wf-icon-btn:hover {
|
|
border-color: var(--amb-border-hover);
|
|
background: var(--amb-bg-card-hover);
|
|
color: var(--amb-text-main);
|
|
}
|
|
|
|
.anomalous-wf-filter.is-active {
|
|
border-color: var(--amb-link);
|
|
color: var(--amb-link);
|
|
}
|
|
|
|
.anomalous-wf-count {
|
|
flex: 0 0 auto;
|
|
color: var(--amb-text-dim);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.anomalous-wf-save {
|
|
border-color: transparent;
|
|
background: var(--amb-btn-primary-bg);
|
|
color: var(--amb-btn-primary-text);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.anomalous-wf-save:hover { background: var(--amb-btn-primary-hover); }
|
|
|
|
.anomalous-wf-list {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
padding: 16px;
|
|
}
|
|
|
|
.anomalous-wf-list.is-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
|
align-content: start;
|
|
gap: 14px;
|
|
}
|
|
|
|
.anomalous-wf-list.is-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.anomalous-wf-card {
|
|
--wf-cover-height: 150px;
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
border: 1px solid var(--amb-border);
|
|
border-radius: var(--amb-radius-panel);
|
|
background: var(--amb-bg-card);
|
|
cursor: grab;
|
|
transition: border-color 0.15s ease, background-color 0.15s ease;
|
|
}
|
|
|
|
.anomalous-wf-card:active { cursor: grabbing; }
|
|
.anomalous-wf-card button { cursor: pointer; }
|
|
|
|
.anomalous-wf-card:hover,
|
|
.anomalous-wf-card:focus-within {
|
|
border-color: var(--amb-border-hover);
|
|
background: var(--amb-bg-card-hover);
|
|
}
|
|
|
|
.anomalous-wf-cover {
|
|
position: relative;
|
|
flex: 0 0 var(--wf-cover-height);
|
|
height: var(--wf-cover-height);
|
|
overflow: hidden;
|
|
background: var(--amb-bg-sunken);
|
|
}
|
|
|
|
.anomalous-wf-cover img,
|
|
.anomalous-wf-cover video {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.anomalous-wf-status {
|
|
position: absolute;
|
|
top: 8px;
|
|
right: 8px;
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
box-shadow: 0 0 0 2px rgba(10, 12, 18, 0.7);
|
|
background: var(--amb-ok);
|
|
}
|
|
|
|
.anomalous-wf-status.is-warning { background: var(--amb-text-muted); }
|
|
|
|
.anomalous-wf-status.is-missing {
|
|
width: auto;
|
|
height: auto;
|
|
padding: 2px 8px;
|
|
border-radius: 999px;
|
|
box-shadow: none;
|
|
background: rgba(127, 29, 29, 0.9);
|
|
color: #fecaca;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.anomalous-wf-kind {
|
|
position: absolute;
|
|
top: 8px;
|
|
left: 8px;
|
|
padding: 2px 8px;
|
|
border-radius: 999px;
|
|
background: rgba(10, 12, 18, 0.78);
|
|
color: #fde68a;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.anomalous-wf-actions {
|
|
position: absolute;
|
|
top: calc(var(--wf-cover-height) - 42px);
|
|
right: 8px;
|
|
left: 8px;
|
|
display: flex;
|
|
gap: 6px;
|
|
opacity: 0;
|
|
transform: translateY(4px);
|
|
pointer-events: none;
|
|
transition: opacity 0.15s ease, transform 0.15s ease;
|
|
}
|
|
|
|
.anomalous-wf-card:hover .anomalous-wf-actions,
|
|
.anomalous-wf-card:focus-within .anomalous-wf-actions {
|
|
opacity: 1;
|
|
transform: none;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.anomalous-wf-open,
|
|
.anomalous-wf-more {
|
|
height: 32px;
|
|
border: 1px solid rgba(255, 255, 255, 0.16);
|
|
border-radius: var(--amb-radius-control);
|
|
background: rgba(15, 20, 30, 0.88);
|
|
color: #f3f4f6;
|
|
font-size: 12.5px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.anomalous-wf-open { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.anomalous-wf-more { flex: 0 0 34px; font-size: 16px; }
|
|
|
|
.anomalous-wf-open:hover,
|
|
.anomalous-wf-more:hover { background: rgba(30, 38, 56, 0.96); }
|
|
|
|
.anomalous-wf-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 3px;
|
|
min-width: 0;
|
|
padding: 10px 12px 10px;
|
|
}
|
|
|
|
.anomalous-wf-title {
|
|
margin: 0;
|
|
overflow: hidden;
|
|
color: var(--amb-text-main);
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.anomalous-wf-meta {
|
|
overflow: hidden;
|
|
color: var(--amb-text-muted);
|
|
font-size: 12px;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.anomalous-wf-meta:empty { display: none; }
|
|
|
|
.anomalous-wf-extras {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
min-height: 20px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.anomalous-wf-model {
|
|
flex: 1;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
color: var(--amb-text-dim);
|
|
font-size: 11.5px;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.anomalous-wf-extras .anomalous-recipe-set-chip { margin-left: auto; }
|
|
|
|
.anomalous-wf-list.is-list .anomalous-wf-card {
|
|
--wf-cover-height: 64px;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
height: 64px;
|
|
}
|
|
|
|
.anomalous-wf-list.is-list .anomalous-wf-cover { flex: 0 0 96px; width: 96px; }
|
|
.anomalous-wf-list.is-list .anomalous-wf-kind { display: none; }
|
|
|
|
.anomalous-wf-list.is-list .anomalous-wf-info {
|
|
flex: 1;
|
|
padding: 6px 220px 6px 14px;
|
|
}
|
|
|
|
.anomalous-wf-list.is-list .anomalous-wf-extras { display: none; }
|
|
|
|
.anomalous-wf-list.is-list .anomalous-wf-actions {
|
|
top: 16px;
|
|
right: 12px;
|
|
left: auto;
|
|
width: 200px;
|
|
}
|
|
|
|
/* Abyssal Scarlet: wine cards, crimson on hover. */
|
|
.theme-abyssal-scarlet .anomalous-wf-card {
|
|
border-color: rgba(220, 20, 60, 0.22);
|
|
background: rgba(18, 10, 26, 0.88);
|
|
}
|
|
|
|
.theme-abyssal-scarlet .anomalous-wf-card:hover,
|
|
.theme-abyssal-scarlet .anomalous-wf-card:focus-within { border-color: #dc143c; }
|
|
|
|
.theme-abyssal-scarlet .anomalous-wf-filter.is-active {
|
|
border-color: #dc143c;
|
|
color: #e0d8db;
|
|
}
|
|
|
|
/* The small menu (ui_popup_menu.js) over the page and its dialogs. */
|
|
.anomalous-popup-menu {
|
|
position: fixed;
|
|
z-index: 1000003;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 168px;
|
|
max-height: 60vh;
|
|
padding: 4px;
|
|
overflow-y: auto;
|
|
border: 1px solid var(--amb-border-strong);
|
|
border-radius: var(--amb-radius-card);
|
|
background: var(--amb-bg-panel);
|
|
box-shadow: 0 12px 32px rgba(var(--amb-shadow-rgb), 0.45);
|
|
}
|
|
|
|
.anomalous-popup-menu-heading {
|
|
padding: 6px 10px 2px;
|
|
color: var(--amb-text-dim);
|
|
font-size: 11px;
|
|
}
|
|
|
|
.anomalous-popup-menu-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 7px 10px;
|
|
border: none;
|
|
border-radius: var(--amb-radius-control);
|
|
background: transparent;
|
|
color: var(--amb-text-main);
|
|
font-size: 13px;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-popup-menu-item:hover { background: var(--amb-bg-card-hover); }
|
|
.anomalous-popup-menu-item.is-danger { color: var(--amb-danger-text); }
|
|
|
|
.anomalous-popup-menu-tick {
|
|
width: 12px;
|
|
color: var(--amb-link);
|
|
}
|
|
|
|
/* The empty page: what Workflows are for, three steps and Save. */
|
|
.anomalous-recipe-empty-guide {
|
|
grid-column: 1 / -1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 12px;
|
|
max-width: 580px;
|
|
margin: 32px auto;
|
|
padding: 28px 24px;
|
|
box-sizing: border-box;
|
|
border: 1px solid var(--amb-border);
|
|
border-radius: 16px;
|
|
background: rgba(var(--amb-ink-rgb), 0.025);
|
|
text-align: center;
|
|
}
|
|
|
|
.anomalous-recipe-empty-icon {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 52px;
|
|
height: 52px;
|
|
border: 1px solid color-mix(in srgb, var(--amb-link) 25%, transparent);
|
|
border-radius: 50%;
|
|
background: color-mix(in srgb, var(--amb-link) 10%, transparent);
|
|
font-size: 24px;
|
|
}
|
|
|
|
.anomalous-recipe-empty-title {
|
|
margin: 0;
|
|
color: var(--amb-text-main);
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.anomalous-recipe-empty-subtitle {
|
|
max-width: 440px;
|
|
margin: 0;
|
|
color: var(--amb-text-muted);
|
|
font-size: 12.5px;
|
|
line-height: 1.55;
|
|
}
|
|
|
|
.anomalous-recipe-empty-steps {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
gap: 12px;
|
|
width: 100%;
|
|
margin-top: 8px;
|
|
text-align: left;
|
|
}
|
|
|
|
.anomalous-recipe-empty-step {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
padding: 14px;
|
|
border: 1px solid var(--amb-border);
|
|
border-radius: 10px;
|
|
background: rgba(var(--amb-ink-rgb), 0.03);
|
|
}
|
|
|
|
.anomalous-recipe-step-icon { font-size: 20px; line-height: 1; }
|
|
|
|
.anomalous-recipe-empty-step strong {
|
|
color: var(--amb-text-main);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.anomalous-recipe-empty-step p {
|
|
margin: 0;
|
|
color: var(--amb-text-muted);
|
|
font-size: 11.5px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.anomalous-recipe-empty-action-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin-top: 6px;
|
|
padding: 8px 18px;
|
|
border: none;
|
|
border-radius: 8px;
|
|
background: var(--amb-btn-primary-bg);
|
|
color: var(--amb-btn-primary-text);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-recipe-empty-action-btn:hover { background: var(--amb-btn-primary-hover); }
|
|
|
|
@media (max-width: 560px) {
|
|
.anomalous-wf-bar { flex-wrap: wrap; }
|
|
.anomalous-wf-search { flex-basis: 100%; }
|
|
.anomalous-wf-list.is-list .anomalous-wf-info { padding-right: 14px; }
|
|
.anomalous-wf-list.is-list .anomalous-wf-actions { display: none; }
|
|
} |