fix: Update flatpak installation command on download page

This commit is contained in:
Mauro Balades
2024-08-03 10:49:04 +02:00
parent 143bd725dd
commit bef7a1060c
2 changed files with 25 additions and 20 deletions

View File

@@ -128,9 +128,13 @@ export default function DownloadPage() {
} }
const startDownload = () => { const startDownload = () => {
let releaseTarget: string;
if (selectedLinuxDownloadType === "flatpak") {
window.open("https://flathub.org/apps/io.github.zen_browser.zen", "_blank");
releaseTarget = "flatpak";
} else {
const platform = releaseTree[selectedPlatform.toLowerCase()]; const platform = releaseTree[selectedPlatform.toLowerCase()];
let arch: string = selectedArchitecture; let arch: string = selectedArchitecture;
let releaseTarget: string;
if (selectedPlatform === "MacOS") { if (selectedPlatform === "MacOS") {
releaseTarget = platform[arch]; releaseTarget = platform[arch];
} else { } else {
@@ -141,9 +145,10 @@ export default function DownloadPage() {
console.log("Downloading: "); console.log("Downloading: ");
console.log("platform: ", selectedPlatform); console.log("platform: ", selectedPlatform);
console.log("compat: ", arch); console.log("compat: ", arch);
window.location.replace(`${BASE_URL}/${releases[releaseTarget]}`);
}
setHasDownloaded(true); setHasDownloaded(true);
addDownload(releaseTarget); addDownload(releaseTarget);
window.location.replace(`${BASE_URL}/${releases[releaseTarget]}`);
throwConfetti(); throwConfetti();
}; };

View File

@@ -1,18 +1,18 @@
export const releases: any = { export const releases: any = {
WindowsInstaller: "zen.installer.exe", WindowsInstaller: "zen.installer.exe",
WindowsInstallerGeneric: "zen.installer-generic.exe", WindowsInstallerGeneric: "zen.installer.exe",
WindowsZip: "zen.win-specific.zip", WindowsZip: "zen.win64.zip",
WindowsZipGeneric: "zen.win-generic.zip", WindowsZipGeneric: "zen.win64.zip",
MacOS: "zen.macos-aarch64.dmg", MacOS: "zen.macos.dmg",
MacOSIntel: "zen.macos-x64.dmg", MacOSIntel: "zen.macos.dmg",
Linux: "zen.linux-specific.tar.bz2", Linux: "zen.linux.tar.bz2",
LinuxGeneric: "zen.linux-generic.tar.bz2", LinuxGeneric: "zen.linux.tar.bz2",
LinuxAppImage: "zen-specific.AppImage", LinuxAppImage: "zen.AppImage",
LinuxAppImageGeneric: "zen-generic.AppImage", LinuxAppImageGeneric: "zen.AppImage",
}; };
// platform // platform