You've already forked AstralRinth
forked from didirus/AstralRinth
Profile Options (#120)
* init profile settings * more work * finish everything * Switch to index approach * Fix settings str split * Run lint
This commit is contained in:
@@ -36,6 +36,12 @@ export async function get(path, clearProjects) {
|
||||
return await invoke('profile_get', { path, clearProjects })
|
||||
}
|
||||
|
||||
// Get optimal java version from profile
|
||||
// Returns a java version
|
||||
export async function get_optimal_jre_key(path) {
|
||||
return await invoke('profile_get_optimal_jre_key', { path })
|
||||
}
|
||||
|
||||
// Get a copy of the profile set
|
||||
// Returns hashmap of path -> Profile
|
||||
export async function list(clearProjects) {
|
||||
@@ -99,3 +105,8 @@ export async function run_wait(path) {
|
||||
export async function edit(path, editProfile) {
|
||||
return await invoke('profile_edit', { path, editProfile })
|
||||
}
|
||||
|
||||
// Edits a profile's icon
|
||||
export async function edit_icon(path, iconPath) {
|
||||
return await invoke('profile_edit_icon', { path, iconPath })
|
||||
}
|
||||
|
||||
@@ -28,20 +28,6 @@ Memorysettings {
|
||||
|
||||
*/
|
||||
|
||||
// An example test function for getting/setting settings
|
||||
export async function test() {
|
||||
// First, print settings and store them to an object
|
||||
let settings = await get()
|
||||
console.log(JSON.stringify(settings))
|
||||
|
||||
// Then set some random settings in that object
|
||||
settings.java_8_path = '/example/path'
|
||||
|
||||
// Set the new settings object
|
||||
await set(settings)
|
||||
console.log(JSON.stringify(await get()))
|
||||
}
|
||||
|
||||
// Get full settings object
|
||||
export async function get() {
|
||||
return await invoke('settings_get')
|
||||
|
||||
Reference in New Issue
Block a user