feat: reorganize service commands and implement logging for service management

This commit is contained in:
Tunglies
2025-03-26 15:02:08 +08:00
parent 5a0eb56f70
commit 81968a579d
6 changed files with 48 additions and 29 deletions

View File

@@ -1,8 +1,7 @@
use super::CmdResult;
use crate::{
core::{self, handle, service, CoreManager},
core::{self, handle, CoreManager},
module::sysinfo::PlatformSpecification,
wrap_err,
};
use once_cell::sync::Lazy;
use std::{
@@ -52,12 +51,6 @@ pub async fn get_running_mode() -> Result<String, String> {
}
}
/// 安装/重装系统服务
#[tauri::command]
pub async fn install_service() -> CmdResult {
wrap_err!(service::reinstall_service().await)
}
/// 获取应用的运行时间(毫秒)
#[tauri::command]
pub fn get_app_uptime() -> CmdResult<i64> {