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 * Search fixes * Fix small instance ui * working basic * fix javaw issue * removed zip * working functions * merge fixes * fixed loadintg bar bug * menu fix * wait for settings to sync * safety expanded and for loading bars * swtiching to windows * minimize * default landing page * test link registry * url redirection * fix formatting * .mrpack windows * working mrpack reader * changed to one layer deep * working .mrpack + command handling for both opening and existing process * forge version numbers * working mac opening mrpack * reverted changes * prettier/fmt * missed debug statement * 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 * additional fixes * added removed merges * fixed mislabled invokes * mac * added to new register method * comments, cleanup * mac clippy change * review changes * minor changes * moved create pack * removed playground compilation bug * fixed linux bug; other add ons * fixed review commets * cicd fix * mistaken import for prod * cicd fix --------- Co-authored-by: Jai A <jaiagr+gpg@pm.me>
36 lines
1.2 KiB
JavaScript
36 lines
1.2 KiB
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'
|
|
|
|
// Initialize the theseus API state
|
|
// This should be called during the initializion/opening of the launcher
|
|
export async function initialize_state() {
|
|
return await invoke('initialize_state')
|
|
}
|
|
|
|
// Gets active progress bars
|
|
export async function progress_bars_list() {
|
|
return await invoke('plugin:utils|progress_bars_list')
|
|
}
|
|
|
|
// Check if any safe loading bars are active
|
|
export async function check_safe_loading_bars_complete() {
|
|
return await invoke('plugin:utils|safety_check_safe_loading_bars')
|
|
}
|
|
|
|
// Get opening command
|
|
// For example, if a user clicks on an .mrpack to open the app.
|
|
// This should be called once and only when the app is done booting up and ready to receive a command
|
|
// Returns a Command struct- see events.js
|
|
export async function get_opening_command() {
|
|
return await invoke('plugin:utils|get_opening_command')
|
|
}
|
|
|
|
// Wait for settings to sync
|
|
export async function await_sync() {
|
|
return await invoke('plugin:utils|await_sync')
|
|
}
|