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

@@ -1,4 +1,4 @@
use crate::cmds;
use crate::cmd;
use crate::config::{Config, PrfItem, PrfOption};
use crate::core::handle;
use crate::core::CoreManager;
@@ -9,7 +9,7 @@ use anyhow::{bail, Result};
pub fn toggle_proxy_profile(profile_index: String) {
tauri::async_runtime::spawn(async move {
let app_handle = handle::Handle::global().app_handle().unwrap();
match cmds::patch_profiles_config_by_profile_index(app_handle, profile_index).await {
match cmd::patch_profiles_config_by_profile_index(app_handle, profile_index).await {
Ok(_) => {
let _ = tray::Tray::global().update_menu();
}