From 878d04f3bbb02e046339021c4a9829e659e387e9 Mon Sep 17 00:00:00 2001 From: million1156 Date: Thu, 21 Mar 2024 22:21:07 -0500 Subject: [PATCH] Remove mentions of our old GitLab --- src/routes/+layout.svelte | 8 +-- src/routes/+page.svelte | 12 ++-- src/routes/download/+page.svelte | 104 +++++++++++++++++++++++++++++++ src/routes/faq/+page.svelte | 43 +++++++++++++ 4 files changed, 157 insertions(+), 10 deletions(-) create mode 100644 src/routes/download/+page.svelte create mode 100644 src/routes/faq/+page.svelte diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index ffc066e..c3bb22e 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -142,15 +142,15 @@ }, { name: "FAQ", - href: "/coming-soon", + href: "/faq", }, { name: "Discord", href: "https://discord.gg/suyu", }, { - name: "GitLab", - href: "https://gitlab.com/suyu-emu/suyu", + name: "Git", + href: "https://git.suyu.dev/suyu/suyu", }, // { // name: $token || data.tokenCookie ? "Account" : "Sign up", @@ -296,7 +296,7 @@
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 4af965f..ef26fd8 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -70,7 +70,7 @@

@@ -233,14 +233,14 @@ -

GitLab

+

Git

- GitLab is where all the magic of suyu happens. We're always looking for new contributors + Our Git instance is where all the magic of suyu happens. We're always looking for new contributors to help us out, so feel free to check out our code.

+ import { onMount } from "svelte"; + // Note: This is an absolutely terrible and unoptimized way to do this. Feel free to change it xd + onMount(async () => { + const UA = navigator.userAgent; + const url = `https://gitlab.com/api/v4/projects/55558123/releases`; // 55558123 = Suyu repo ID + async function getTag() { + try { + const response = await fetch(url, { + headers: { + "Content-Type": "application/json", + }, + }); + // Convert to JSON + const releases = await response.json(); + + // Release found + if (releases && releases.length > 0) { + console.log("Latest release tag:", releases[0].tag_name); + return releases[0].tag_name; // Assuming the first result is the latest + } else { + console.log("No releases found."); + return null; + } + } catch (error) { + console.error("Error fetching latest release tag:", error); + return null; + } + } + const latestRelease = await getTag(); + // give it time so the user can see the message + setTimeout(() => { + if (UA.includes("Windows")) { + window.location.href = `https://gitlab.com/suyu-emu/suyu-releases/-/raw/master/${latestRelease}/Suyu-Windows_x64.7z`; + } else if (UA.includes("Linux")) { + window.location.href = `https://gitlab.com/suyu-emu/suyu-releases/-/raw/master/${latestRelease}/suyu-mainline--.AppImage`; + } else if (UA.includes("Macintosh;")) { + window.location.href = `https://gitlab.com/suyu-emu/suyu-releases/-/raw/master/${latestRelease}/suyu-macOS-arm64.dmg?inline=false`; + } else { + window.location.href = `https://gitlab.com/suyu-emu/suyu-releases/-/blob/master/${latestRelease}/`; + } + }, 3000); + }) + + + + + Downloading Suyu + + +
diff --git a/src/routes/faq/+page.svelte b/src/routes/faq/+page.svelte new file mode 100644 index 0000000..eda49bb --- /dev/null +++ b/src/routes/faq/+page.svelte @@ -0,0 +1,43 @@ + + FAQ + + +
+ + + + + +

+ FAQ +

+

+ Got some questions? We got answers! +

+

Q: How is this project different from Yuzu? How do we know you won't have the same fate as Yuzu?

+

A: Unlike Yuzu, Suyu does not include many of the core "requirements" to run it. You need to legally dump your Nintendo Switch to obtain a title.keys file, which Yuzu did not do. Additionally, you must dump your own firmware.

+

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!

+

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!

+

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!

+