diff --git a/js/common.js b/js/common.js index 49a47d6f..8847606f 100644 --- a/js/common.js +++ b/js/common.js @@ -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"); @@ -237,4 +241,4 @@ export const icons = { conflicts: '', passed: '', download: '' -} \ No newline at end of file +}