Added a restart server button that makes an API call to the reboot API root.

This commit is contained in:
ThisModernDay 2023-10-21 16:16:05 -04:00
parent f4ff481734
commit ad9ba06ce1

View File

@ -788,6 +788,13 @@ export class ComfyUI {
} }
} }
}), }),
$el("button", {
id: "comfy-reboot-server-button", textContent: "Reboot Server", onclick: () => {
if (!confirmClear.value || confirm("Are you sure you'd like to reboot the server?")) {
api.fetchApi("/reboot")
}
}
})
]); ]);
const devMode = this.settings.addSetting({ const devMode = this.settings.addSetting({