Files
pages/theseus_gui/src/helpers/pack.js
Geometrically b9a3a6dc11 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>
2023-04-05 19:04:09 -07:00

17 lines
564 B
JavaScript

/**
* All theseus API calls return serialized values (both return values and errors);
* So, for example, addDefaultInstance creates a blank Profile object, where the Rust struct is serialized,
* and deserialized into a usable JS object.
*/
import { invoke } from '@tauri-apps/api/tauri'
// Installs pack from a version ID
export async function install(version_id) {
return await invoke('pack_install_version_id', version_id)
}
// Installs pack from a path
export async function install_from_file(path) {
return await invoke('pack_install_file', path)
}