From 46d0c301fd587d451721d3d24fbec14ef73637da Mon Sep 17 00:00:00 2001
From: exejar <56853437+exejar@users.noreply.github.com>
Date: Thu, 29 Feb 2024 20:06:54 -0500
Subject: [PATCH] Created functionality for OverviewSubPage and it's page
items.
Created PopUp component for pre-styled dialog modals
---
.../pages/sub/OverviewSubPage.svelte | 8 +-
.../pages/sub/items/Analytics.svelte | 69 +++++++++-
.../pages/sub/items/ConsoleOutput.svelte | 119 ++++++++----------
.../pages/sub/items/ProcessList.svelte | 72 ++++++++---
.../popups/CreateLaunchProfilePopUp.svelte | 55 ++++++++
src/components/util/PopUp.svelte | 58 +++++++++
src/scripts/shared.ts | 39 +++++-
7 files changed, 329 insertions(+), 91 deletions(-)
create mode 100644 src/components/popups/CreateLaunchProfilePopUp.svelte
create mode 100644 src/components/util/PopUp.svelte
diff --git a/src/components/pages/sub/OverviewSubPage.svelte b/src/components/pages/sub/OverviewSubPage.svelte
index e1e4da6..f14e917 100644
--- a/src/components/pages/sub/OverviewSubPage.svelte
+++ b/src/components/pages/sub/OverviewSubPage.svelte
@@ -3,14 +3,16 @@
import ProcessList from "./items/ProcessList.svelte";
import Analytics from "./items/Analytics.svelte";
+ let consoleOutput: ConsoleOutput
+ let instances: number
Analytics
@@ -5,19 +64,19 @@
Ram Usage
- 0.01%
+ {memoryUsage === "N/A" ? memoryUsage : `${memoryUsage}mb`}
-
MC Processes
- 10 Processes
+ MC Process Count
+ {instances} {instances > 1 ? "Processes" : "Process"}
Time Played
- 10 Hours
+ {timePlayed}
Avg. Launch
- 10 Seconds
+ {avgLaunchTime}
diff --git a/src/components/pages/sub/items/ConsoleOutput.svelte b/src/components/pages/sub/items/ConsoleOutput.svelte
index 71607ce..6cf195a 100644
--- a/src/components/pages/sub/items/ConsoleOutput.svelte
+++ b/src/components/pages/sub/items/ConsoleOutput.svelte
@@ -1,68 +1,45 @@
@@ -76,14 +53,22 @@
-
PName: Lunar
+ Client: {client}
-
PID: 5728
+ PID: {pid}
- {longString}
+ {#if switchingConsole}
+
+
+
+ {:else}
+ {#each [...output.values()] as line}
+
{line}
+ {/each}
+ {/if}
diff --git a/src/components/pages/sub/items/ProcessList.svelte b/src/components/pages/sub/items/ProcessList.svelte
index f9c60dd..ef0036e 100644
--- a/src/components/pages/sub/items/ProcessList.svelte
+++ b/src/components/pages/sub/items/ProcessList.svelte
@@ -1,22 +1,66 @@
@@ -24,8 +68,7 @@
Minecraft Processes
-
-
+
{mcProcess.pid}
{mcProcess.info.client}
@@ -33,9 +76,10 @@
killProcess(mcProcess.pid), icon: "fa-solid fa-skull"},
- {label: "Create Launch Profile", action: () => createLaunchProfile(mcProcess), icon: "fa-solid fa-plus"},
+ {label: "Create Launch Profile", action: () => popup.startCreateLaunchProfile(mcProcess.info), icon: "fa-solid fa-plus"},
{label: "Process Info", action: () => showProcessInfo(mcProcess), icon: "fa-solid fa-info"}
]}/>
-
+
+
\ No newline at end of file
diff --git a/src/components/popups/CreateLaunchProfilePopUp.svelte b/src/components/popups/CreateLaunchProfilePopUp.svelte
new file mode 100644
index 0000000..3dc29fd
--- /dev/null
+++ b/src/components/popups/CreateLaunchProfilePopUp.svelte
@@ -0,0 +1,55 @@
+
+
+