fix: TUN switch button logical bug
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { AppDataProvider } from "./providers/app-data-provider";
|
||||
import React from "react";
|
||||
import Layout from "./pages/_layout";
|
||||
|
||||
function App() {
|
||||
@@ -10,4 +9,4 @@ function App() {
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
export default App;
|
||||
|
||||
@@ -39,11 +39,6 @@ const SettingSystem = ({ onError }: Props) => {
|
||||
|
||||
const { data: sysproxy } = useSWR("getSystemProxy", getSystemProxy);
|
||||
const { data: autoproxy } = useSWR("getAutotemProxy", getAutotemProxy);
|
||||
const { data: autoLaunchEnabled } = useSWR(
|
||||
"getAutoLaunchStatus",
|
||||
getAutoLaunchStatus,
|
||||
{ revalidateOnFocus: false },
|
||||
);
|
||||
|
||||
const { isAdminMode, isSidecarMode, mutateRunningMode, isServiceOk } =
|
||||
useSystemState();
|
||||
@@ -148,7 +143,7 @@ const SettingSystem = ({ onError }: Props) => {
|
||||
return patchVerge({ enable_tun_mode: e });
|
||||
}}
|
||||
>
|
||||
<Switch edge="end" disabled={isServiceOk} />
|
||||
<Switch edge="end" disabled={!isServiceOk} />
|
||||
</GuardState>
|
||||
</SettingItem>
|
||||
<SettingItem
|
||||
|
||||
Reference in New Issue
Block a user