From bdd7b1d1342492232ff48d22eca13e09b9e61cc2 Mon Sep 17 00:00:00 2001 From: million1156 Date: Fri, 22 Mar 2024 15:07:16 -0500 Subject: [PATCH 01/10] Add support for Android downloads --- src/routes/download/+page.svelte | 172 +++++++++++++++---------------- 1 file changed, 85 insertions(+), 87 deletions(-) diff --git a/src/routes/download/+page.svelte b/src/routes/download/+page.svelte index 0acb36c..a98f139 100644 --- a/src/routes/download/+page.svelte +++ b/src/routes/download/+page.svelte @@ -1,74 +1,76 @@ - Downloading Suyu @@ -94,24 +96,22 @@ stroke="white" /> - - -

- Downloading Suyu... -

- +

Downloading Suyu...

+ - -

Your download should start shortly. If it doesn't, click here Date: Fri, 22 Mar 2024 17:24:30 -0500 Subject: [PATCH 02/10] Add little "animation" (. -> .. -> ...), cleanup, & add support for the gitea instance --- src/routes/download/+page.svelte | 108 ++++++++++++++----------------- 1 file changed, 50 insertions(+), 58 deletions(-) diff --git a/src/routes/download/+page.svelte b/src/routes/download/+page.svelte index a98f139..f8ee7c9 100644 --- a/src/routes/download/+page.svelte +++ b/src/routes/download/+page.svelte @@ -1,45 +1,49 @@ - -

Downloading Suyu...

- + +

+ {@html htmlContent} +

Your download should start shortly. If it doesn't, click Date: Mon, 25 Mar 2024 13:41:04 -0500 Subject: [PATCH 03/10] Fix invalid release --- src/routes/download/+page.svelte | 11 ++++++----- src/routes/faq/+page.svelte | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/routes/download/+page.svelte b/src/routes/download/+page.svelte index f8ee7c9..6243ac0 100644 --- a/src/routes/download/+page.svelte +++ b/src/routes/download/+page.svelte @@ -45,10 +45,11 @@ const releases = await response.json(); const latestRelease = releases[0].name; + console.log(latestRelease) // Release found if (latestRelease) { - console.log("Latest release tag:", latestRelease.name); - return latestRelease.name; // Assuming the first result is the latest + console.log("Latest release tag:", latestRelease); + return latestRelease; // Assuming the first result is the latest } else { console.log("No releases found."); return null; @@ -77,7 +78,7 @@ } else { window.location.href = `https://git.suyu.dev/suyu/suyu/releases/${latestRelease}/`; } - }, 3000); + }, 30000); }); @@ -107,13 +108,13 @@ /> -

+

{@html htmlContent}

Your download should start shortly. If it doesn't, click herehere.

diff --git a/src/routes/faq/+page.svelte b/src/routes/faq/+page.svelte index 741b64b..350fc9a 100644 --- a/src/routes/faq/+page.svelte +++ b/src/routes/faq/+page.svelte @@ -39,11 +39,11 @@

Q: What is the purpose of Suyu?

A: The purpose of this project is to provide a free, open-source alternative to the now-dead Yuzu emulator. We believe that the community should be able to emulate their Switch device (legally) and be able to enjoy their favorite game titles.

Q: How can I contribute to Suyu?

-

A: You can contribute to this project by submitting a pull request on our Git page. We are always looking for new contributors to help us improve the project!

+

A: You can contribute to this project by submitting a pull request on our Git page. We are always looking for new contributors to help us improve the project!

Q: Where can I download Suyu?

-

A: You can download the latest build of Suyu from our Git. Please make sure you are using the right URL!

+

A: You can download the latest build of Suyu from our Git. Please make sure you are using the right URL!

Q: What is the current progress for Suyu?

-

A: As of 3/20/2024, we have released our first Windows binary 🎉! You can find it here. We are always trying to make more and more progress, so please feel free to join the Discord!

+

A: As of 3/20/2024, we have released our first Windows binary 🎉! You can find it here. We are always trying to make more and more progress, so please feel free to join the Discord!


Email hosting lovingly provided by From b7df6dadd6fa32c51c20034ae721fd1e08202d56 Mon Sep 17 00:00:00 2001 From: million1156 Date: Mon, 25 Mar 2024 14:00:35 -0500 Subject: [PATCH 04/10] fix timeout (oopsie) --- src/routes/download/+page.svelte | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/routes/download/+page.svelte b/src/routes/download/+page.svelte index 6243ac0..25dd0d8 100644 --- a/src/routes/download/+page.svelte +++ b/src/routes/download/+page.svelte @@ -19,8 +19,7 @@ // Variables const UA = navigator.userAgent; const url = `https://git.suyu.dev/api/v1/repos/suyu/suyu/tags`; - const developerMode = false; - let timeout = 3000; + const fakeVersionTag = false; let latestRelease = ""; // Infinite timeout to test download workflow, comment out or disable developerMode if you don't want this @@ -59,7 +58,7 @@ return null; } } - if (!developerMode) { + if (!fakeVersionTag) { latestRelease = await getTag(); } else { latestRelease = "v0.0.1"; @@ -78,7 +77,7 @@ } else { window.location.href = `https://git.suyu.dev/suyu/suyu/releases/${latestRelease}/`; } - }, 30000); + }, 3000); }); From 1affe83ff21bc7502ace01e5e7ffd2d695178f6a Mon Sep 17 00:00:00 2001 From: million1156 Date: Tue, 26 Mar 2024 19:27:46 -0500 Subject: [PATCH 05/10] comply with new naming scheme (curse you zqpvr01) --- src/routes/download/+page.svelte | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/routes/download/+page.svelte b/src/routes/download/+page.svelte index 25dd0d8..1e0f9e6 100644 --- a/src/routes/download/+page.svelte +++ b/src/routes/download/+page.svelte @@ -22,14 +22,6 @@ const fakeVersionTag = false; let latestRelease = ""; - // Infinite timeout to test download workflow, comment out or disable developerMode if you don't want this - // nvm this was bugging out lmao - /* if (developerMode) { - timeout = 9999; - return; - } */ - - // NOTE: I have no idea if this works.. Shoutout to the very smart person who blocked ALL API requests to the git server... async function getTag() { try { // Get the latest release tag @@ -67,13 +59,14 @@ setTimeout(() => { if (UA.includes("Windows")) { - window.location.href = `https://git.suyu.dev/suyu/suyu/releases/download/${latestRelease}/Suyu-Windows_x64.7z`; + window.location.href = `https://git.suyu.dev/suyu/suyu/releases/download/${latestRelease}/Suyu-Windows_x86_64.7z`; + // Android is above Linux because Android UA's also contain "Linux" } else if (UA.includes("Android")) { - window.location.href = `https://git.suyu.dev/suyu/suyu/releases/download/${latestRelease}/app-mainline-release.apk`; + window.location.href = `https://git.suyu.dev/suyu/suyu/releases/download/${latestRelease}/Suyu-Android_Arm64.apk`; } else if (UA.includes("Linux")) { - window.location.href = `https://git.suyu.dev/suyu/suyu/releases/download/${latestRelease}/suyu-mainline--.AppImage`; + window.location.href = `https://git.suyu.dev/suyu/suyu/releases/download/${latestRelease}/Suyu-Linux_x86_64.AppImage`; } else if (UA.includes("Macintosh;")) { - window.location.href = `https://git.suyu.dev/suyu/suyu/releases/download/${latestRelease}/suyu-macOS-arm64.dmg?inline=false`; + window.location.href = `https://git.suyu.dev/suyu/suyu/releases/download/${latestRelease}/Suyu-macOS-Arm64.dmg`; } else { window.location.href = `https://git.suyu.dev/suyu/suyu/releases/${latestRelease}/`; } From 4be4a685319cfd50fcb5498971ecded38193e99f Mon Sep 17 00:00:00 2001 From: million1156 Date: Tue, 26 Mar 2024 19:34:40 -0500 Subject: [PATCH 06/10] i have no idea how or why that happened --- src/routes/download/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/download/+page.svelte b/src/routes/download/+page.svelte index 1e0f9e6..4ff241d 100644 --- a/src/routes/download/+page.svelte +++ b/src/routes/download/+page.svelte @@ -106,7 +106,7 @@

Your download should start shortly. If it doesn't, click herehere.

From 631cb61e8a03f9498ac71ca7f8225916b74db0e0 Mon Sep 17 00:00:00 2001 From: million1156 Date: Tue, 26 Mar 2024 19:35:55 -0500 Subject: [PATCH 07/10] a --- src/routes/download/+page.svelte | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/routes/download/+page.svelte b/src/routes/download/+page.svelte index 4ff241d..e9aeb34 100644 --- a/src/routes/download/+page.svelte +++ b/src/routes/download/+page.svelte @@ -36,7 +36,7 @@ const releases = await response.json(); const latestRelease = releases[0].name; - console.log(latestRelease) + console.log(latestRelease); // Release found if (latestRelease) { console.log("Latest release tag:", latestRelease); @@ -51,16 +51,16 @@ } } if (!fakeVersionTag) { - latestRelease = await getTag(); + latestRelease = await getTag(); } else { - latestRelease = "v0.0.1"; - console.log(latestRelease) + latestRelease = "v0.0.1"; + console.log(latestRelease); } setTimeout(() => { if (UA.includes("Windows")) { window.location.href = `https://git.suyu.dev/suyu/suyu/releases/download/${latestRelease}/Suyu-Windows_x86_64.7z`; - // Android is above Linux because Android UA's also contain "Linux" + // Android is above Linux because Android UA's also contain "Linux" } else if (UA.includes("Android")) { window.location.href = `https://git.suyu.dev/suyu/suyu/releases/download/${latestRelease}/Suyu-Android_Arm64.apk`; } else if (UA.includes("Linux")) { From 801bd34d9bb2644359c50c2d90e3011464783942 Mon Sep 17 00:00:00 2001 From: million1156 Date: Tue, 26 Mar 2024 19:41:22 -0500 Subject: [PATCH 08/10] Cleanup --- src/routes/download/+page.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/routes/download/+page.svelte b/src/routes/download/+page.svelte index e9aeb34..1173fcb 100644 --- a/src/routes/download/+page.svelte +++ b/src/routes/download/+page.svelte @@ -5,12 +5,13 @@ // cool moving dots :3 // NOTE: This is required to be ran on the server due to issues with Svelte let text = "Downloading Suyu"; + const textLength = text.length setInterval(() => { text += "."; - if (text.length > 19) { + // Text length + 3 is essentially the length of the text above + the 3 dots + if (text.length > textLength + 3) { text = "Downloading Suyu"; } - //console.log(text); }, 500); $: htmlContent = `${text}`; @@ -19,7 +20,7 @@ // Variables const UA = navigator.userAgent; const url = `https://git.suyu.dev/api/v1/repos/suyu/suyu/tags`; - const fakeVersionTag = false; + const fakeVersionTag = false; // Fake version tag? (for debugging) let latestRelease = ""; async function getTag() { From 5cee218403dd8065647d6ca6094aeb263f977f1d Mon Sep 17 00:00:00 2001 From: Million1156 Date: Wed, 27 Mar 2024 14:38:28 -0500 Subject: [PATCH 09/10] Fix star count --- src/routes/+page.server.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts index 2ce74a2..281a8d6 100644 --- a/src/routes/+page.server.ts +++ b/src/routes/+page.server.ts @@ -19,21 +19,15 @@ async function fetchServerSideData() { }, }) : Promise.resolve({ json: () => roleMembers }), - GITLAB_API_TOKEN - ? fetch("https://gitlab.com/api/v4/projects/suyu-emu%2Fsuyu/", { - headers: { - Authorization: `Bearer ${GITLAB_API_TOKEN}`, - }, - }) - : Promise.resolve({ json: () => ({ star_count: 0 }) }), // Default to 0 if no token is provided + fetch("https://git.suyu.dev/api/v1/repos/suyu/suyu"), ]; const [res, roles, gitlabRes] = await Promise.all(promises); const jsonPromises = [res.json(), roles.json(), gitlabRes.json()]; - const [resJson, rolesJson, gitlabResJson] = await Promise.all(jsonPromises); + const [resJson, rolesJson, gitResJson] = await Promise.all(jsonPromises); memberCount = resJson.approximate_member_count; - starCount = gitlabResJson.star_count; + starCount = gitResJson.stars_count; if (DISCORD_USER_TOKEN) roleMembers = rolesJson; console.log("Member count:", memberCount); From 4cd72e9e46ee391efa9aac72f3af58c8cf6bdebf Mon Sep 17 00:00:00 2001 From: Million1156 Date: Wed, 27 Mar 2024 14:39:05 -0500 Subject: [PATCH 10/10] yes --- src/routes/+page.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 7447cf2..fbdcb5a 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -116,7 +116,8 @@ >

By the numbers

- + +