mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-19 11:25:56 +00:00
feat(ipc): expose public module catalogue Tauri command and API client
This commit is contained in:
1 parent
6bbdef1989
commit
c53fc64d8b
2 files changed
+56
No files matched your search
@@ -2820,6 +2820,18 @@ async fn analyze_github_module(
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn get_public_module_catalog(
|
||||
force_refresh: Option<bool>,
|
||||
) -> std::result::Result<coa_core::catalogue::PublicCatalogueResponse, UiError> {
|
||||
let cache_dir = data_dir().join("catalogue");
|
||||
let force = force_refresh.unwrap_or(false);
|
||||
blocking(move || {
|
||||
coa_core::catalogue::fetch_or_load_catalogue(&cache_dir, force)
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn preview_toolchain_status() -> coa_core::build_engine::ToolchainStatus {
|
||||
coa_core::build_engine::detect_toolchain()
|
||||
@@ -3212,6 +3224,7 @@ pub fn run() {
|
||||
realmlist_activate,
|
||||
modules_list,
|
||||
analyze_github_module,
|
||||
get_public_module_catalog,
|
||||
realm_profiles,
|
||||
realm_select,
|
||||
realm_simultaneous,
|
||||
|
||||
Reference in new issue
Block a user