-
-
+ // Temperature widget - always show (editable even if empty)
+ const tempDisplay = data.temperature || '20Β°C';
+ const tempValue = data.tempValue || 20;
+ const tempPercent = Math.min(100, Math.max(0, ((tempValue + 20) / 60) * 100));
+ const tempColor = tempValue < 10 ? '#4a90e2' : tempValue < 25 ? '#67c23a' : '#e94560';
+ html += `
+
+ `;
- // Time widget - clock visual
- if (data.timeStart) {
- // Parse time for clock hands
- const timeMatch = data.timeStart.match(/(\d+):(\d+)/);
- let hourAngle = 0;
- let minuteAngle = 0;
- if (timeMatch) {
- const hours = parseInt(timeMatch[1]);
- const minutes = parseInt(timeMatch[2]);
- hourAngle = (hours % 12) * 30 + minutes * 0.5; // 30Β° per hour + 0.5Β° per minute
- minuteAngle = minutes * 6; // 6Β° per minute
- }
- html += `
-
- `;
+ // Time widget - always show (editable even if empty)
+ const timeDisplay = data.timeStart || '12:00';
+ // Parse time for clock hands
+ const timeMatch = timeDisplay.match(/(\d+):(\d+)/);
+ let hourAngle = 0;
+ let minuteAngle = 0;
+ if (timeMatch) {
+ const hours = parseInt(timeMatch[1]);
+ const minutes = parseInt(timeMatch[2]);
+ hourAngle = (hours % 12) * 30 + minutes * 0.5; // 30Β° per hour + 0.5Β° per minute
+ minuteAngle = minutes * 6; // 6Β° per minute
}
+ html += `
+
+ `;
html += '
';
- // Row 2: Location widget (full width)
- if (data.location) {
- html += `
-