Landscape orientation, redesigned web UI, rotation on/off + minutes, weather by city name
- Panel is mounted sideways: render landscape (600x400), rotate to the panel's native portrait orientation right before writing to hardware. - Web UI: card-based layout, dark mode, active nav highlighting, save confirmation toasts, error banners. - Rotation: separate enabled/disabled toggle (off pins to the first screen in the list) and the interval is now in minutes instead of raw seconds. Migrates existing config.json from the old interval_seconds field. - Weather: type a city name instead of hunting down coordinates, resolved via Open-Meteo's free geocoding API. Manual lat/long still available as a fallback.
This commit is contained in:
1 parent
7c197e20a5
commit
61348be674
11 files changed
+393
-104
No files matched your search
@@ -1,16 +1,37 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h1>Weather</h1>
|
||||
<p style="font-size:0.85rem;color:#666">Uses Open-Meteo (no API key needed) — just the coordinates for your location.</p>
|
||||
|
||||
{% if error %}
|
||||
<div class="toast error">{{ error }}</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post">
|
||||
<div class="field">
|
||||
<label for="latitude">Latitude</label>
|
||||
<input type="text" id="latitude" name="latitude" value="{{ settings.latitude if settings.latitude is not none else '' }}" placeholder="e.g. 52.52">
|
||||
<div class="card">
|
||||
<div class="section-label">Location</div>
|
||||
<p class="hint" style="margin: -0.25rem 0 1rem;">Uses Open-Meteo — no API key needed.</p>
|
||||
<div class="field">
|
||||
<label for="city">City</label>
|
||||
<input type="text" id="city" name="city" placeholder="e.g. Berlin">
|
||||
{% if settings.city %}
|
||||
<p class="hint">Currently: {{ settings.city }} ({{ settings.latitude }}, {{ settings.longitude }})</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="longitude">Longitude</label>
|
||||
<input type="text" id="longitude" name="longitude" value="{{ settings.longitude if settings.longitude is not none else '' }}" placeholder="e.g. 13.40">
|
||||
|
||||
<div class="card">
|
||||
<div class="section-label">Or enter coordinates manually</div>
|
||||
<p class="hint" style="margin: -0.25rem 0 1rem;">Leave the city field above empty to use these instead.</p>
|
||||
<div class="field">
|
||||
<label for="latitude">Latitude</label>
|
||||
<input type="text" id="latitude" name="latitude" value="{{ settings.latitude if settings.latitude is not none else '' }}" placeholder="e.g. 52.52">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="longitude">Longitude</label>
|
||||
<input type="text" id="longitude" name="longitude" value="{{ settings.longitude if settings.longitude is not none else '' }}" placeholder="e.g. 13.40">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user