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