diff --git a/src/systems/dashboard/widgets/sceneInfoWidget.js b/src/systems/dashboard/widgets/sceneInfoWidget.js index 7fadb84..c900798 100644 --- a/src/systems/dashboard/widgets/sceneInfoWidget.js +++ b/src/systems/dashboard/widgets/sceneInfoWidget.js @@ -20,15 +20,18 @@ import { parseInfoBoxData } from './infoBoxWidgets.js'; */ function formatDate(date, month, weekday) { if (!date && !month && !weekday) { - return { value: 'No Date', label: '' }; + return { icon: '📅', value: 'No Date', label: '' }; } - const monthShort = month ? month.substring(0, 3).toUpperCase() : 'MON'; + // Format: "15 Jan" on main line, "Monday" as label + const monthShort = month ? month.substring(0, 3) : 'Mon'; const dayNum = date || '1'; + const weekdayLabel = weekday || ''; return { - value: `${monthShort} ${dayNum}`, - label: weekday ? weekday.substring(0, 3) : '' + icon: '📅', + value: `${dayNum} ${monthShort}`, + label: weekdayLabel }; } @@ -42,6 +45,7 @@ function formatTime(timeStart, timeEnd) { const timeDisplay = timeEnd || timeStart || '12:00'; return { + icon: '🕐', value: timeDisplay, label: '' // Could add timezone if available }; @@ -54,13 +58,13 @@ function formatTime(timeStart, timeEnd) { * @returns {Object} Formatted weather parts */ function formatWeather(weatherEmoji, weatherForecast) { - const emoji = weatherEmoji || '🌤️'; + const emoji = weatherEmoji || '☀️'; const forecast = weatherForecast || 'Clear'; return { - icon: emoji, - value: forecast.split(' ')[0] || forecast, // First word - label: forecast + icon: '', // No icon on left + value: `${forecast} ${emoji}`, // Forecast text with emoji on right + label: '' }; } @@ -71,10 +75,11 @@ function formatWeather(weatherEmoji, weatherForecast) { */ function formatTemp(temperature) { if (!temperature) { - return { value: '20°C', label: '' }; + return { icon: '🌡️', value: '20°C', label: '' }; } return { + icon: '🌡️', value: temperature, label: '' // Could add "Feels like" if available }; @@ -101,7 +106,7 @@ function formatLocation(location) { /** * Render info grid item * @param {Object} item - Item data - * @param {string} item.icon - Icon emoji + * @param {string} item.icon - Icon emoji (optional) * @param {string} item.value - Primary value * @param {string} item.label - Secondary label * @param {string} field - Field name for editing @@ -110,11 +115,12 @@ function formatLocation(location) { */ function renderInfoItem(item, field, gridArea) { const hasLabel = item.label && item.label !== ''; + const hasIcon = item.icon && item.icon !== ''; const areaClass = gridArea ? `rpg-info-${gridArea}` : ''; return `