mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
feat: add service uninstall functionality and improve service operation flow
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use super::CmdResult;
|
||||
use crate::{
|
||||
core::{service, CoreManager},
|
||||
feat,
|
||||
utils::i18n::t,
|
||||
};
|
||||
|
||||
|
||||
@@ -217,8 +217,11 @@ pub fn run() {
|
||||
cmd::get_portable_flag,
|
||||
cmd::get_network_interfaces,
|
||||
cmd::get_system_hostname,
|
||||
cmd::restart_core,
|
||||
cmd::restart_app,
|
||||
// 内核管理
|
||||
cmd::start_core,
|
||||
cmd::stop_core,
|
||||
cmd::restart_core,
|
||||
// 启动命令
|
||||
cmd::notify_ui_ready,
|
||||
cmd::update_ui_stage,
|
||||
|
||||
Reference in New Issue
Block a user