mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
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:
29
src-tauri/src/cmd/uwp.rs
Normal file
29
src-tauri/src/cmd/uwp.rs
Normal file
@@ -0,0 +1,29 @@
|
||||
use super::CmdResult;
|
||||
|
||||
/// Platform-specific implementation for UWP functionality
|
||||
#[cfg(windows)]
|
||||
mod platform {
|
||||
use super::CmdResult;
|
||||
use crate::core::win_uwp;
|
||||
use crate::wrap_err;
|
||||
|
||||
pub async fn invoke_uwp_tool() -> CmdResult {
|
||||
wrap_err!(win_uwp::invoke_uwptools().await)
|
||||
}
|
||||
}
|
||||
|
||||
/// Stub implementation for non-Windows platforms
|
||||
#[cfg(not(windows))]
|
||||
mod platform {
|
||||
use super::CmdResult;
|
||||
|
||||
pub async fn invoke_uwp_tool() -> CmdResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// Command exposed to Tauri
|
||||
#[tauri::command]
|
||||
pub async fn invoke_uwp_tool() -> CmdResult {
|
||||
platform::invoke_uwp_tool().await
|
||||
}
|
||||
Reference in New Issue
Block a user