From aae614bae417037c5324ec6e6fd3a041de9944df Mon Sep 17 00:00:00 2001 From: Steven Vandevelde Date: Mon, 12 Oct 2026 13:33:20 +0200 Subject: [PATCH] fix(themes/albums): couple minor issues --- src/facets/themes/albums-app/browser/element.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/facets/themes/albums-app/browser/element.js b/src/facets/themes/albums-app/browser/element.js index a9e6e69e..7c4a32f9 100644 --- a/src/facets/themes/albums-app/browser/element.js +++ b/src/facets/themes/albums-app/browser/element.js @@ -121,15 +121,18 @@ function formatDuration(ms) { } /** + * `mm:ss`, keeping a negative sign — the mini player passes a negative + * remaining-time countdown for the right-hand timestamp. * @param {number | undefined} seconds * @returns {string} */ function formatClock(seconds) { if (seconds === undefined || Number.isNaN(seconds)) return "0:00"; - const totalSec = Math.max(0, Math.round(seconds)); + const sign = seconds < 0 ? "-" : ""; + const totalSec = Math.abs(Math.round(seconds)); const m = Math.floor(totalSec / 60); const s = totalSec % 60; - return `${m}:${String(s).padStart(2, "0")}`; + return `${sign}${m}:${String(s).padStart(2, "0")}`; } /** @@ -2469,7 +2472,7 @@ class Browser extends DiffuseElement {