Next/back button assignment moves from a frame-level "Button assignments" card into each widget's own gear-icon dialog, prefilled with a sane default at creation (photos/calendar -> advance/back, whiteboard/weather -> check_now, others -> none). At most one binding per (widget, button) now -- cross-widget execution order never mattered since each widget's action only touches its own state. New firmware capability: holding NEXT or BACK past a configurable duration (min 3s, server-side default) triggers a frame-wide action instead of the per-widget short-press one -- cycling saved layouts, refreshing all widgets, or freezing/unfreezing every photo widget (see app/global_actions.py). Firmware next/back checks gain the same hold-duration polling the combo button already had; the threshold comes from the previous wake's /frame/config fetch (persisted in NVS), since this wake's button decision happens before that request. Not done here: firmware/version.txt is intentionally left unbumped -- this hasn't been built or hardware-tested (no ESP-IDF toolchain in this environment), so no firmware release build should be triggered yet.
64 lines
2.8 KiB
HTML
64 lines
2.8 KiB
HTML
<h2 class="dialog-title">Photos widget</h2>
|
|
|
|
<section class="card">
|
|
<h2 class="card-title">Album</h2>
|
|
<form id="photos-form">
|
|
<label>Album
|
|
<select id="album_id">
|
|
{% if photo_cfg and photo_cfg.album_id %}<option value="{{ photo_cfg.album_id }}" selected>(current selection -- Load Albums to change)</option>{% endif %}
|
|
</select>
|
|
</label>
|
|
<label>Upcoming photos to show
|
|
<select id="queue_target_len">
|
|
{% for n in [5, 10, 15, 20, 25, 30, 40, 50] %}
|
|
<option value="{{ n }}" {% if photo_cfg and photo_cfg.queue_target_len == n %}selected{% endif %}>{{ n }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</label>
|
|
<label>Order
|
|
<select id="order">
|
|
<option value="sequential" {% if not photo_cfg or photo_cfg.order == "sequential" %}selected{% endif %}>Sequential</option>
|
|
<option value="shuffle" {% if photo_cfg and photo_cfg.order == "shuffle" %}selected{% endif %}>Shuffle</option>
|
|
</select>
|
|
</label>
|
|
<label>Display mode
|
|
<select id="display_mode">
|
|
{% for mode, label in display_mode_labels.items() %}
|
|
<option value="{{ mode }}" {% if photo_cfg and photo_cfg.display_mode == mode %}selected{% endif %}>{{ label }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</label>
|
|
<p class="sub" style="margin-top: 8px;">How a photo's aspect ratio
|
|
is reconciled with the panel's: <strong>Crop to fill</strong>
|
|
trims the excess; <strong>Crop to faces</strong> does the same
|
|
but shifts the crop to keep people on screen; <strong>Stretch to
|
|
fill</strong> fills the panel exactly without cropping (photos
|
|
not matching the panel's aspect ratio look stretched);
|
|
<strong>Shrink to fit</strong> shows the whole photo, letterboxed
|
|
if needed.</p>
|
|
<button type="button" class="secondary" id="load-albums">Load Albums</button>
|
|
<button type="submit">Save</button>
|
|
</form>
|
|
</section>
|
|
|
|
{% include "_widget_border_fields.html" %}
|
|
|
|
{% include "_widget_button_fields.html" %}
|
|
|
|
<section class="card" style="margin-top: 20px;">
|
|
<h2 class="card-title">Now displaying</h2>
|
|
<div id="current-thumb"><p class="sub">Loading...</p></div>
|
|
<button type="button" class="secondary" id="lock-photo-btn" style="margin-top: 8px;">Lock this photo</button>
|
|
<p class="sub" style="margin-top: 4px;">While locked, this photo stays
|
|
on screen -- the refresh timer and the next/back buttons won't
|
|
change it until you unlock it.</p>
|
|
</section>
|
|
|
|
<section class="card" style="margin-top: 20px;">
|
|
<h2 class="card-title">Upcoming</h2>
|
|
<p class="sub">Drag a photo to reorder (on touch, hold briefly first so a
|
|
normal scroll still works), "Show next" to jump it to the front, or
|
|
the × to remove it from rotation entirely.</p>
|
|
<div id="upcoming-grid" class="photo-grid"></div>
|
|
</section>
|