Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RedDevilus committed Sep 15, 2023
1 parent 6898014 commit 0452041
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/ReleaseDownloadButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,18 @@ function generateDropdownItems(release, os, assets, textRemovals, isNightly) {
if (os === "windows") {
displayName = "Download";
} else if (os === "linux") {
// Check for Flatpak or AppImage tags
// Check for Flatpak or AppImage tags which will make Appimage - x64 Qt and Flatpak - x64 Qt and no way to seemingly fix the regular way
if (asset.additionalTags.includes("appimage")) {
displayName = "AppImage";
displayName =
"App" + displayName.charAt(3).toUpperCase() + displayName.slice(4); // Convert "Appimage" to "AppImage" because tags failing to uppercase it
} else if (asset.additionalTags.includes("flatpak")) {
displayName = "Flatpak";
}
} else if (os === "macos") {
displayName = "Download";
}

// Strip the "- x64 Qt" for Linux
// Strip the "- x64 Qt" for Linux because it's being annoying with the tags and who cares about how good the code looks for now it's a bit of jank.
if (os === "linux") {
displayName = displayName.replace(/- x64 Qt$/, "");
}
Expand Down

0 comments on commit 0452041

Please sign in to comment.