diff --git a/app/Actions/Photos/FilterPhotosAction.php b/app/Actions/Photos/FilterPhotosAction.php index 93ee7a8c..0ede3756 100644 --- a/app/Actions/Photos/FilterPhotosAction.php +++ b/app/Actions/Photos/FilterPhotosAction.php @@ -18,7 +18,8 @@ public function run(User $user, int $perPage): LengthAwarePaginator ->filter($user->settings->photo_filters) ->withExists('items') ->latest('id') - ->paginate($perPage); + ->paginate($perPage) + ->withQueryString(); $photos->getCollection()->transform(function (Photo $photo) { $photo->append('full_path'); diff --git a/app/Http/Controllers/PhotosController.php b/app/Http/Controllers/PhotosController.php index 96a04f46..cc28d92b 100644 --- a/app/Http/Controllers/PhotosController.php +++ b/app/Http/Controllers/PhotosController.php @@ -34,7 +34,7 @@ public function index( $user->save(); } - $perPage = in_array($request->integer('per_page'), [12, 24, 48, 96]) + $perPage = in_array($request->integer('per_page'), [12, 24, 48, 96, 192]) ? $request->integer('per_page') : 12; diff --git a/resources/js/Pages/Photos/Index.vue b/resources/js/Pages/Photos/Index.vue index 763fb591..738667be 100644 --- a/resources/js/Pages/Photos/Index.vue +++ b/resources/js/Pages/Photos/Index.vue @@ -23,6 +23,7 @@ const perPageOptions = [ {label: '24 per page', value: 24}, {label: '48 per page', value: 48}, {label: '96 per page', value: 96}, + {label: '192 per page', value: 192}, ]; const perPage = ref(perPageOptions.find(option => option.value === props.photos.per_page)); @@ -113,7 +114,7 @@ const filter = (filters) => { -
+