Files
AstralRinth/theseus_gui/src/helpers/pack.js
Geometrically a62d931fe2 Wire Profile Backend to Frontend (#71)
* Search updates

* fixes2

* Some more work

* start instance page wiring

* Pack installation + Profile viewing

* Remove print statement

* Fix disappearing profiles

* fix compile err

* Finish Instance Running

* remove print statement

* fix prettier

* Fix clippy + early return
2023-04-08 18:54:38 -07:00

17 lines
570 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(versionId) {
return await invoke('pack_install_version_id', { versionId })
}
// Installs pack from a path
export async function install_from_file(path) {
return await invoke('pack_install_file', { path })
}