mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
feat: add logging module and update running mode terminology
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
use super::CmdResult;
|
||||
use crate::{core::CoreManager, module::mihomo::MihomoManager};
|
||||
use crate::module::mihomo::MihomoManager;
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn get_proxies() -> CmdResult<serde_json::Value> {
|
||||
CoreManager::global().ensure_running_core().await;
|
||||
let mannager = MihomoManager::global();
|
||||
let proxies = mannager
|
||||
.refresh_proxies()
|
||||
@@ -15,7 +14,6 @@ pub async fn get_proxies() -> CmdResult<serde_json::Value> {
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn get_providers_proxies() -> CmdResult<serde_json::Value> {
|
||||
CoreManager::global().ensure_running_core().await;
|
||||
let mannager = MihomoManager::global();
|
||||
let providers = mannager
|
||||
.refresh_providers_proxies()
|
||||
|
||||
@@ -47,7 +47,7 @@ pub async fn get_system_info() -> CmdResult<String> {
|
||||
pub async fn get_running_mode() -> Result<String, String> {
|
||||
match CoreManager::global().get_running_mode().await {
|
||||
core::RunningMode::Service => Ok("service".to_string()),
|
||||
core::RunningMode::Sidecar => Ok("sidecar".to_string()),
|
||||
core::RunningMode::Sidecar => Ok("standalone".to_string()),
|
||||
core::RunningMode::NotRunning => Ok("not_running".to_string()),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user