Skip to content

Commit

Permalink
filter incompatible releases from version table (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
trippjoe authored Dec 30, 2024
1 parent 4b7effe commit 58c2318
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/routes/settings/versions/OfficialVersions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
];
}
// filter incompatible releases
releases = releases.filter((r) => r.downloadUrl !== undefined);
// Sort releases by published date
releases = releases.sort((a, b) => {
if (a.date === undefined) {
Expand Down
8 changes: 2 additions & 6 deletions src/routes/settings/versions/VersionList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@
<Button
class="py-0 dark:bg-transparent hover:dark:bg-transparent focus:ring-0 focus:ring-offset-0 disabled:opacity-50"
disabled={release.pendingAction ||
(!release.isDownloaded &&
release.downloadUrl !== undefined &&
release.invalid)}
(!release.isDownloaded && release.invalid)}
on:click={async () => {
if (release.isDownloaded) {
dispatch("removeVersion", { version: release.version });
Expand All @@ -128,11 +126,9 @@
"settings_versions_icon_removeVersion_altText",
)}
/>
{:else if release.downloadUrl === undefined}
<span>{$_("settings_versions_incompatibleVersion")}</span>
{:else if release.pendingAction}
<Spinner color="yellow" size={"6"} />
{:else if release.releaseType === "official" && release.downloadUrl !== undefined}
{:else if release.releaseType === "official"}
<IconDownload
class="text-xl"
color="#00d500"
Expand Down

0 comments on commit 58c2318

Please sign in to comment.