New Instance Page Layout

This commit is contained in:
Cuptain 2025-03-14 14:44:38 +11:00
parent 2b21faf626
commit 1d7df8854f
5 changed files with 56 additions and 13 deletions

View File

@ -103,13 +103,21 @@
</script>
<main>
<div class=header>New Instance</div>
<br/>
<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}>{pack}</option>
{/each}
</select>
<div class=container>
<div class=version-container>
{#each modpacks as modpack}
<div class="input-container" id=input-container>
<input id={modpack} type="radio" bind:group={pack} on:change={onchange} name="radio" value={modpack}>
<div class="radio-tile">
<!--icon goes here later-->
<label for={modpack}>{modpack}</label>
</div>
</div>
{/each}
</div>
<div class=loader-options>
<input type="radio" bind:group={loader} checked id="noLoader" name="Loader" value="none" />
<label for="noLoader">None</label>
<input type="radio" bind:group={loader} id="fabric" name="Loader" value="fabric" />
@ -141,6 +149,11 @@
{/each}
</select>
{/if}
</div>
</div>
<div transition:slide="{{duration:300}}">
<br/>
<button on:click={install}>Install</button>
<button on:click={() => {$addingInstance = false}}>Cancel</button>
@ -149,7 +162,37 @@
<style>
main{
margin-top: 16rem;
margin-top: 1rem;
margin-left: 3rem;
display: flex;
flex-direction: column;
--text-primary: #b6b6b6;
--text-secondary: #ececec;
--bg-secondary: #2c2c33;
--bg-primary: #141418;
}
.container{
display: flex;
flex-direction: row;
justify-content: center;
max-height: 100%;
}
.version-container{
display: flex;
flex-direction: column;
max-height: 30rem;
flex-shrink: 0;
min-height: 0;
max-width: 20rem;
overflow-y: scroll;
scrollbar-color: var(--text-secondary) var(--bg-secondary);
overflow-x: hidden;
}
.input-container{
display: flex;
}
#pack{
display: flex;
max-width: 10rem;
}
</style>

View File

@ -74,7 +74,7 @@ export namespace main {
export class FabricMeta {
Version: number;
Libraries: FabricLibraries;
MainClass: Record<string, string>;
MainClass: {[key: string]: string};
static createFrom(source: any = {}) {
return new FabricMeta(source);
@ -332,7 +332,7 @@ export namespace main {
export class QuiltMeta {
Version: number;
Libraries: QuiltLibraries;
MainClass: Record<string, string>;
MainClass: {[key: string]: string};
static createFrom(source: any = {}) {
return new QuiltMeta(source);

View File

@ -134,7 +134,7 @@ export function WindowIsFullscreen(): Promise<boolean>;
// [WindowSetSize](https://wails.io/docs/reference/runtime/window#windowsetsize)
// Sets the width and height of the window.
export function WindowSetSize(width: number, height: number): void;
export function WindowSetSize(width: number, height: number): Promise<Size>;
// [WindowGetSize](https://wails.io/docs/reference/runtime/window#windowgetsize)
// Gets the width and height of the window.

View File

@ -4,7 +4,7 @@ go 1.22.4
toolchain go1.23.2
require github.com/wailsapp/wails/v2 v2.10.1
require github.com/wailsapp/wails/v2 v2.9.2
require github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf

View File

@ -57,8 +57,8 @@ github.com/wailsapp/go-webview2 v1.0.19 h1:7U3QcDj1PrBPaxJNCui2k1SkWml+Q5kvFUFyT
github.com/wailsapp/go-webview2 v1.0.19/go.mod h1:qJmWAmAmaniuKGZPWwne+uor3AHMB5PFhqiK0Bbj8kc=
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
github.com/wailsapp/wails/v2 v2.10.1 h1:QWHvWMXII2nI/nXz77gpPG8P3ehl6zKe+u4su5BWIns=
github.com/wailsapp/wails/v2 v2.10.1/go.mod h1:zrebnFV6MQf9kx8HI4iAv63vsR5v67oS7GTEZ7Pz1TY=
github.com/wailsapp/wails/v2 v2.9.2 h1:Xb5YRTos1w5N7DTMyYegWaGukCP2fIaX9WF21kPPF2k=
github.com/wailsapp/wails/v2 v2.9.2/go.mod h1:uehvlCwJSFcBq7rMCGfk4rxca67QQGsbg5Nm4m9UnBs=
github.com/zhyee/zipstream v0.0.0-20230625125559-133d8d1afaa0 h1:BcjUUYzMORs7sJtOCWLXaelG7woHMN1QEs4yCB1QZ48=
github.com/zhyee/zipstream v0.0.0-20230625125559-133d8d1afaa0/go.mod h1:aaGtAo3dTqYtHjcliPNlyXMIIodvGm8y6uK2KMTYHrk=
golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=