mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 17:13:45 +08:00
- Renamed `cmds` module to `cmd` for better naming consistency - Reorganized command modules into separate files under src/cmd/ - Updated all imports and references to use the new module name - Fixed missing dependency in webdav.rs to reference core::backup - Updated tray module to use new cmd namespace - Improved uwp.rs module structure using platform-specific implementations - Removed unnecessary imports from various command files
21 lines
456 B
Rust
21 lines
456 B
Rust
use crate::{
|
|
config::*,
|
|
feat,
|
|
wrap_err,
|
|
};
|
|
use super::CmdResult;
|
|
|
|
/// 获取Verge配置
|
|
#[tauri::command]
|
|
pub fn get_verge_config() -> CmdResult<IVergeResponse> {
|
|
let verge = Config::verge();
|
|
let verge_data = verge.data().clone();
|
|
Ok(IVergeResponse::from(verge_data))
|
|
}
|
|
|
|
/// 修改Verge配置
|
|
#[tauri::command]
|
|
pub async fn patch_verge_config(payload: IVerge) -> CmdResult {
|
|
wrap_err!(feat::patch_verge(payload, false).await)
|
|
}
|