Restore option readout and simplify channel tooltip

This commit is contained in:
Jage9
2026-02-21 20:59:18 -05:00
parent 7a1bf08eb5
commit e2145a401f
3 changed files with 7 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
// Maintainer-controlled web client version. // Maintainer-controlled web client version.
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2) // Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
window.CHGRID_WEB_VERSION = "2026.02.21 R123"; window.CHGRID_WEB_VERSION = "2026.02.21 R124";
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid. // Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
window.CHGRID_TIME_ZONE = "America/Detroit"; window.CHGRID_TIME_ZONE = "America/Detroit";

View File

@@ -771,6 +771,11 @@ function describeItemPropertyHelp(item: WorldItem, key: string): string {
if (metadata?.range) { if (metadata?.range) {
const stepText = metadata.range.step !== undefined ? ` step ${metadata.range.step}` : ''; const stepText = metadata.range.step !== undefined ? ` step ${metadata.range.step}` : '';
parts.push(`Range: ${metadata.range.min} to ${metadata.range.max}${stepText}.`); parts.push(`Range: ${metadata.range.min} to ${metadata.range.max}${stepText}.`);
} else {
const options = getItemPropertyOptionValues(key);
if (options && options.length > 0) {
parts.push(`Options: ${options.join(', ')}.`);
}
} }
parts.push(EDITABLE_ITEM_PROPERTY_KEYS.has(key) ? 'Editable.' : 'Read only.'); parts.push(EDITABLE_ITEM_PROPERTY_KEYS.has(key) ? 'Editable.' : 'Read only.');

View File

@@ -151,7 +151,7 @@ ITEM_TYPE_PROPERTY_METADATA: dict[ItemType, dict[str, dict[str, object]]] = {
"title": {"valueType": "text", "tooltip": "Display name spoken and shown for this item."}, "title": {"valueType": "text", "tooltip": "Display name spoken and shown for this item."},
"streamUrl": {"valueType": "text", "tooltip": "Audio stream URL used by this radio."}, "streamUrl": {"valueType": "text", "tooltip": "Audio stream URL used by this radio."},
"enabled": {"valueType": "boolean", "tooltip": "Turns playback on or off for this radio."}, "enabled": {"valueType": "boolean", "tooltip": "Turns playback on or off for this radio."},
"channel": {"valueType": "list", "tooltip": "Select stereo, mono, left-only, or right-only channel mix."}, "channel": {"valueType": "list", "tooltip": "Select how the station audio channels are rendered."},
"volume": { "volume": {
"valueType": "number", "valueType": "number",
"tooltip": "Playback volume percent for this radio.", "tooltip": "Playback volume percent for this radio.",