diff --git a/backend/routers/caldav_router.py b/backend/routers/caldav_router.py index 94b1d32..268f575 100644 --- a/backend/routers/caldav_router.py +++ b/backend/routers/caldav_router.py @@ -27,6 +27,7 @@ class AccountCreate(BaseModel): class CalendarUpdate(BaseModel): enabled: Optional[bool] = None color: Optional[str] = None + name: Optional[str] = None class EventCreate(BaseModel): @@ -221,6 +222,8 @@ def update_calendar( calendar.enabled = data.enabled if data.color is not None: calendar.color = data.color + if data.name is not None: + calendar.name = data.name db.commit() return {"ok": True} diff --git a/backend/routers/profile_router.py b/backend/routers/profile_router.py index 10a1726..305818c 100644 --- a/backend/routers/profile_router.py +++ b/backend/routers/profile_router.py @@ -19,7 +19,7 @@ router = APIRouter() AVATAR_DIR = DATA_DIR / "avatars" AVATAR_DIR.mkdir(parents=True, exist_ok=True) -MAX_AVATAR_SIZE = 2 * 1024 * 1024 # 2 MB +MAX_AVATAR_SIZE = 5 * 1024 * 1024 # 5 MB ALLOWED_TYPES = {"image/jpeg", "image/png", "image/webp"} @@ -78,12 +78,12 @@ async def upload_avatar( data = await file.read() if len(data) > MAX_AVATAR_SIZE: - raise HTTPException(400, "Datei zu groß (max. 2 MB)") + raise HTTPException(400, "Datei zu groß (max. 5 MB)") # Resize to 256x256 img = Image.open(io.BytesIO(data)) img = img.convert("RGB") - img.thumbnail((256, 256)) + img.thumbnail((512, 512)) filename = f"user_{current_user.id}.jpg" path = AVATAR_DIR / filename diff --git a/frontend/css/app.css b/frontend/css/app.css index c1d9e48..c2e9223 100644 --- a/frontend/css/app.css +++ b/frontend/css/app.css @@ -307,18 +307,33 @@ a { color: var(--primary); text-decoration: none; } margin-right: 12px; } .cal-item:hover { background: var(--bg-hover); } -.cal-item-dot-wrapper { position: relative; flex-shrink: 0; } .cal-item-dot { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; cursor: pointer; } .cal-item-dot:hover { outline: 2px solid var(--text-2); outline-offset: 1px; } -.cal-color-input { - position: absolute; top: 0; left: 0; - width: 14px; height: 14px; opacity: 0; - pointer-events: none; +.cal-color-picker { + position: fixed; z-index: 500; + display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; + padding: 10px; + background: var(--bg-surface); border: 1px solid var(--border); + border-radius: var(--radius); box-shadow: var(--shadow-lg); +} +.cal-cp-swatch { + width: 28px; height: 28px; border-radius: 50%; + cursor: pointer; transition: transform .1s, box-shadow .1s; +} +.cal-cp-swatch:hover { + transform: scale(1.2); + box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px currentColor; } .cal-item input[type=checkbox] { accent-color: var(--primary); width: 14px; height: 14px; } -.cal-item-name { font-size: 13px; flex: 1; color: var(--text-1); } +.cal-item-name { font-size: 13px; flex: 1; color: var(--text-1); cursor: default; } +.cal-rename-input { + font-size: 13px; flex: 1; color: var(--text-1); + background: var(--bg-app); border: 1px solid var(--primary); + border-radius: var(--radius-sm); padding: 2px 6px; + outline: none; +} .cal-account-name { font-size: 11px; color: var(--text-3); padding: 4px 16px 2px; font-weight: 500; } .cal-item-remove { opacity: 0; } .cal-item:hover .cal-item-remove { opacity: 1; } @@ -619,6 +634,10 @@ a { color: var(--primary); text-decoration: none; } .profile-cal-name { font-size: 13px; color: var(--text-1); } .profile-cal-account { font-size: 11px; color: var(--text-3); } +/* ── Avatar Crop ───────────────────────────────────────── */ +.crop-container { max-height: 400px; overflow: hidden; background: #000; } +.crop-container img { display: block; max-width: 100%; } + /* ── Toast ──────────────────────────────────────────────── */ .toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); diff --git a/frontend/favicon.svg b/frontend/favicon.svg new file mode 100644 index 0000000..057e970 --- /dev/null +++ b/frontend/favicon.svg @@ -0,0 +1,13 @@ + diff --git a/frontend/index.html b/frontend/index.html index 180e41f..77fa55e 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,6 +4,8 @@