mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-01-31 16:30:18 +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 {
|
||||
font-family: var(--grid-font);
|
||||
font-size: 15px;
|
||||
background: var(--bg-color);
|
||||
}
|
||||
|
||||
.cn-manager-grid .cn-node-name a {
|
||||
@ -268,6 +269,18 @@ const pageCss = `
|
||||
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 = `
|
||||
@ -693,8 +706,14 @@ export class CustomNodesManager {
|
||||
|
||||
renderGrid() {
|
||||
|
||||
// update theme
|
||||
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 = {
|
||||
theme: colorPalette === "light" ? "" : "dark"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user