mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
feat: windows service mode ui
This commit is contained in:
@@ -251,6 +251,11 @@ pub mod service {
|
||||
wrap_err!(crate::core::Service::start_service().await)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn stop_service() -> Result<(), String> {
|
||||
wrap_err!(crate::core::Service::stop_service().await)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn check_service() -> Result<JsonResponse, String> {
|
||||
wrap_err!(crate::core::Service::check_service().await)
|
||||
@@ -258,11 +263,13 @@ pub mod service {
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn install_service() -> Result<(), String> {
|
||||
wrap_err!(crate::core::Service::install_service().await)
|
||||
wrap_err!(crate::core::Service::install_service().await)?;
|
||||
wrap_err!(crate::core::Service::start_service().await)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn uninstall_service() -> Result<(), String> {
|
||||
log_if_err!(crate::core::Service::stop_service().await);
|
||||
wrap_err!(crate::core::Service::uninstall_service().await)
|
||||
}
|
||||
}
|
||||
@@ -276,6 +283,11 @@ pub mod service {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn stop_service() -> Result<(), String> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn check_service() -> Result<(), String> {
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user