diff --git a/common/config/public/ConfigClass.ts b/common/config/public/ConfigClass.ts index 6cff3df5..16761a51 100644 --- a/common/config/public/ConfigClass.ts +++ b/common/config/public/ConfigClass.ts @@ -90,7 +90,7 @@ export class PublicConfigClass { Thumbnail: { concurrentThumbnailGenerations: 1, thumbnailSizes: [200, 400, 600], - iconSize: 30 + iconSize: 45 }, Search: { enabled: true, diff --git a/frontend/app/gallery/gallery.component.ts b/frontend/app/gallery/gallery.component.ts index a435a04e..cf9cc3e4 100644 --- a/frontend/app/gallery/gallery.component.ts +++ b/frontend/app/gallery/gallery.component.ts @@ -143,6 +143,9 @@ export class GalleryComponent implements OnInit, OnDestroy { }; private sortDirectories() { + if (!this.directories) { + return; + } switch (this._galleryService.sorting.value) { case SortingMethods.ascName: case SortingMethods.ascDate: diff --git a/frontend/app/gallery/gallery.service.ts b/frontend/app/gallery/gallery.service.ts index 36d1a10b..932a012e 100644 --- a/frontend/app/gallery/gallery.service.ts +++ b/frontend/app/gallery/gallery.service.ts @@ -47,6 +47,7 @@ export class GalleryService { this.sorting.next(sorting); } + public async loadDirectory(directoryName: string): Promise { const content = new ContentWrapper(); diff --git a/frontend/app/gallery/grid/grid.gallery.component.ts b/frontend/app/gallery/grid/grid.gallery.component.ts index 2df905a8..084e868d 100644 --- a/frontend/app/gallery/grid/grid.gallery.component.ts +++ b/frontend/app/gallery/grid/grid.gallery.component.ts @@ -253,7 +253,8 @@ export class GalleryGridComponent implements OnChanges, OnInit, AfterViewInit, O // merge new data with old one let lastSameIndex = 0; let lastRowId = null; - for (let i = 0; i < this.media.length && i < this.photosToRender.length; ++i) { + let i = 0; + for (; i < this.media.length && i < this.photosToRender.length; ++i) { // If a media changed the whole row has to be removed if (this.photosToRender[i].rowId !== lastRowId) { @@ -264,12 +265,20 @@ export class GalleryGridComponent implements OnChanges, OnInit, AfterViewInit, O break; } } + // if all the same + if (this.photosToRender.length > 0 && + i === this.photosToRender.length && + i === this.media.length && + this.photosToRender[i - 1].equals(this.media[i - 1])) { + lastSameIndex = i; + } if (lastSameIndex > 0) { this.photosToRender.splice(lastSameIndex, this.photosToRender.length - lastSameIndex); this.renderedPhotoIndex = lastSameIndex; } else { this.clearRenderedPhotos(); } + } diff --git a/frontend/app/gallery/map/lightbox/lightbox.map.gallery.component.html b/frontend/app/gallery/map/lightbox/lightbox.map.gallery.component.html index adf3303c..ceeaac30 100644 --- a/frontend/app/gallery/map/lightbox/lightbox.map.gallery.component.html +++ b/frontend/app/gallery/map/lightbox/lightbox.map.gallery.component.html @@ -25,7 +25,7 @@