mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-21 22:31:46 +00:00
feat: unified photo provider abstraction layer (#584)
Introduce trek_photos as central photo registry. Frontend uses /api/photos/:id/:kind instead of provider-specific URLs. Adding a new photo provider is now backend-only work. - New trek_photos table (migration 98) with photo_id FK in trip_photos and journey_photos - Unified /api/photos/:id/thumbnail|original|info endpoint - photoResolverService for central resolution and streaming - ProviderPicker: add "All Photos" tab, rename tabs, fix i18n - Localize all hardcoded strings in JourneyDetailPage (14 langs) - Fix date formatting to use browser locale instead of hardcoded 'en' - Journey stats as styled tile cards
This commit is contained in:
+19
-5
@@ -339,20 +339,34 @@ export interface JourneyEntry {
|
||||
updated_at: number;
|
||||
}
|
||||
|
||||
export interface JourneyPhoto {
|
||||
export interface TrekPhoto {
|
||||
id: number;
|
||||
entry_id: number;
|
||||
provider: 'local' | 'immich' | 'synologyphotos';
|
||||
provider: string;
|
||||
asset_id?: string | null;
|
||||
owner_id?: number | null;
|
||||
file_path?: string | null;
|
||||
thumbnail_path?: string | null;
|
||||
caption?: string | null;
|
||||
sort_order: number;
|
||||
width?: number | null;
|
||||
height?: number | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface JourneyPhoto {
|
||||
id: number;
|
||||
entry_id: number;
|
||||
photo_id: number;
|
||||
caption?: string | null;
|
||||
sort_order: number;
|
||||
shared: number;
|
||||
created_at: number;
|
||||
// Joined from trek_photos for API responses
|
||||
provider?: string;
|
||||
asset_id?: string | null;
|
||||
owner_id?: number | null;
|
||||
file_path?: string | null;
|
||||
thumbnail_path?: string | null;
|
||||
width?: number | null;
|
||||
height?: number | null;
|
||||
}
|
||||
|
||||
export interface JourneyTrip {
|
||||
|
||||
Reference in New Issue
Block a user