Revert "feat: front-end use RunningMode enum instead of string literals"

This reverts commit 72806357412d5ac5ce052be573713f26505b4f8f.
This commit is contained in:
Tunglies 2025-03-26 22:17:29 +08:00
parent 7280635741
commit ff4101fa47
5 changed files with 4 additions and 10 deletions

View File

@ -147,7 +147,7 @@ export const ProxyTunCard: FC = () => {
const { enable_system_proxy, enable_tun_mode } = verge ?? {}; const { enable_system_proxy, enable_tun_mode } = verge ?? {};
// 是否以sidecar模式运行 // 是否以sidecar模式运行
const isSidecarMode = runningMode === RunningMode.Sidecar; const isSidecarMode = runningMode === "Sidecar";
// 处理错误 // 处理错误
const handleError = (err: Error) => { const handleError = (err: Error) => {

View File

@ -31,7 +31,7 @@ export const SystemInfoCard = () => {
); );
// 是否以sidecar模式运行 // 是否以sidecar模式运行
const isSidecarMode = runningMode === RunningMode.Sidecar; const isSidecarMode = runningMode === "Sidecar";
// 初始化系统信息 // 初始化系统信息
useEffect(() => { useEffect(() => {

View File

@ -58,7 +58,7 @@ const SettingSystem = ({ onError }: Props) => {
}, [autoLaunchEnabled]); }, [autoLaunchEnabled]);
// 是否以sidecar模式运行 // 是否以sidecar模式运行
const isSidecarMode = runningMode === RunningMode.Sidecar; const isSidecarMode = runningMode === "Sidecar";
const sysproxyRef = useRef<DialogRef>(null); const sysproxyRef = useRef<DialogRef>(null);
const tunRef = useRef<DialogRef>(null); const tunRef = useRef<DialogRef>(null);

View File

@ -52,7 +52,7 @@ const ProxyControlSwitches = ({ label, onError }: ProxySwitchProps) => {
); );
// 是否以sidecar模式运行 // 是否以sidecar模式运行
const isSidecarMode = runningMode === RunningMode.Sidecar; const isSidecarMode = runningMode === "Sidecar";
const sysproxyRef = useRef<DialogRef>(null); const sysproxyRef = useRef<DialogRef>(null);
const tunRef = useRef<DialogRef>(null); const tunRef = useRef<DialogRef>(null);

View File

@ -806,9 +806,3 @@ interface IWebDavConfig {
username: string; username: string;
password: string; password: string;
} }
enum RunningMode {
Service = "Service",
Sidecar = "Sidecar",
NotRunning = "NotRunning",
}