Vydané zdroje
Stáhnout zdroje ZIP
CH-J Tools
Procházejte adresáře a soubory konkrétního vydání aplikace.
CH-J / Server Manager
872 souborů
core-20261030T220507Z-61e4558d889f
Přidáno: · Sestaveno:
1
//! Module manager commands for the main window (formerly `plugins:*`).3
use super::{logged, main_core, text, CommandResult};4
use crate::core::app::CoreSlot;5
use serde_json::Value;6
use tauri::{State, Webview};8
#[tauri::command]9
pub async fn core_modules_list(webview: Webview, slot: State<'_, CoreSlot>) -> CommandResult {10
let core = main_core(&webview, &slot)?;11
logged(&core, "plugins:list", core.services.modules.registry.list_installed().map(Value::Array))12
}14
#[tauri::command]15
pub async fn core_modules_get_state(webview: Webview, slot: State<'_, CoreSlot>) -> CommandResult {16
let core = main_core(&webview, &slot)?;17
logged(&core, "plugins:getState", core.services.modules.get_state())18
}20
#[tauri::command]21
pub async fn core_modules_check_catalog(webview: Webview, slot: State<'_, CoreSlot>) -> CommandResult {22
let core = main_core(&webview, &slot)?;23
let result = core.services.modules.check_catalog(&core).await;24
logged(&core, "plugins:checkCatalog", result)25
}27
#[tauri::command]28
pub async fn core_modules_install(webview: Webview, slot: State<'_, CoreSlot>, payload: Option<Value>) -> CommandResult {29
let core = main_core(&webview, &slot)?;30
let payload = super::payload(payload);31
let result = async {32
core.services.biometrics.require_sensitive_action().await?;33
core.services.modules.install(&core, text(&payload, "releaseId")).await34
}35
.await;36
logged(&core, "plugins:install", result)37
}39
#[tauri::command]40
pub async fn core_modules_uninstall(webview: Webview, slot: State<'_, CoreSlot>, payload: Option<Value>) -> CommandResult {41
let core = main_core(&webview, &slot)?;42
let payload = super::payload(payload);43
let result = async {44
core.services.biometrics.require_sensitive_action().await?;45
core.services.modules.uninstall(&core, text(&payload, "pluginId")).await46
}47
.await;48
logged(&core, "plugins:uninstall", result)49
}51
#[tauri::command]52
pub async fn core_modules_open(webview: Webview, slot: State<'_, CoreSlot>, payload: Option<Value>) -> CommandResult {53
let core = main_core(&webview, &slot)?;54
let payload = super::payload(payload);55
logged(&core, "plugins:open", core.services.modules.open(&core, text(&payload, "pluginId")))56
}SHA-256
42eca85afa98bc684e58a97714aca081c3f282ac57598ec6a02f3cf42432613cCH-J Proprietary Software License 1.14 · Zdroje jsou zveřejněny pod CH-J Proprietary Software License 1.14. Jejich dostupnost nemění licenční podmínky ani neposkytuje další oprávnění.
SHA-256 archivu
77380d4805485ffa4027fbe7858b5836f197a4aa9d52358a43e2d12d018744df