mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-02-14 23:22:35 +08:00
Restart using electron api is present.
This commit is contained in:
parent
8be3cce9a9
commit
9de3b7aa06
@ -12,6 +12,10 @@ export async function sleep(ms) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function rebootAPI() {
|
export function rebootAPI() {
|
||||||
|
if ('electronAPI' in window) {
|
||||||
|
window.electronAPI.restartApp();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (confirm("Are you sure you'd like to reboot the server?")) {
|
if (confirm("Are you sure you'd like to reboot the server?")) {
|
||||||
try {
|
try {
|
||||||
api.fetchApi("/manager/reboot");
|
api.fetchApi("/manager/reboot");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user