mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
[#760] Add image titles and captions to the info panel.
This commit is contained in:
parent
1eaad445b1
commit
e7c0906cb2
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
|
.angular/
|
||||||
.idea/
|
.idea/
|
||||||
PiGallery2.iml
|
PiGallery2.iml
|
||||||
node_modules/
|
node_modules/
|
||||||
@ -30,3 +31,6 @@ test.*
|
|||||||
/test/cypress/screenshots/
|
/test/cypress/screenshots/
|
||||||
/extensions/
|
/extensions/
|
||||||
/extension/lib/
|
/extension/lib/
|
||||||
|
*.sublime-project
|
||||||
|
*.sublime-workspace
|
||||||
|
.DS_Store
|
||||||
|
1
.tool-versions
Normal file
1
.tool-versions
Normal file
@ -0,0 +1 @@
|
|||||||
|
nodejs 18.16.0
|
@ -4,7 +4,8 @@
|
|||||||
"schematicCollections": [
|
"schematicCollections": [
|
||||||
"@angular-eslint/schematics",
|
"@angular-eslint/schematics",
|
||||||
"@schematics/angular"
|
"@schematics/angular"
|
||||||
]
|
],
|
||||||
|
"analytics": false
|
||||||
},
|
},
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"newProjectRoot": "projects",
|
"newProjectRoot": "projects",
|
||||||
|
@ -86,6 +86,9 @@ export class MediaMetadataEntity implements MediaMetadata {
|
|||||||
@Column('text')
|
@Column('text')
|
||||||
caption: string;
|
caption: string;
|
||||||
|
|
||||||
|
@Column('text')
|
||||||
|
title?: string;
|
||||||
|
|
||||||
@Column(() => MediaDimensionEntity)
|
@Column(() => MediaDimensionEntity)
|
||||||
size: MediaDimensionEntity;
|
size: MediaDimensionEntity;
|
||||||
|
|
||||||
|
@ -342,6 +342,9 @@ export class MetadataLoader {
|
|||||||
.replace(/\0/g, '')
|
.replace(/\0/g, '')
|
||||||
.trim();
|
.trim();
|
||||||
}
|
}
|
||||||
|
if (iptcData.object_name) {
|
||||||
|
metadata.title = iptcData.object_name.replace(/\0/g, '').trim();
|
||||||
|
}
|
||||||
if (iptcData.caption) {
|
if (iptcData.caption) {
|
||||||
metadata.caption = iptcData.caption.replace(/\0/g, '').trim();
|
metadata.caption = iptcData.caption.replace(/\0/g, '').trim();
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/**
|
/**
|
||||||
* This version indicates that the sql/entities/*Entity.ts files got changed and the db needs to be recreated
|
* 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;
|
||||||
|
@ -19,6 +19,8 @@ export interface MediaMetadata {
|
|||||||
fileSize: number;
|
fileSize: number;
|
||||||
keywords?: string[];
|
keywords?: string[];
|
||||||
rating?: RatingTypes;
|
rating?: RatingTypes;
|
||||||
|
title?: string;
|
||||||
|
caption?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MediaDimension {
|
export interface MediaDimension {
|
||||||
|
@ -27,6 +27,7 @@ export interface FaceRegion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface PhotoMetadata extends MediaMetadata {
|
export interface PhotoMetadata extends MediaMetadata {
|
||||||
|
title?: string;
|
||||||
caption?: string;
|
caption?: string;
|
||||||
cameraData?: CameraMetadata;
|
cameraData?: CameraMetadata;
|
||||||
positionData?: PositionMetaData;
|
positionData?: PositionMetaData;
|
||||||
|
@ -130,6 +130,7 @@ import {
|
|||||||
ionContractOutline,
|
ionContractOutline,
|
||||||
ionCopyOutline,
|
ionCopyOutline,
|
||||||
ionDocumentOutline,
|
ionDocumentOutline,
|
||||||
|
ionDocumentTextOutline,
|
||||||
ionDownloadOutline,
|
ionDownloadOutline,
|
||||||
ionExpandOutline,
|
ionExpandOutline,
|
||||||
ionFileTrayFullOutline,
|
ionFileTrayFullOutline,
|
||||||
@ -243,7 +244,7 @@ Marker.prototype.options.icon = MarkerFactory.defIcon;
|
|||||||
ionAlbumsOutline, ionSettingsOutline, ionLogOutOutline,
|
ionAlbumsOutline, ionSettingsOutline, ionLogOutOutline,
|
||||||
ionChevronForwardOutline, ionChevronDownOutline, ionChevronBackOutline,
|
ionChevronForwardOutline, ionChevronDownOutline, ionChevronBackOutline,
|
||||||
ionTrashOutline, ionSaveOutline, ionAddOutline, ionRemoveOutline,
|
ionTrashOutline, ionSaveOutline, ionAddOutline, ionRemoveOutline,
|
||||||
ionTextOutline, ionFolderOutline, ionDocumentOutline, ionImageOutline,
|
ionTextOutline, ionFolderOutline, ionDocumentOutline, ionDocumentTextOutline, ionImageOutline,
|
||||||
ionPricetagOutline, ionLocationOutline,
|
ionPricetagOutline, ionLocationOutline,
|
||||||
ionSunnyOutline, ionMoonOutline, ionVideocamOutline,
|
ionSunnyOutline, ionMoonOutline, ionVideocamOutline,
|
||||||
ionInformationCircleOutline,
|
ionInformationCircleOutline,
|
||||||
|
@ -27,6 +27,10 @@
|
|||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.caption-body {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
.yaga-map {
|
.yaga-map {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -4,6 +4,21 @@
|
|||||||
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
|
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row" *ngIf="media.metadata.caption || media.metadata.title">
|
||||||
|
<div class="col-1 ps-0">
|
||||||
|
<ng-icon class="details-icon" name="ionDocumentTextOutline"></ng-icon>
|
||||||
|
</div>
|
||||||
|
<div class="col-11">
|
||||||
|
<h4 *ngIf="media.metadata.title">
|
||||||
|
{{media.metadata.title}}
|
||||||
|
</h4>
|
||||||
|
<div class="details-main" *ngIf="media.metadata.caption">
|
||||||
|
<div class="caption-body">{{media.metadata.caption}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row" *ngIf="contentLoaderService.isSearchResult()">
|
<div class="row" *ngIf="contentLoaderService.isSearchResult()">
|
||||||
<div class="col-1 ps-0">
|
<div class="col-1 ps-0">
|
||||||
<ng-icon class="details-icon" name="ionFolderOutline"></ng-icon>
|
<ng-icon class="details-icon" name="ionFolderOutline"></ng-icon>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user