Revert "fix: improve Service connection method and permissions for Windows and Unix"

This reverts commit 601e99f0b5.

Revert "refactor: clash-verge-rev-service-ipc (#4841)"

This reverts commit 5370bd45ed.
This commit is contained in:
Tunglies
2025-10-11 21:21:01 +08:00
parent 121b8c433b
commit 4f1d61a56e
16 changed files with 772 additions and 540 deletions

View File

@@ -3,7 +3,6 @@ import { useCallback } from "react";
import { installService, restartCore } from "@/services/cmds";
import { showNotice } from "@/services/noticeService";
import { useSystemState } from "./use-system-state";
const executeWithErrorHandling = async (
operation: () => Promise<void>,
@@ -24,8 +23,6 @@ const executeWithErrorHandling = async (
};
export const useServiceInstaller = () => {
const { mutateRunningMode, mutateServiceOk } = useSystemState();
const installServiceAndRestartCore = useCallback(async () => {
await executeWithErrorHandling(
() => installService(),
@@ -34,6 +31,6 @@ export const useServiceInstaller = () => {
);
await executeWithErrorHandling(() => restartCore(), "Restarting Core...");
}, [mutateRunningMode, mutateServiceOk]);
}, []);
return { installServiceAndRestartCore };
};