mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-02-07 03:32:34 +08:00
supports better theme with comfyui color palette
This commit is contained in:
parent
6ff026d575
commit
f001f4750c
@ -116,6 +116,7 @@ const pageCss = `
|
|||||||
.cn-manager-grid .tg-turbogrid {
|
.cn-manager-grid .tg-turbogrid {
|
||||||
font-family: var(--grid-font);
|
font-family: var(--grid-font);
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
background: var(--bg-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.cn-manager-grid .cn-node-name a {
|
.cn-manager-grid .cn-node-name a {
|
||||||
@ -268,6 +269,18 @@ const pageCss = `
|
|||||||
animation: cn-btn-loading-bg 3s linear infinite;
|
animation: cn-btn-loading-bg 3s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cn-manager-light .cn-node-name a {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cn-manager-light .cm-warn-note {
|
||||||
|
background-color: #ccc !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cn-manager-light .cn-btn-install {
|
||||||
|
background-color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const pageHtml = `
|
const pageHtml = `
|
||||||
@ -693,8 +706,14 @@ export class CustomNodesManager {
|
|||||||
|
|
||||||
renderGrid() {
|
renderGrid() {
|
||||||
|
|
||||||
|
// update theme
|
||||||
const colorPalette = this.app.ui.settings.settingsValues['Comfy.ColorPalette'];
|
const colorPalette = this.app.ui.settings.settingsValues['Comfy.ColorPalette'];
|
||||||
// console.log(colorPalette)
|
Array.from(this.element.classList).forEach(cn => {
|
||||||
|
if (cn.startsWith("cn-manager-")) {
|
||||||
|
this.element.classList.remove(cn);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.element.classList.add(`cn-manager-${colorPalette}`);
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
theme: colorPalette === "light" ? "" : "dark"
|
theme: colorPalette === "light" ? "" : "dark"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user