From 6fa588c684a3f69e2133615817692cc0a94c6f03 Mon Sep 17 00:00:00 2001 From: Jage9 Date: Wed, 25 Feb 2026 00:59:19 -0500 Subject: [PATCH] Order radio station metadata fields in inspect view --- client/public/version.js | 2 +- client/src/items/itemRegistry.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/client/public/version.js b/client/public/version.js index d6401f7..d552c91 100644 --- a/client/public/version.js +++ b/client/public/version.js @@ -1,5 +1,5 @@ // Maintainer-controlled web client version. // Format: YYYY.MM.DD Rn (example: 2026.02.20 R2) -window.CHGRID_WEB_VERSION = "2026.02.25 R258"; +window.CHGRID_WEB_VERSION = "2026.02.25 R259"; // Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid. window.CHGRID_TIME_ZONE = "America/Detroit"; diff --git a/client/src/items/itemRegistry.ts b/client/src/items/itemRegistry.ts index 157f001..6859677 100644 --- a/client/src/items/itemRegistry.ts +++ b/client/src/items/itemRegistry.ts @@ -196,6 +196,16 @@ export function getInspectItemPropertyKeys(item: WorldItem): string[] { allKeys.push(key); } + // Keep derived radio metadata in a stable, user-friendly order. + if (item.type === 'radio_station') { + for (const key of ['stationName', 'nowPlaying']) { + if (!isItemPropertyVisible(item, key)) continue; + if (seen.has(key)) continue; + seen.add(key); + allKeys.push(key); + } + } + const paramKeys = Object.keys(item.params).sort((a, b) => a.localeCompare(b)); for (const key of paramKeys) { if (!isItemPropertyVisible(item, key)) continue;