feat: add theme preset system with admin CRUD, public listing, and user theme settings
- Add ChromaticColor (17 Tailwind colors) and NeutralColor (5 grays) enums - Add ThemePreset table with flat color columns and unique name constraint - Add admin theme endpoints (CRUD + set default) at /api/v1/admin/theme - Add public theme listing at /api/v1/site/themes - Add user theme settings (PATCH /theme) with color snapshot on User model - User.color_* columns store per-user overrides; fallback to default preset then builtin - Initialize default theme preset in migration - Remove legacy defaultTheme/themes settings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -53,7 +53,7 @@ async def router_admin_get_share_list(
|
||||
)
|
||||
async def router_admin_get_share(
|
||||
session: SessionDep,
|
||||
share_id: int,
|
||||
share_id: UUID,
|
||||
) -> ResponseBase:
|
||||
"""
|
||||
获取分享详情。
|
||||
@@ -99,7 +99,7 @@ async def router_admin_get_share(
|
||||
)
|
||||
async def router_admin_delete_share(
|
||||
session: SessionDep,
|
||||
share_id: int,
|
||||
share_id: UUID,
|
||||
) -> ResponseBase:
|
||||
"""
|
||||
删除分享。
|
||||
|
||||
Reference in New Issue
Block a user