Files
espresso_frame/server/app/templates/_widget_dialog_tasks.html
T
tfaour e331f5e5a1
Build and push server image / test (push) Successful in 43s
Build and push server image / build-and-push (push) Successful in 3m51s
Build and push server image / deploy (push) Failing after 1m57s
Roll out "modern" HTML/CSS render style to every widget except photos
Extends weather's experimental Chromium+Jinja2 render style to battery,
text, tasks, static image, whiteboard, and calendar (all four view
modes -- agenda/today_tomorrow/week/month), and gives the photos widget
its own genuinely independent palette + dithering strength.

Photos: Frame.photo_palette_rgb/photo_dither_strength (mirroring the
existing palette_rgb/dither_strength), with a second "Photos
configuration" card in Advanced Configuration. widgets/photos.py's
render() quantizes itself against these before returning -- no
render_panel changes needed, since photos is the only widget that
genuinely needs a different reference palette and can carry that
itself, the same way modern-style widgets already self-dither via
ordered_dither.

Battery/text/tasks/static image/whiteboard: same render_style pattern
weather established (render_style column, html_render.py build
function, Jinja2 template, dialog toggle). Static image/whiteboard get
their first-ever visual chrome (a rounded-corner shadowed card,
shared framed_image.html.jinja) since classic draws them with zero
frame at all. Fixed the same "preview endpoint bypasses render_style"
bug weather originally shipped with, for tasks/static/whiteboard/
calendar's preview endpoints.

Calendar: own module (app/calendar_html_render.py, mirroring
calendar_render.py's separation from the simpler widgets) covering all
four view modes, not just agenda -- reuses calendar_render's own
private helpers so event colors/times/weather/month-grid math match
classic exactly. Found and fixed two real cross-day layout bugs along
the way: a per-day header height that varied based on whether that
specific day had a weather entry (misaligning where every other day's
event rows started across the week/month grid), and regular-weight
small text being fragile under Bayer ordered dithering (out-of-month
day numbers degraded into unrecognizable speckle) -- fixed by using
bold everywhere and de-emphasizing via size instead of weight/gray,
since gray text has the same dithering fragility this project's PIL
renderers already avoid for exactly this reason.

Migrations 32-38 (Frame's two new columns, then one render_style column
per widget config table). 452 tests passing, including new dispatch/
migration coverage per widget type and a dedicated photos test proving
photo_palette_rgb produces genuinely independent quantization from the
frame's main palette_rgb.
2026-07-31 03:52:19 +00:00

78 lines
3.8 KiB
HTML

<h2 class="dialog-title">Tasks widget</h2>
<section class="card">
<h2 class="card-title">Included task lists</h2>
<p class="sub">Each linked person adds their own CalDAV task lists (set
up in <a href="/settings">Settings</a> -- a plain ICS subscription
has no task list) -- being linked here doesn't include anything
automatically. Anyone linked to this frame can mute a list they'd
rather not see here, even one they don't own; only its owner can add
it back.</p>
<ul class="calendar-user-list">
{% for u in task_users %}
<li>
<p class="calendar-user-name">{{ u.display_name }}{% if u.is_self %} (you){% endif %}</p>
{% if u.task_lists %}
{% set current_palette = frame.palette_rgb or default_palette_rgb %}
{% set current_hex = palette_to_hex(current_palette) %}
{% for c in u.task_lists %}
<div class="checkbox-row calendar-row" style="margin-top: 6px;">
<input type="checkbox" class="task-list-toggle"
data-user-id="{{ u.user_id }}" data-key="{{ c.key }}" data-label="{{ c.label }}"
{% if c.included %}checked{% endif %}>
<label style="margin: 0; font-weight: normal;">{{ c.label }}</label>
{% if u.is_self %}
<span class="task-list-color-picker" data-key="{{ c.key }}">
{% for idx in range(2, 6) %}
<button type="button" class="color-swatch {% if c.color_index == idx %}selected{% endif %}"
data-index="{{ idx }}" title="{{ task_color_labels[idx] }}"
style="background-color: {{ current_hex[idx] }};"></button>
{% endfor %}
<button type="button" class="color-swatch color-swatch-auto {% if c.color_index is none %}selected{% endif %}"
data-index="" title="Auto (assigned automatically)">Auto</button>
</span>
{% endif %}
</div>
{% endfor %}
{% elif u.is_self %}
<p class="sub" style="margin-top: 6px;">No CalDAV task lists set up yet -- add a CalDAV account in <a href="/settings">Settings</a>.</p>
{% else %}
<p class="sub" style="margin-top: 6px;">No task lists included.</p>
{% endif %}
</li>
{% endfor %}
</ul>
</section>
<section class="card" style="margin-top: 20px;">
<h2 class="card-title">Settings</h2>
<form id="tasks-config-form">
<label>Name
<input type="text" id="tasks_name" maxlength="40" placeholder="Tasks" value="{{ task_cfg.name }}">
</label>
<p class="sub" style="margin-top: 4px;">Shown at the top of this widget on the panel instead of "Tasks" -- e.g. "Chores" or "Mom's list".</p>
<div class="checkbox-row" style="margin-top: 10px;">
<input type="checkbox" id="tasks_show_completed" {% if task_cfg.show_completed %}checked{% endif %}>
<label for="tasks_show_completed">Also show tasks completed in the last 24 hours</label>
</div>
<label>Render style
<select id="tasks_render_style">
<option value="classic" {% if task_cfg.render_style == 'classic' %}selected{% endif %}>Classic (hand-drawn checklist)</option>
<option value="modern" {% if task_cfg.render_style == 'modern' %}selected{% endif %}>Modern (experimental)</option>
</select>
</label>
<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">Preview</h2>
<p class="sub">How this widget currently renders.</p>
<img class="preview-img" id="tasks-preview" alt="Tasks preview">
<button type="button" class="secondary" id="tasks-preview-refresh">Refresh now</button>
</section>