Add event colors (Catppuccin Mocha) and read-only week view for users
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 20s

Admins can now pick a color per event from a Catppuccin Mocha palette;
existing events default to blue. Colors flow through to both the admin
timeline and the new "Неделя" tab in the user view, which reuses the
admin's weekly grid in a read-only mode. Also reworks event blocks to
show a single-line "start–end title" so short events no longer overflow,
tidies the admin toolbar, and expands mobile responsiveness across both
frontends.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
vrubel 2026-07-12 18:03:21 +00:00
parent fc66954c03
commit c40a6569b4
10 changed files with 685 additions and 64 deletions

View file

@ -12,6 +12,7 @@ class EventCreate(BaseModel):
duration_min: int
title: str
repeat_weekly: bool = False
color: str = "blue" # ключ цвета из палитры Catppuccin Mocha
class TaskResponse(BaseModel):
id: int
@ -28,6 +29,7 @@ class EventResponse(BaseModel):
title: str
kind: Literal["event"] = "event"
repeat_weekly: bool = False
color: str = "blue"
class ScheduleItem(BaseModel):
kind: Literal["task", "event"]
@ -38,6 +40,7 @@ class ScheduleItem(BaseModel):
start_time: Optional[str] = None
duration_min: Optional[int] = None
repeat_weekly: Optional[bool] = None
color: Optional[str] = None
class ScheduleResponse(BaseModel):
items: list[ScheduleItem]
@ -49,3 +52,4 @@ class UpdateRequest(BaseModel):
duration_min: Optional[int] = None
occurrence_date: Optional[str] = None
scope: Optional[Literal["one_date", "series"]] = None # для weekly tasks
color: Optional[str] = None