From 64b939e6ac0b196d18ee183a37a40b0bf7927a80 Mon Sep 17 00:00:00 2001 From: Natsuu Date: Wed, 14 Jan 2026 03:41:18 +0000 Subject: refactor: split App.svelte into components --- ui/src/App.svelte | 793 +++--------------------------------------------------- 1 file changed, 30 insertions(+), 763 deletions(-) (limited to 'ui/src/App.svelte') diff --git a/ui/src/App.svelte b/ui/src/App.svelte index 9b7fe93..3750f11 100644 --- a/ui/src/App.svelte +++ b/ui/src/App.svelte @@ -1,372 +1,36 @@
- - +
@@ -381,417 +45,20 @@
- {#if currentView === "home"} - -
-
- -
-

- MINECRAFT -

-
- JAVA EDITION - Release 1.20.4 -
-
- {:else if currentView === "versions"} -
-

Versions

-
- {#if versions.length === 0} -
Loading versions...
- {:else} - {#each versions as version} - - {/each} - {/if} -
-
- {:else if currentView === "settings"} -
-

Settings

- -
- -
- -
- - -
- - {#if javaInstallations.length > 0} -
-

Detected Java Installations:

- {#each javaInstallations as java} - - {/each} -
- {/if} - -

- The command or path to the Java Runtime Environment. Click "Auto Detect" to find installed Java versions. -

-
- - -
- - -
-
- - -
-
- - -
-
-
- - -
- -
-
- - -
-
- - -
-
-
- -
- -
-
-
+ {#if uiState.currentView === "home"} + + {:else if uiState.currentView === "versions"} + + {:else if uiState.currentView === "settings"} + {/if}
- -
-
-
e.key === "Enter" && openLoginModal()} - > -
- {#if currentAccount} - {currentAccount.username} - {:else} - ? - {/if} -
-
-
- {currentAccount ? currentAccount.username : "Click to Login"} -
-
- - {currentAccount ? "Ready" : "Guest"} -
-
-
- - -
- -
-
- - -
- - -
-
+
- - {#if isLoginModalOpen} -
-
-
-

Login

- -
- - {#if loginMode === "select"} -
- - -
-
-
-
-
- OR -
-
- -
- e.key === "Enter" && performOfflineLogin()} - /> - -
-
- {:else if loginMode === "microsoft"} -
- {#if msLoginLoading && !deviceCodeData} -
- Starting login flow... -
- {:else if deviceCodeData} -
-

1. Go to this URL:

- - -

2. Enter this code:

-
- navigator.clipboard.writeText( - deviceCodeData?.user_code || "" - )} - > - {deviceCodeData.user_code} -
-

Click code to copy

- -
-
-
- {msLoginStatus} -
-

This window will update automatically.

-
- - -
- {/if} -
- {/if} -
-
- {/if} - - - {#if status !== "Ready"} -
-
-
Status
- -
-
{status}
-
-
-
-
- {/if} - - + + - +
-- cgit v1.2.3-70-g09d2