You've already forked AstralRinth
forked from didirus/AstralRinth
* Initial bug fixes * fix compile error on non-mac * Fix even more bugs * Fix more * fix more * fix build * fix build * working basic * removed zip * working functions * merge fixes * fixed loadintg bar bug * changed to one layer deep * forge version numbers * improvements + refactoring * renamed things to fit plugin * fixed bugs * removed println * overrides dont include mrpack * merge * fixes * fixes * fixed deletion * merge errors * force sync before export * removed testing * missed line * removed console log * mac error reverted * incoreclty named helper * added to new register method * review changes * minor changes * moved create pack * renamed function --------- Co-authored-by: Jai A <jaiagr+gpg@pm.me>
39 lines
1.2 KiB
Rust
39 lines
1.2 KiB
Rust
use crate::api::Result;
|
|
use daedalus::minecraft::VersionManifest;
|
|
use daedalus::modded::Manifest;
|
|
|
|
pub fn init<R: tauri::Runtime>() -> tauri::plugin::TauriPlugin<R> {
|
|
tauri::plugin::Builder::new("metadata")
|
|
.invoke_handler(tauri::generate_handler![
|
|
metadata_get_game_versions,
|
|
metadata_get_fabric_versions,
|
|
metadata_get_forge_versions,
|
|
metadata_get_quilt_versions,
|
|
])
|
|
.build()
|
|
}
|
|
|
|
/// Gets the game versions from daedalus
|
|
#[tauri::command]
|
|
pub async fn metadata_get_game_versions() -> Result<VersionManifest> {
|
|
Ok(theseus::metadata::get_minecraft_versions().await?)
|
|
}
|
|
|
|
/// Gets the fabric versions from daedalus
|
|
#[tauri::command]
|
|
pub async fn metadata_get_fabric_versions() -> Result<Manifest> {
|
|
Ok(theseus::metadata::get_fabric_versions().await?)
|
|
}
|
|
|
|
/// Gets the forge versions from daedalus
|
|
#[tauri::command]
|
|
pub async fn metadata_get_forge_versions() -> Result<Manifest> {
|
|
Ok(theseus::metadata::get_forge_versions().await?)
|
|
}
|
|
|
|
/// Gets the quilt versions from daedalus
|
|
#[tauri::command]
|
|
pub async fn metadata_get_quilt_versions() -> Result<Manifest> {
|
|
Ok(theseus::metadata::get_quilt_versions().await?)
|
|
}
|