feat: enhance gallery layout and functionality

- Added support for virtualized rendering in ListView using @tanstack/react-virtual for improved performance with large photo sets.
- Integrated new hooks for mobile responsiveness and context management in ListView and PhotoCard components.
- Updated PageHeader and ViewModeSegment for better layout consistency and user experience.
- Increased upload limits in backend configuration to accommodate larger files and requests.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-11-30 00:23:14 +08:00
parent 26100b26cd
commit e71548b320
13 changed files with 456 additions and 155 deletions

View File

@@ -3,10 +3,10 @@ import type { Context } from 'hono'
import type { UploadAssetInput } from './photo-asset.types'
export const ABSOLUTE_MAX_FILE_SIZE_BYTES = 50 * 1024 * 1024 // 50 MB
export const ABSOLUTE_MAX_REQUEST_SIZE_BYTES = 500 * 1024 * 1024 // 500 MB
export const MAX_UPLOAD_FILES_PER_BATCH = 32
export const MAX_TEXT_FIELDS_PER_REQUEST = 64
export const ABSOLUTE_MAX_FILE_SIZE_BYTES = 1024 * 1024 * 1024 // 1 GB hard cap per file
export const ABSOLUTE_MAX_REQUEST_SIZE_BYTES = 5 * 1024 * 1024 * 1024 // 5 GB hard cap per request
export const MAX_UPLOAD_FILES_PER_BATCH = 128
export const MAX_TEXT_FIELDS_PER_REQUEST = 256
const PHOTO_UPLOAD_LIMIT_CONTEXT_KEY = 'photo.upload.limits'
const PHOTO_UPLOAD_INPUT_CONTEXT_KEY = 'photo.upload.inputs'