added basic slide transition
This commit is contained in:
parent
4e6ea6f22b
commit
98e03a3e60
@ -5,6 +5,7 @@
|
||||
import {CheckPrerequisites} from '../wailsjs/go/main/App.js'
|
||||
import { onMount } from 'svelte'
|
||||
import { loading } from './global.ts'
|
||||
import { slide } from 'svelte/transition'
|
||||
|
||||
let width: int = 10
|
||||
|
||||
@ -18,9 +19,13 @@
|
||||
<main>
|
||||
<img alt="Wails logo" id="logo" src="{logo}">
|
||||
{#if $loading}
|
||||
<div transition:slide="{{duration:100}}">
|
||||
<Loading />
|
||||
</div>
|
||||
{:else}
|
||||
<div transition:slide="{{duration:100}}">
|
||||
<Instances />
|
||||
</div>
|
||||
{/if}
|
||||
</main>
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
import {LaunchInstance} from '../wailsjs/go/main/Prism.js'
|
||||
import {onMount} from 'svelte'
|
||||
import {loading} from './global.ts'
|
||||
import {slide} from 'svelte/transition'
|
||||
|
||||
let modpacks: Modpack[] = []
|
||||
let pack: string
|
||||
@ -67,6 +68,7 @@
|
||||
<button on:click={onclick}>Launch</button>
|
||||
<br/>
|
||||
{#if addingInstance}
|
||||
<div transition:slide="{{duration:300}}">
|
||||
<select id="pack" on:change={onchange} bind:value={pack} name="pack">Select a Modpack:
|
||||
{#each modpacks as pack}
|
||||
<option value={pack.Id}>{pack.Name}</option>
|
||||
@ -77,6 +79,7 @@
|
||||
<br/>
|
||||
<button on:click={install}>Install</button>
|
||||
<button on:click={() => {addingInstance = false}}>Cancel</button>
|
||||
</div>
|
||||
{:else}
|
||||
<button on:click={() => {addingInstance = true}}>Add Instance</button>
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user