From ae446df23bcd493928db474ebf9cdce016c874f3 Mon Sep 17 00:00:00 2001 From: DJKnaeckebrot Date: Fri, 5 Jul 2024 08:44:21 +0200 Subject: [PATCH] SUI-8: Fix sorting of feeds so the latest is on top --- package.json | 2 +- views/partials/feeds.ejs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 329c6b46..40148381 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dbd-soft-ui", - "version": "1.7.26-beta.1", + "version": "1.7.27-beta.1", "typings": "dbd-soft-ui.d.ts", "author": { "name": "iMidnight" diff --git a/views/partials/feeds.ejs b/views/partials/feeds.ejs index 3267bcfb..6492985b 100644 --- a/views/partials/feeds.ejs +++ b/views/partials/feeds.ejs @@ -1,6 +1,10 @@
<% + + // Sort feeds by published date in descending order + feeds.sort((a, b) => b.published - a.published); + feeds.forEach((feed, index) => { var delta = Math.abs(Date.now() - feed.published) / 1000;