Restart using electron api is present. (#1255)

This commit is contained in:
Robin Huang authored and GitHub committed 2024-11-21 15:01:14 +09:00
1 parent 8be3cce9a9
commit ff8fb087e0
1 file changed
+4
+4
View File
@@ -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");
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.