feat: Swedish weather bar with wind speed display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -399,7 +399,7 @@ class WeatherManager {
|
||||
|
||||
/**
|
||||
* Render compact weather bar for landscape mode
|
||||
* Shows: [icon] temp condition | Sunrise HH:MM | Sunset HH:MM
|
||||
* Shows: [icon] temp condition 💨 wind | ☀️ Sol ↑ HH:MM 🌙 Sol ↓ HH:MM
|
||||
*/
|
||||
renderCompactWeatherBar() {
|
||||
const bar = document.getElementById('compact-weather-bar');
|
||||
@@ -421,10 +421,17 @@ class WeatherManager {
|
||||
tempSpan.appendChild(document.createTextNode(` ${conditionSv || ''}`));
|
||||
bar.appendChild(tempSpan);
|
||||
|
||||
const sep1 = document.createElement('span');
|
||||
sep1.className = 'weather-bar-sep';
|
||||
sep1.textContent = '|';
|
||||
bar.appendChild(sep1);
|
||||
// Wind speed
|
||||
if (this.weatherData.wind) {
|
||||
const windSpan = document.createElement('span');
|
||||
windSpan.textContent = `💨 ${this.weatherData.wind.speed} km/h`;
|
||||
bar.appendChild(windSpan);
|
||||
}
|
||||
|
||||
const sep = document.createElement('span');
|
||||
sep.className = 'weather-bar-sep';
|
||||
sep.textContent = '|';
|
||||
bar.appendChild(sep);
|
||||
|
||||
let sunriseStr = '--:--';
|
||||
let sunsetStr = '--:--';
|
||||
@@ -432,19 +439,9 @@ class WeatherManager {
|
||||
sunriseStr = this.formatTime(this.sunTimes.today.sunrise);
|
||||
sunsetStr = this.formatTime(this.sunTimes.today.sunset);
|
||||
}
|
||||
|
||||
const sunriseSpan = document.createElement('span');
|
||||
sunriseSpan.textContent = `☀️ Sol ↑ ${sunriseStr}`;
|
||||
bar.appendChild(sunriseSpan);
|
||||
|
||||
const sep2 = document.createElement('span');
|
||||
sep2.className = 'weather-bar-sep';
|
||||
sep2.textContent = '|';
|
||||
bar.appendChild(sep2);
|
||||
|
||||
const sunsetSpan = document.createElement('span');
|
||||
sunsetSpan.textContent = `🌙 Sol ↓ ${sunsetStr}`;
|
||||
bar.appendChild(sunsetSpan);
|
||||
const sunSpan = document.createElement('span');
|
||||
sunSpan.textContent = `☀️ Sol ↑ ${sunriseStr} 🌙 Sol ↓ ${sunsetStr}`;
|
||||
bar.appendChild(sunSpan);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user