mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 15:23:44 +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
30 lines
626 B
Rust
30 lines
626 B
Rust
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
|
|
}
|