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
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:
parent
fc66954c03
commit
c40a6569b4
10 changed files with 685 additions and 64 deletions
|
|
@ -115,7 +115,8 @@ async def create_item(
|
|||
start_time=event.start_time,
|
||||
duration_min=event.duration_min,
|
||||
title=event.title,
|
||||
repeat_weekly=event.repeat_weekly
|
||||
repeat_weekly=event.repeat_weekly,
|
||||
color=event.color or "blue"
|
||||
)
|
||||
if event.repeat_weekly:
|
||||
new_event.weekday = get_weekday_from_date(event.date)
|
||||
|
|
@ -214,7 +215,8 @@ async def update_item(
|
|||
replacement_title=update.title or event.title,
|
||||
replacement_date=replacement_date,
|
||||
replacement_start_time=replacement_start_time,
|
||||
replacement_duration_min=replacement_duration
|
||||
replacement_duration_min=replacement_duration,
|
||||
replacement_color=update.color or event.color
|
||||
))
|
||||
await db.commit()
|
||||
return {"success": True, "action": "exception_created"}
|
||||
|
|
@ -237,6 +239,8 @@ async def update_item(
|
|||
event.start_time = update.start_time
|
||||
if update.duration_min:
|
||||
event.duration_min = update.duration_min
|
||||
if update.color:
|
||||
event.color = update.color
|
||||
|
||||
await db.commit()
|
||||
return {"success": True}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue