diff --git a/.gitignore b/.gitignore index f9fcf631..5965b197 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.angular/ .idea/ PiGallery2.iml node_modules/ @@ -30,3 +31,6 @@ test.* /test/cypress/screenshots/ /extensions/ /extension/lib/ +*.sublime-project +*.sublime-workspace +.DS_Store diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..8ead549e --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 18.16.0 diff --git a/angular.json b/angular.json index f52ddf25..63db2700 100644 --- a/angular.json +++ b/angular.json @@ -4,7 +4,8 @@ "schematicCollections": [ "@angular-eslint/schematics", "@schematics/angular" - ] + ], + "analytics": false }, "version": 1, "newProjectRoot": "projects", diff --git a/src/backend/model/database/enitites/MediaEntity.ts b/src/backend/model/database/enitites/MediaEntity.ts index 3d959198..52bbf600 100644 --- a/src/backend/model/database/enitites/MediaEntity.ts +++ b/src/backend/model/database/enitites/MediaEntity.ts @@ -86,6 +86,9 @@ export class MediaMetadataEntity implements MediaMetadata { @Column('text') caption: string; + @Column('text') + title?: string; + @Column(() => MediaDimensionEntity) size: MediaDimensionEntity; diff --git a/src/backend/model/fileaccess/MetadataLoader.ts b/src/backend/model/fileaccess/MetadataLoader.ts index 80df3587..89c1a456 100644 --- a/src/backend/model/fileaccess/MetadataLoader.ts +++ b/src/backend/model/fileaccess/MetadataLoader.ts @@ -335,6 +335,9 @@ export class MetadataLoader { .replace(/\0/g, '') .trim(); } + if (iptcData.object_name) { + metadata.title = iptcData.object_name.replace(/\0/g, '').trim(); + } if (iptcData.caption) { metadata.caption = iptcData.caption.replace(/\0/g, '').trim(); } diff --git a/src/common/DataStructureVersion.ts b/src/common/DataStructureVersion.ts index d7b968fe..3f62a4e3 100644 --- a/src/common/DataStructureVersion.ts +++ b/src/common/DataStructureVersion.ts @@ -1,4 +1,4 @@ /** * This version indicates that the sql/entities/*Entity.ts files got changed and the db needs to be recreated */ -export const DataStructureVersion = 34; +export const DataStructureVersion = 35; diff --git a/src/common/entities/MediaDTO.ts b/src/common/entities/MediaDTO.ts index b53fc46e..9c282abe 100644 --- a/src/common/entities/MediaDTO.ts +++ b/src/common/entities/MediaDTO.ts @@ -19,6 +19,8 @@ export interface MediaMetadata { fileSize: number; keywords?: string[]; rating?: RatingTypes; + title?: string; + caption?: string; } export interface MediaDimension { diff --git a/src/common/entities/PhotoDTO.ts b/src/common/entities/PhotoDTO.ts index 1bd6b090..a4af1c24 100644 --- a/src/common/entities/PhotoDTO.ts +++ b/src/common/entities/PhotoDTO.ts @@ -27,6 +27,7 @@ export interface FaceRegion { } export interface PhotoMetadata extends MediaMetadata { + title?: string; caption?: string; cameraData?: CameraMetadata; positionData?: PositionMetaData; diff --git a/src/frontend/app/app.module.ts b/src/frontend/app/app.module.ts index 34f24d03..51e21661 100644 --- a/src/frontend/app/app.module.ts +++ b/src/frontend/app/app.module.ts @@ -130,6 +130,7 @@ import { ionContractOutline, ionCopyOutline, ionDocumentOutline, + ionDocumentTextOutline, ionDownloadOutline, ionExpandOutline, ionFileTrayFullOutline, @@ -243,7 +244,7 @@ Marker.prototype.options.icon = MarkerFactory.defIcon; ionAlbumsOutline, ionSettingsOutline, ionLogOutOutline, ionChevronForwardOutline, ionChevronDownOutline, ionChevronBackOutline, ionTrashOutline, ionSaveOutline, ionAddOutline, ionRemoveOutline, - ionTextOutline, ionFolderOutline, ionDocumentOutline, ionImageOutline, + ionTextOutline, ionFolderOutline, ionDocumentOutline, ionDocumentTextOutline, ionImageOutline, ionPricetagOutline, ionLocationOutline, ionSunnyOutline, ionMoonOutline, ionVideocamOutline, ionInformationCircleOutline, diff --git a/src/frontend/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.css b/src/frontend/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.css index fa0793e9..8e58b9a3 100644 --- a/src/frontend/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.css +++ b/src/frontend/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.css @@ -27,6 +27,10 @@ padding-right: 5px; } +.caption-body { + white-space: pre-wrap; +} + .yaga-map { width: 100%; height: 100%; diff --git a/src/frontend/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html b/src/frontend/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html index 02a1fcd1..3e1cbbfa 100644 --- a/src/frontend/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html +++ b/src/frontend/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html @@ -4,6 +4,21 @@ + +