diff --git a/public/audio/I Wanna Kno.mp3 b/public/audio/I Wanna Kno.mp3 deleted file mode 100644 index 71456ef..0000000 Binary files a/public/audio/I Wanna Kno.mp3 and /dev/null differ diff --git a/public/audio/Lady.mp3 b/public/audio/Lady.mp3 deleted file mode 100644 index 283b0cb..0000000 Binary files a/public/audio/Lady.mp3 and /dev/null differ diff --git a/public/audio/Lockjaw.mp3 b/public/audio/Lockjaw.mp3 deleted file mode 100644 index 79301c0..0000000 Binary files a/public/audio/Lockjaw.mp3 and /dev/null differ diff --git a/public/audio/Ms Jackson.mp3 b/public/audio/Ms Jackson.mp3 deleted file mode 100644 index 58b119d..0000000 Binary files a/public/audio/Ms Jackson.mp3 and /dev/null differ diff --git a/public/audio/Rapp Snitch Knishes.mp3 b/public/audio/Rapp Snitch Knishes.mp3 deleted file mode 100644 index 1056b76..0000000 Binary files a/public/audio/Rapp Snitch Knishes.mp3 and /dev/null differ diff --git a/public/events.js b/public/events.js index 20595ab..2679270 100644 --- a/public/events.js +++ b/public/events.js @@ -39,3 +39,25 @@ function SetStatusChanged(status) { }) ); } + +function SetFilesTotal(total) { + element.dispatchEvent( + new CustomEvent("setFilesTotal", { + detail: { + total, + }, + }) + ); +} + +function SetFilesNeeded(needed) { + element.dispatchEvent( + new CustomEvent("setFilesNeeded", { + detail: { + needed, + }, + }) + ); +} + +GameDetails("cirro's sandbox / FASTDL WIRE PAC3 ARC9 LVS", null, "gm_construct", null, null, "sandbox", null, null, null); diff --git a/public/img/1.jpg b/public/img/1.jpg deleted file mode 100644 index 9227222..0000000 Binary files a/public/img/1.jpg and /dev/null differ diff --git a/public/img/11.jpg b/public/img/11.jpg new file mode 100644 index 0000000..95917ee Binary files /dev/null and b/public/img/11.jpg differ diff --git a/public/img/2.jpg b/public/img/2.jpg deleted file mode 100644 index f968461..0000000 Binary files a/public/img/2.jpg and /dev/null differ diff --git a/public/img/3.jpg b/public/img/3.jpg deleted file mode 100644 index 6ca7cc4..0000000 Binary files a/public/img/3.jpg and /dev/null differ diff --git a/public/img/7.jpg b/public/img/7.jpg deleted file mode 100644 index 3691c87..0000000 Binary files a/public/img/7.jpg and /dev/null differ diff --git a/src/App.svelte b/src/App.svelte index f8e7895..5783670 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,58 +1,56 @@ {#if $gameDetails} -
-
+
+
- {#if audioMethod === "playlist"} - - {:else if audioMethod === "radio"} - - {/if}
-
+
-
+

You're joining

-

{$gameDetails?.servername}

+

{$gameDetails?.servername}

-
-
-
- +
+
+ {#each staff as member} + + {/each} +
+
+
+
+
+ {$statusChanged.status}
- {$title}
-
-
-
- -

{$gameDetails?.mapname}

-
-
- -

{$gameDetails?.gamemode}

+
+
+ +

{$gameDetails?.mapname}

+
+
+ +

{$gameDetails?.gamemode}

+
{:else} -
-
- +
+
+
{/if} diff --git a/src/config.json b/src/config.json index f9956f5..e0107aa 100644 --- a/src/config.json +++ b/src/config.json @@ -1,28 +1,13 @@ { "imageDuration": 10, - "images": [ - "/img/1.jpg", - "/img/2.jpg", - "/img/3.jpg", - "/img/4.jpg", - "/img/5.jpg", - "/img/6.jpg", - "/img/7.jpg", - "/img/8.jpg", - "/img/9.jpg", - "/img/10.jpg" - ], - - "audioMethod": "playlist", - - "radio": "https://noise.madhouselabs.net", - "radioServerName": "dope", - - "playlist": [ - { "title": "MF DOOM - Rapp Snitch Knishes", "location": "/audio/Rapp Snitch Knishes.mp3" }, - { "title": "Modjo - Lady (Hear Me Tonight)", "location": "/audio/Lady.mp3" }, - { "title": "King Geedorah - Lockjaw", "location": "/audio/Lockjaw.mp3" }, - { "title": "OutKast - Ms. Jackson", "location": "/audio/Ms Jackson.mp3" }, - { "title": "2 Mello - I Wanna Kno", "location": "/audio/I Wanna Kno.mp3" } + "images": ["/img/4.jpg", "/img/5.jpg", "/img/6.jpg", "/img/8.jpg", "/img/9.jpg", "/img/10.jpg", "/img/11.jpg"], + "staff": [ + { "steamid": "76561198824911329", "color": "#c4bef3" }, + { "steamid": "76561198112219274", "color": "#e21884", "_comment": "lilyith" }, + { "steamid": "76561198107316900", "color": "#e21884", "_comment": "alexcat" }, + { "steamid": "76561198101686025", "color": "#ffe23f", "_comment": "bluddfang" }, + { "steamid": "76561198271335686", "color": "#ffe23f", "_comment": "shelby" }, + { "steamid": "76561198196375903", "color": "#ffe23f", "_comment": "westernspy" }, + { "steamid": "76561198277445333", "color": "#ffe23f", "_comment": "crate" } ] } diff --git a/src/lib/Playlist.svelte b/src/lib/Playlist.svelte deleted file mode 100644 index 4bb4cad..0000000 --- a/src/lib/Playlist.svelte +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/src/lib/Radio.svelte b/src/lib/Radio.svelte deleted file mode 100644 index 98711db..0000000 --- a/src/lib/Radio.svelte +++ /dev/null @@ -1,38 +0,0 @@ - - - diff --git a/src/lib/Slideshow.svelte b/src/lib/Slideshow.svelte index 08ecfd3..5f71efe 100644 --- a/src/lib/Slideshow.svelte +++ b/src/lib/Slideshow.svelte @@ -1,6 +1,6 @@ + +{#await steam(steamid)} +
+
+

.

+
+{:then { name, avatar }} +
+ +

{name}

+
+{/await} diff --git a/src/lib/events.js b/src/lib/events.js index 994d958..9384296 100644 --- a/src/lib/events.js +++ b/src/lib/events.js @@ -4,7 +4,9 @@ const element = document.getElementsByTagName("html")[0]; export const gameDetails = writable(); export const downloadingFile = writable(); -export const statusChanged = writable(); +export const statusChanged = writable({ status: "" }); +export const setFilesTotal = writable(); +export const setFilesNeeded = writable(); // @ts-ignore element.addEventListener("gameDetails", ({ detail }) => gameDetails.set(detail)); @@ -12,3 +14,7 @@ element.addEventListener("gameDetails", ({ detail }) => gameDetails.set(detail)) element.addEventListener("downloadingFile", ({ detail }) => downloadingFile.set(detail)); // @ts-ignore element.addEventListener("statusChanged", ({ detail }) => statusChanged.set(detail)); +// @ts-ignore +element.addEventListener("setFilesTotal", ({ detail }) => setFilesTotal.set(detail)); +// @ts-ignore +element.addEventListener("setFilesNeeded", ({ detail }) => setFilesNeeded.set(detail)); diff --git a/src/lib/steam.js b/src/lib/steam.js index afac46f..ef74cd6 100644 --- a/src/lib/steam.js +++ b/src/lib/steam.js @@ -2,10 +2,13 @@ * @param {string} steamid64 */ export default async function (steamid64) { - const response = await fetch(`https://steamcommunity.com/profiles/${steamid64}/?xml=1`); + const response = await fetch(`https://steam.dev.madhouselabs.net/profiles/${steamid64}/?xml=1`); const xml = await response.text(); const document = new DOMParser().parseFromString(xml, "text/xml"); - console.log(document); + return { + name: document.getElementsByTagName("steamID")[0].textContent, + avatar: document.getElementsByTagName("avatarFull")[0].textContent, + }; }