Week view: relative start-day offset for non-7-day counts; hide week-only settings elsewhere
Build and push server image / build-and-push (push) Successful in 53s
Build and push server image / build-and-push (push) Successful in 53s
calendar_week_start's fixed-weekday anchor ("start on the most recent
Monday") stops making sense once the view isn't a literal calendar
week, so a non-7-day week view now starts calendar_week_start_offset
days from today instead (0 = starts today, negative/positive = past/
future) -- calendar_week_start still governs at the default 7 days,
unchanged.
Also hides the Calendar tab's week-only fields (days to show, layout,
start offset) unless View is actually set to Week, and further hides
the new start-offset field specifically when Days to show is 7 (where
it has no effect). "Week starts on" stays visible for Month too, since
it actually still applies there.
This commit is contained in:
@@ -207,6 +207,15 @@ class Frame(Base):
|
||||
# columns or stacked bands (see calendar_render.py's _build_week).
|
||||
calendar_week_days: Mapped[int] = mapped_column(Integer, default=7)
|
||||
calendar_week_layout: Mapped[str] = mapped_column(String, default="horizontal") # "horizontal" | "vertical"
|
||||
# Only used when calendar_week_days != 7 -- calendar_week_start's
|
||||
# fixed-weekday anchor ("start on the most recent Monday") stops
|
||||
# making sense once the view isn't a literal calendar week, so a
|
||||
# non-7-day view instead starts this many days from today (0 =
|
||||
# starts today, negative = starts in the past, positive = starts in
|
||||
# the future). Ignored (calendar_week_start governs instead) at the
|
||||
# default 7 days, so this has no effect until someone actually
|
||||
# changes the day count.
|
||||
calendar_week_start_offset: Mapped[int] = mapped_column(Integer, default=0)
|
||||
|
||||
# Optional task list, week view only -- takes the space of one day
|
||||
# slot rather than adding an extra one (see calendar_render.py's
|
||||
|
||||
Reference in New Issue
Block a user