You've already forked AstralRinth
forked from didirus/AstralRinth
Modpack support (#60)
* Modpack support * Finish feature * Tauri errors fix (#61) * async impl * working * fmt and redundancy * moved ? to if let Ok block * Finish modpacks support * remove generated file * fix compile err * fix lint * Fix code review comments + forge support --------- Co-authored-by: Wyatt Verchere <wverchere@gmail.com>
This commit is contained in:
17
theseus_gui/src-tauri/src/api/pack.rs
Normal file
17
theseus_gui/src-tauri/src/api/pack.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use crate::api::Result;
|
||||
use std::path::{Path, PathBuf};
|
||||
use theseus::prelude::*;
|
||||
|
||||
// Creates a pack from a version ID (returns a path to the created profile)
|
||||
// invoke('pack_install_version_id', version_id)
|
||||
#[tauri::command]
|
||||
pub async fn pack_install_version_id(version_id: String) -> Result<PathBuf> {
|
||||
let res = pack::install_pack_from_version_id(version_id).await?;
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn pack_install_file(path: &Path) -> Result<PathBuf> {
|
||||
let res = pack::install_pack_from_file(path.to_path_buf()).await?;
|
||||
Ok(res)
|
||||
}
|
||||
Reference in New Issue
Block a user