Files
espresso_frame/server/app/templates/_widget_button_fields.html
T
tfaour fcf3aec4c0
Build and push server image / test (push) Successful in 36s
Firmware build check / build-check (push) Successful in 2m4s
Build and push server image / build-and-push (push) Successful in 3m12s
Build and push server image / deploy (push) Successful in 58s
Move button actions to per-widget config, add hold-for-global-action
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.
2026-07-27 22:09:33 +00:00

28 lines
1.2 KiB
HTML

{% if button_action_labels %}
<section class="card" style="margin-top: 20px;">
<h2 class="card-title">Button actions</h2>
<p class="sub">What the frame's physical NEXT/BACK buttons do to this
widget. Every widget on the frame runs its own binding when a
button is pressed -- this only affects this one.</p>
<form id="button-actions-form">
<label>Next button
<select id="next_button_action">
<option value="" {% if not next_button_action %}selected{% endif %}>(none)</option>
{% for action, label in button_action_labels.items() %}
<option value="{{ action }}" {% if next_button_action == action %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
</label>
<label>Back button
<select id="back_button_action">
<option value="" {% if not back_button_action %}selected{% endif %}>(none)</option>
{% for action, label in button_action_labels.items() %}
<option value="{{ action }}" {% if back_button_action == action %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
</label>
<button type="submit">Save</button>
</form>
</section>
{% endif %}