Merge branch 'feat/various'
This commit is contained in:
@@ -29,6 +29,16 @@ docStyle.innerHTML = `
|
||||
text-align: center;
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
.cm-notice-board {
|
||||
width: 250px;
|
||||
height: 160px;
|
||||
overflow: auto;
|
||||
color: var(--input-text);
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
overflow-x: hidden;
|
||||
};
|
||||
`;
|
||||
|
||||
document.head.appendChild(docStyle);
|
||||
@@ -89,6 +99,14 @@ async function init_share_option() {
|
||||
});
|
||||
}
|
||||
|
||||
async function init_notice(notice) {
|
||||
api.fetchApi('/manager/notice')
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
notice.innerHTML = data;
|
||||
})
|
||||
}
|
||||
|
||||
await init_badge_mode();
|
||||
await init_share_option();
|
||||
|
||||
@@ -492,7 +510,7 @@ class ManagerMenuDialog extends ComfyDialog {
|
||||
}
|
||||
|
||||
createControlsRight() {
|
||||
return [
|
||||
const elts = [
|
||||
$el("button", {
|
||||
type: "button",
|
||||
textContent: "ComfyUI Community Manual",
|
||||
@@ -570,7 +588,16 @@ class ManagerMenuDialog extends ComfyDialog {
|
||||
textContent: "ComfyUI Nodes Info",
|
||||
onclick: () => { window.open("https://ltdrdata.github.io/", "comfyui-node-info"); }
|
||||
}),
|
||||
$el("br", {}, []),
|
||||
];
|
||||
|
||||
var textarea = document.createElement("div");
|
||||
textarea.className = "cm-notice-board";
|
||||
elts.push(textarea);
|
||||
|
||||
init_notice(textarea);
|
||||
|
||||
return elts;
|
||||
}
|
||||
|
||||
constructor() {
|
||||
@@ -603,7 +630,7 @@ class ManagerMenuDialog extends ComfyDialog {
|
||||
|
||||
this.element = $el("div.comfy-modal", { parent: document.body }, [ content ]);
|
||||
this.element.style.width = '1000px';
|
||||
this.element.style.height = '400px';
|
||||
this.element.style.height = '420px';
|
||||
this.element.style.zIndex = 10000;
|
||||
}
|
||||
|
||||
@@ -638,6 +665,7 @@ app.registerExtension({
|
||||
}
|
||||
menu.append(managerButton);
|
||||
|
||||
|
||||
const shareButton = document.createElement("button");
|
||||
shareButton.id = "shareButton";
|
||||
shareButton.textContent = "Share";
|
||||
@@ -680,6 +708,10 @@ app.registerExtension({
|
||||
if (nicknames[nodeData.name.trim()]) {
|
||||
let nick = nicknames[nodeData.name.trim()];
|
||||
|
||||
if (nick == 'ComfyUI') {
|
||||
nick = "🦊"
|
||||
}
|
||||
|
||||
if (nick.length > 25) {
|
||||
text += nick.substring(0, 23) + "..";
|
||||
}
|
||||
@@ -726,6 +758,10 @@ app.registerExtension({
|
||||
if (nicknames[node.type.trim()]) {
|
||||
let nick = nicknames[node.type.trim()];
|
||||
|
||||
if (nick == 'ComfyUI') {
|
||||
nick = "🦊"
|
||||
}
|
||||
|
||||
if (nick.length > 25) {
|
||||
text += nick.substring(0, 23) + "..";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user