From f29c012bb8b6c438ee7d8532344aecf903f8b402 Mon Sep 17 00:00:00 2001 From: Donny Date: Tue, 3 Sep 2024 15:45:14 -0600 Subject: [PATCH] Added a button to see currently tracked programs --- src/app.html | 1 + src/routes/+layout.svelte | 56 +++++++++++++++++++++++++++++++++++++++ src/routes/+page.svelte | 44 +++++++++++++++--------------- 3 files changed, 80 insertions(+), 21 deletions(-) diff --git a/src/app.html b/src/app.html index 401b2af..b183f11 100644 --- a/src/app.html +++ b/src/app.html @@ -3,6 +3,7 @@ + %sveltekit.head% diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 7b25756..f5916d0 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,6 +1,30 @@ @@ -12,9 +36,41 @@ MPE Logo + + {#if asideVisible} +
+ {/if} + + + + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 970ef0a..fd897c0 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -3,6 +3,7 @@ import { onMount } from 'svelte'; let homeBase = "https://apilicenses.mpe.ca"; + console.log("Made by: Donavon McDowell"); @@ -37,6 +38,7 @@ const data = await response.json(); licenses = data; + licenses.sort((a, b) => a.program.localeCompare(b.program)); } catch (err) { error = `Failed to fetch licenses: ${err.message}`; } @@ -135,29 +137,29 @@ -
+

Current License Usage


- - - - - - - {#each licenses as license, index} - - - - - - {/each} -
IconProgram NameUsername
-
- {license.machine -
-

{license.program === 'Slide' ? 'Slide2' : (license.program === 'WINPROJ' ? 'Project' : license.program)}

{license.machine.toUpperCase()}
+ + + + + + + {#each licenses as license, index} + + + + + + {/each} +
IconProgram NameUsername
+
+ {license.machine +
+

{license.program === 'Slide' ? 'Slide2' : (license.program === 'WINPROJ' ? 'Project' : license.program)}

{license.machine.toUpperCase()}