You've already forked AstralRinth
forked from didirus/AstralRinth
Mod Management API (#81)
* Profile mod management * remove print statement
This commit is contained in:
@@ -4,9 +4,9 @@ import { RouterView, RouterLink } from 'vue-router'
|
||||
import {
|
||||
ChevronLeftIcon,
|
||||
ChevronRightIcon,
|
||||
HomeIcon,
|
||||
SearchIcon,
|
||||
BookIcon,
|
||||
ClientIcon,
|
||||
LibraryIcon,
|
||||
PlusIcon,
|
||||
SettingsIcon,
|
||||
} from 'omorphia'
|
||||
@@ -42,9 +42,9 @@ list().then(
|
||||
<AccountsCard ref="accounts" />
|
||||
</suspense>
|
||||
<div class="pages-list">
|
||||
<RouterLink to="/" class="button-base nav-button"><ClientIcon /></RouterLink>
|
||||
<RouterLink to="/" class="button-base nav-button"><HomeIcon /></RouterLink>
|
||||
<RouterLink to="/browse" class="button-base nav-button"> <SearchIcon /></RouterLink>
|
||||
<RouterLink to="/library" class="button-base nav-button"> <BookIcon /></RouterLink>
|
||||
<RouterLink to="/library" class="button-base nav-button"> <LibraryIcon /></RouterLink>
|
||||
<button color="primary" class="button-base primary nav-button" icon-only>
|
||||
<PlusIcon />
|
||||
</button>
|
||||
|
||||
@@ -10,10 +10,10 @@ export async function addDefaultInstance() {
|
||||
return await invoke('profile_create_empty')
|
||||
}
|
||||
|
||||
/// Add empty default instance
|
||||
/// Creates instance
|
||||
/// Returns a path to the profile created
|
||||
export async function create() {
|
||||
return await invoke('profile_create')
|
||||
export async function create(name, game_version, modloader, loader_version, icon) {
|
||||
return await invoke('profile_create', { name, game_version, modloader, loader_version, icon })
|
||||
}
|
||||
|
||||
// Remove a profile
|
||||
@@ -33,6 +33,28 @@ export async function list() {
|
||||
return await invoke('profile_list')
|
||||
}
|
||||
|
||||
// Add a project to a profile from a version
|
||||
// Returns a path to the new project file
|
||||
export async function add_project_from_version(path, version_id) {
|
||||
return await invoke('profile_add_project_from_version', { path, version_id })
|
||||
}
|
||||
|
||||
// Add a project to a profile from a path + project_type
|
||||
// Returns a path to the new project file
|
||||
export async function add_project_from_path(path, project_path, project_type) {
|
||||
return await invoke('profile_add_project_from_path', { path, project_path, project_type })
|
||||
}
|
||||
|
||||
// Toggle disabling a project
|
||||
export async function toggle_disable_project(path, project_path) {
|
||||
return await invoke('profile_toggle_disable_project', { path, project_path })
|
||||
}
|
||||
|
||||
// Remove a project
|
||||
export async function remove_project(path, project_path) {
|
||||
return await invoke('profile_remove_project', { path, project_path })
|
||||
}
|
||||
|
||||
// Run Minecraft using a pathed profile
|
||||
// Returns PID of child
|
||||
export async function run(path) {
|
||||
|
||||
Reference in New Issue
Block a user