mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
fix: standardize RunningMode handling between frontend and backend
This commit improves the type consistency between the Rust backend and TypeScript frontend by: 1. Modifying the Rust `get_running_mode()` command to return a String instead of RunningMode enum directly 2. Removing the RunningMode enum and IRunningMode interface from TypeScript types 3. Using string literals for mode comparison in frontend components 4. Standardizing on capitalized mode names (e.g., "Sidecar" instead of "sidecar") These changes ensure proper serialization/deserialization between backend and frontend, making the code more maintainable and reducing potential inconsistencies.
This commit is contained in:
@@ -58,7 +58,7 @@ const SettingSystem = ({ onError }: Props) => {
|
||||
}, [autoLaunchEnabled]);
|
||||
|
||||
// 是否以sidecar模式运行
|
||||
const isSidecarMode = runningMode === "sidecar";
|
||||
const isSidecarMode = runningMode === "Sidecar";
|
||||
|
||||
const sysproxyRef = useRef<DialogRef>(null);
|
||||
const tunRef = useRef<DialogRef>(null);
|
||||
|
||||
Reference in New Issue
Block a user