From c0b4edd80e10797ebfbc3170a51f60778e207cb8 Mon Sep 17 00:00:00 2001 From: anthony Date: Wed, 9 Oct 2024 18:22:04 -0700 Subject: [PATCH 1/3] Adjusting history behavior so that image navigation is not added to browser history. --- src/frontend/app/ui/gallery/grid/grid.gallery.component.ts | 6 +++++- .../app/ui/gallery/lightbox/lightbox.gallery.component.ts | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontend/app/ui/gallery/grid/grid.gallery.component.ts b/src/frontend/app/ui/gallery/grid/grid.gallery.component.ts index 972d3db59..1287dd82e 100644 --- a/src/frontend/app/ui/gallery/grid/grid.gallery.component.ts +++ b/src/frontend/app/ui/gallery/grid/grid.gallery.component.ts @@ -193,6 +193,7 @@ export class GalleryGridComponent photoClicked(media: MediaDTO): void { this.router.navigate([], { queryParams: this.queryService.getParams({media}), + replaceUrl: true, }); } @@ -400,7 +401,10 @@ export class GalleryGridComponent } } if (groupIndex === -1) { - this.router.navigate([], {queryParams: this.queryService.getParams()}); + this.router.navigate([], { + queryParams: this.queryService.getParams(), + replaceUrl: true, + }); return; } // Make sure that at leas one more row is rendered diff --git a/src/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.ts b/src/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.ts index a3623b965..aaf548ce8 100644 --- a/src/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.ts +++ b/src/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.ts @@ -442,6 +442,7 @@ export class GalleryLightboxComponent implements OnDestroy, OnInit { queryParams: this.queryService.getParams( {media: this.gridPhotoQL.get(photoIndex).gridMedia.media, playing: this.slideShowRunning} ), + replaceUrl: true, }) .then(() => { this.piTitleService.setMediaTitle(this.gridPhotoQL.get(photoIndex).gridMedia); From 48eb34fee7e8622c2336152000f4f2fbe685a477 Mon Sep 17 00:00:00 2001 From: anthony Date: Thu, 10 Oct 2024 12:20:23 -0700 Subject: [PATCH 2/3] Allowing navigation history to include the current gallery. --- src/frontend/app/ui/gallery/grid/grid.gallery.component.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/frontend/app/ui/gallery/grid/grid.gallery.component.ts b/src/frontend/app/ui/gallery/grid/grid.gallery.component.ts index 1287dd82e..bbcd785cc 100644 --- a/src/frontend/app/ui/gallery/grid/grid.gallery.component.ts +++ b/src/frontend/app/ui/gallery/grid/grid.gallery.component.ts @@ -193,7 +193,6 @@ export class GalleryGridComponent photoClicked(media: MediaDTO): void { this.router.navigate([], { queryParams: this.queryService.getParams({media}), - replaceUrl: true, }); } @@ -403,7 +402,6 @@ export class GalleryGridComponent if (groupIndex === -1) { this.router.navigate([], { queryParams: this.queryService.getParams(), - replaceUrl: true, }); return; } From e2984f66dde68c1b22887c0555d0614cd13c130a Mon Sep 17 00:00:00 2001 From: anthony Date: Thu, 10 Oct 2024 12:28:32 -0700 Subject: [PATCH 3/3] Cleaning up formatting. --- src/frontend/app/ui/gallery/grid/grid.gallery.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/frontend/app/ui/gallery/grid/grid.gallery.component.ts b/src/frontend/app/ui/gallery/grid/grid.gallery.component.ts index bbcd785cc..972d3db59 100644 --- a/src/frontend/app/ui/gallery/grid/grid.gallery.component.ts +++ b/src/frontend/app/ui/gallery/grid/grid.gallery.component.ts @@ -400,9 +400,7 @@ export class GalleryGridComponent } } if (groupIndex === -1) { - this.router.navigate([], { - queryParams: this.queryService.getParams(), - }); + this.router.navigate([], {queryParams: this.queryService.getParams()}); return; } // Make sure that at leas one more row is rendered