admin/home: say "older" on previous stable versions
Massimo Melina committed
Dec 22, 2023 at 12:09 UTC
d4c149769300f273e4b375b74cc43849a0ef2f01
2 files changed
+3
-3
admin/src/HomePage.ts
+1
-1
@@ -122,7 +122,7 @@ export default function HomePage() {
122
h(Card, {}, h(CardContent, {},
123
h(Btn, {
124
icon: UpdateIcon,
125
- ...!x.isNewer && { color: 'warning', variant: 'outlined' },
125
+ ...!x.isNewer && x.prerelease && { color: 'warning', variant: 'outlined' },
126
onClick: () => update(x.tag_name)
127
}, prefix("Install ", x.name, x.isNewer ? '' : " (older)")),
128
h(Box, { mt: 1 }, renderChangelog(x.body))
src/update.ts
+2
-2
@@ -26,8 +26,8 @@ export async function getUpdates() {
26
const stable: Release = await getRepoInfo(HFS_REPO + '/releases/latest')
27
const verStable = ver(stable)
28
const ret = await getBetas()
29
- stable.isNewer = currentVersion.olderThan(stable.tag_name) || RUNNING_BETA
30
- if (stable.isNewer)
29
+ stable.isNewer = currentVersion.olderThan(stable.tag_name)
30
+ if (stable.isNewer || RUNNING_BETA)
31
ret.push(stable)
32
return ret
33