feat: add service uninstall functionality and improve service operation flow

This commit is contained in:
Tunglies
2025-05-13 01:56:19 +08:00
parent 6578cd8c51
commit 1ddbe7c2cc
6 changed files with 100 additions and 19 deletions

View File

@@ -65,6 +65,19 @@ pub async fn change_clash_core(clash_core: String) -> CmdResult<Option<String>>
}
}
/// 启动核心
#[tauri::command]
pub async fn start_core() -> CmdResult {
wrap_err!(CoreManager::global().start_core().await)
}
/// 关闭核心
#[tauri::command]
pub async fn stop_core() -> CmdResult {
wrap_err!(CoreManager::global().stop_core().await)
}
/// 重启核心
#[tauri::command]
pub async fn restart_core() -> CmdResult {

View File

@@ -1,7 +1,6 @@
use super::CmdResult;
use crate::{
core::{service, CoreManager},
feat,
utils::i18n::t,
};