Manual per-calendar color choice for calendar mode
Build and push server image / build-and-push (push) Successful in 49s
Build and push server image / build-and-push (push) Successful in 49s
Each linked person can pin one of the panel's four non-black/white colors (Yellow/Red/Blue/Green) to their own calendar instead of relying on calendar_render.py's old auto-cycle-by-owner-name order -- owner-only, like adding a calendar in the first place. Colors resolve against whichever palette a frame actually renders with (including a custom Advanced configuration override), so a pinned "Blue" stays this frame's actual blue. Event color bars/dots are also bigger and rounded now across agenda/week/month views, easier to tell apart at a glance.
This commit is contained in:
@@ -94,13 +94,17 @@ class CalendarSource:
|
||||
"caldav", url is the calendar's own URL, username/password its
|
||||
account credentials) -- see caldav_client.py. owner_display_name
|
||||
tags every event pulled from this source so a merged agenda can show
|
||||
whose event is whose."""
|
||||
whose event is whose. color_index (2-5, into
|
||||
image_pipeline.DEFAULT_PALETTE_RGB) is this calendar's manually
|
||||
pinned color, or None to fall back on calendar_render.py's old
|
||||
auto-cycle-by-owner-name behavior -- see models.FrameCalendar."""
|
||||
|
||||
owner_display_name: str
|
||||
kind: str
|
||||
url: str
|
||||
username: str = ""
|
||||
password: str = ""
|
||||
color_index: int | None = None
|
||||
|
||||
|
||||
def merge_events(
|
||||
@@ -127,6 +131,7 @@ def merge_events(
|
||||
continue
|
||||
for event in events:
|
||||
event["owner_display_name"] = source.owner_display_name
|
||||
event["color_index"] = source.color_index
|
||||
merged.append(event)
|
||||
|
||||
merged.sort(key=lambda e: e["start"])
|
||||
|
||||
Reference in New Issue
Block a user