- 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>
28 lines
658 B
Python
28 lines
658 B
Python
"""
|
|
存储服务模块
|
|
|
|
提供文件存储相关的服务,包括:
|
|
- 本地存储服务
|
|
- 命名规则解析器
|
|
- 存储异常定义
|
|
"""
|
|
from .exceptions import (
|
|
DirectoryCreationError,
|
|
FileReadError,
|
|
FileWriteError,
|
|
InvalidPathError,
|
|
StorageException,
|
|
StorageFileNotFoundError,
|
|
UploadSessionExpiredError,
|
|
UploadSessionNotFoundError,
|
|
)
|
|
from .local_storage import LocalStorageService
|
|
from .naming_rule import NamingContext, NamingRuleParser
|
|
from .object import (
|
|
adjust_user_storage,
|
|
copy_object_recursive,
|
|
delete_object_recursive,
|
|
permanently_delete_objects,
|
|
restore_objects,
|
|
soft_delete_objects,
|
|
) |