Instance switching in good ui
This commit is contained in:
parent
bd787bdfa2
commit
af6ff50cfd
@ -1,16 +1,18 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
//import {LaunchInstance} from 'wailsjs/go/main/InstanceManager';
|
import {LaunchInstance} from '../wailsjs/go/main/InstanceManager';
|
||||||
import {instances, loading} from './global'
|
import {instances, loading} from './global'
|
||||||
var testArray = ["test","test2","test3"];
|
var testArray = ["test","test2","test3"];
|
||||||
|
|
||||||
let pack;
|
let pack: string;
|
||||||
|
let instance: string
|
||||||
|
let radio: string
|
||||||
|
|
||||||
//function launchclick(event) {
|
function launchclick(event) {
|
||||||
// $loading = true
|
$loading = true
|
||||||
// LaunchInstance(pack).then(() => {
|
LaunchInstance(radio).then(() => {
|
||||||
// $loading = false
|
$loading = false
|
||||||
// })
|
})
|
||||||
//}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -18,12 +20,12 @@ import {instances, loading} from './global'
|
|||||||
<main>
|
<main>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="tile-group">
|
<div class="tile-group">
|
||||||
{#each $instances as i}
|
{#each $instances as instance}
|
||||||
<div class="input-container">
|
<div class="input-container">
|
||||||
<input id={i} type="radio" name="radio" on:click={pack = instances[i]}>
|
<input id={instance} bind:group={radio} type="radio" name="radio" value={instance}>
|
||||||
<div class="radio-tile">
|
<div class="radio-tile">
|
||||||
<!--icon goes here later-->
|
<!--icon goes here later-->
|
||||||
<label for={i}>{i}</label>
|
<label for={instance}>{instance}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
@ -31,7 +33,7 @@ import {instances, loading} from './global'
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="options-container">
|
<div class="options-container">
|
||||||
<button class="launch-button">{pack}</button>
|
<button class="launch-button" on:click={launchclick}>{radio}</button>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<style>
|
<style>
|
||||||
|
Loading…
Reference in New Issue
Block a user