Hide update comfyui buttons in electron.

This commit is contained in:
Robin Huang 2025-02-01 16:15:27 -08:00
parent f8ebf7c6ad
commit 3c45f8dc91

View File

@ -811,11 +811,15 @@ const isOutputNode = (node) => {
class ManagerMenuDialog extends ComfyDialog { class ManagerMenuDialog extends ComfyDialog {
createControlsMid() { createControlsMid() {
let self = this; let self = this;
const isElectron = 'electronAPI' in window;
update_comfyui_button = update_comfyui_button =
$el("button.cm-button", { $el("button.cm-button", {
type: "button", type: "button",
textContent: "Update ComfyUI", textContent: "Update ComfyUI",
style: {
display: isElectron ? 'none' : 'block'
},
onclick: onclick:
() => updateComfyUI() () => updateComfyUI()
}); });
@ -824,6 +828,9 @@ class ManagerMenuDialog extends ComfyDialog {
$el("button.cm-button", { $el("button.cm-button", {
type: "button", type: "button",
textContent: "Switch ComfyUI", textContent: "Switch ComfyUI",
style: {
display: !isElectron ? 'none' : 'block'
},
onclick: onclick:
() => switchComfyUI() () => switchComfyUI()
}); });
@ -1606,4 +1613,4 @@ async function set_default_ui()
} }
} }
set_default_ui(); set_default_ui();