From 6f485d62ad4eccf29c9bcf0088f873630d08dffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= <7822554+AlexTMjugador@users.noreply.github.com> Date: Mon, 28 Apr 2025 01:03:13 +0200 Subject: [PATCH] Simplify Mac app download links (#3519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * tweak(frontend/app): simplify download links, remove dead code * chore: apply @triphora's suggestion Co-authored-by: Emma Alexia Signed-off-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com> --------- Signed-off-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com> Co-authored-by: Emma Alexia --- apps/frontend/src/pages/app.vue | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/apps/frontend/src/pages/app.vue b/apps/frontend/src/pages/app.vue index 01f07ba85..6aa9d7163 100644 --- a/apps/frontend/src/pages/app.vue +++ b/apps/frontend/src/pages/app.vue @@ -19,7 +19,6 @@ import Checkbox from "~/components/ui/Checkbox.vue"; import { homePageProjects } from "~/generated/state.json"; const os = ref(null); -const macValue = ref(null); const downloadWindows = ref(null); const downloadLinux = ref(null); const downloadSection = ref(null); @@ -31,8 +30,7 @@ const linuxLinks = { thirdParty: "https://support.modrinth.com/en/articles/9298760", }; const macLinks = { - appleSilicon: null, - intel: null, + universal: null, }; let downloadLauncher; @@ -53,8 +51,7 @@ const [{ data: launcherUpdates }] = await Promise.all([ ), ]); -macLinks.appleSilicon = launcherUpdates.value.platforms["darwin-aarch64"].install_urls[0]; -macLinks.intel = launcherUpdates.value.platforms["darwin-x86_64"].install_urls[0]; +macLinks.universal = launcherUpdates.value.platforms["darwin-aarch64"].install_urls[0]; windowsLink.value = launcherUpdates.value.platforms["windows-x86_64"].install_urls[0]; linuxLinks.appImage = launcherUpdates.value.platforms["linux-x86_64"].install_urls[1]; linuxLinks.deb = launcherUpdates.value.platforms["linux-x86_64"].install_urls[0]; @@ -85,24 +82,6 @@ onMounted(() => { } }); -watch(macValue, () => { - if (macValue.value === "Download for Apple Silicon") { - const link = document.createElement("a"); - link.href = macLinks.appleSilicon; - link.download = ""; - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); - } else if (macValue.value === "Download for Intel") { - const link = document.createElement("a"); - link.href = macLinks.intel; - link.download = ""; - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); - } -}); - const scrollToSection = () => { nextTick(() => { window.scrollTo({ @@ -834,13 +813,9 @@ useSeoMeta({ Mac