From 1f58bffa2c86804bdd7b1a06b8fa8f2bd8b3f413 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Sat, 19 Jan 2019 17:31:36 +0100 Subject: [PATCH] improving duplicate page --- .../thumbnail/ThumbnailGeneratorMWs.ts | 2 +- .../app/duplicates/duplicates.component.css | 7 +++-- .../app/duplicates/duplicates.component.html | 29 ++++++++++--------- .../app/duplicates/duplicates.component.ts | 11 +++++++ package.json | 2 +- 5 files changed, 33 insertions(+), 18 deletions(-) diff --git a/backend/middlewares/thumbnail/ThumbnailGeneratorMWs.ts b/backend/middlewares/thumbnail/ThumbnailGeneratorMWs.ts index 5a1eecba..0c0b0e7f 100644 --- a/backend/middlewares/thumbnail/ThumbnailGeneratorMWs.ts +++ b/backend/middlewares/thumbnail/ThumbnailGeneratorMWs.ts @@ -65,7 +65,7 @@ export class ThumbnailGeneratorMWs { } } catch (error) { - return next(new ErrorDTO(ErrorCodes.SERVER_ERROR, 'error during postprocessing result', error.toString())); + return next(new ErrorDTO(ErrorCodes.SERVER_ERROR, 'error during postprocessing result (adding thumbnail info)', error.toString())); } diff --git a/frontend/app/duplicates/duplicates.component.css b/frontend/app/duplicates/duplicates.component.css index fb4eddba..6d4eb798 100644 --- a/frontend/app/duplicates/duplicates.component.css +++ b/frontend/app/duplicates/duplicates.component.css @@ -1,6 +1,3 @@ -.same-data { - font-weight: bold; -} .card{ margin: 8px 0; } @@ -13,3 +10,7 @@ .row:hover{ background-color: #f8f9fa; } + +a{ + color: #212529; +} diff --git a/frontend/app/duplicates/duplicates.component.html b/frontend/app/duplicates/duplicates.component.html index 667cb643..c9dcd8e3 100644 --- a/frontend/app/duplicates/duplicates.component.html +++ b/frontend/app/duplicates/duplicates.component.html @@ -2,28 +2,31 @@
+ +
{{group.name}}
diff --git a/frontend/app/duplicates/duplicates.component.ts b/frontend/app/duplicates/duplicates.component.ts index 91b7519e..79c4b2d7 100644 --- a/frontend/app/duplicates/duplicates.component.ts +++ b/frontend/app/duplicates/duplicates.component.ts @@ -28,6 +28,10 @@ export class DuplicateComponent implements OnDestroy { }; subscription: Subscription; renderTimer: number = null; + duplicateCount = { + pairs: 0, + photos: 0 + }; constructor(public _duplicateService: DuplicateService, public queryService: QueryService) { @@ -36,9 +40,16 @@ export class DuplicateComponent implements OnDestroy { this.directoryGroups = []; this.renderedIndex = {group: -1, pairs: 0}; this.renderedDirGroups = []; + this.duplicateCount = { + pairs: 0, + photos: 0 + }; if (duplicates === null) { return; } + this.duplicateCount.photos = duplicates.reduce((prev: number, curr) => prev + curr.media.length, 0); + this.duplicateCount.pairs = duplicates.length; + const getMostFrequentDir = (dupls: DuplicatesDTO[]) => { if (dupls.length === 0) { return null; diff --git a/package.json b/package.json index 5a8e5daf..63bc4285 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pigallery2", - "version": "1.5.6", + "version": "1.5.8", "description": "This is a photo gallery optimised for running low resource servers (especially on raspberry pi)", "author": "Patrik J. Braun", "homepage": "https://github.com/bpatrik/PiGallery2",