implemented open instance folder button

This commit is contained in:
= 2024-11-26 21:37:26 -07:00
parent fab46be020
commit 9d61ea470a
5 changed files with 9 additions and 4 deletions

View File

@ -73,7 +73,6 @@ func openbrowser(url string) {
} }
func (a *App) CheckPrerequisites() { func (a *App) CheckPrerequisites() {
openbrowser("C:\\")
buff := new(bytes.Buffer) buff := new(bytes.Buffer)
err := HttpDownload("launcher.json", buff, nil) err := HttpDownload("launcher.json", buff, nil)
fmt.Printf("Starting\n") fmt.Printf("Starting\n")

View File

@ -1 +1 @@
48cb20b8d107dab0a7876a449352234a ad9da3c17151b053a4d2fda8e3578901

View File

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import {instances, loading, navMargin} from './global' import {instances, loading, navMargin} from './global'
import {InstallVanilla, LaunchInstance, GetInstances, InstallForge, InstallQuilt, InstallFabric, CheckUpdate} from '../wailsjs/go/main/InstanceManager.js' import {OpenInstanceFolder, InstallVanilla, LaunchInstance, GetInstances, InstallForge, InstallQuilt, InstallFabric, CheckUpdate} from '../wailsjs/go/main/InstanceManager.js'
import {GetVersions} from '../wailsjs/go/main/App.js' import {GetVersions} from '../wailsjs/go/main/App.js'
import {onMount, createEventDispatcher} from 'svelte' import {onMount, createEventDispatcher} from 'svelte'
var testArray = ["test","test2","test3"]; var testArray = ["test","test2","test3"];
@ -53,7 +53,7 @@ import {onMount, createEventDispatcher} from 'svelte'
</div> </div>
<div class="options-container"> <div class="options-container">
<button class="launch-button" on:click={launchclick}>Launch {radio}</button> <button class="launch-button" on:click={launchclick}>Launch {radio}</button>
<button class="option-button">Open Instance Folder</button> <button class="option-button" on:click={() => {OpenInstanceFolder(radio)}}>Open Instance Folder</button>
</div> </div>
</div> </div>

View File

@ -25,4 +25,6 @@ export function InstallVanilla(arg1:string,arg2:string):Promise<void>;
export function LaunchInstance(arg1:string):Promise<void>; export function LaunchInstance(arg1:string):Promise<void>;
export function OpenInstanceFolder(arg1:string):Promise<void>;
export function SearchInstances():Promise<void>; export function SearchInstances():Promise<void>;

View File

@ -46,6 +46,10 @@ export function LaunchInstance(arg1) {
return window['go']['main']['InstanceManager']['LaunchInstance'](arg1); return window['go']['main']['InstanceManager']['LaunchInstance'](arg1);
} }
export function OpenInstanceFolder(arg1) {
return window['go']['main']['InstanceManager']['OpenInstanceFolder'](arg1);
}
export function SearchInstances() { export function SearchInstances() {
return window['go']['main']['InstanceManager']['SearchInstances'](); return window['go']['main']['InstanceManager']['SearchInstances']();
} }