refactor: rename cmds module to cmd for better consistency (#2830)

- 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
This commit is contained in:
Tunglies
2025-03-01 22:52:43 +08:00
committed by GitHub
parent 184fd4a1ba
commit 9ee011514a
15 changed files with 877 additions and 755 deletions

View File

@@ -0,0 +1,20 @@
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)
}