From 46851db1a5404f7a69a3e6341c5338681a86e0cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Viguier?= Date: Wed, 30 Oct 2024 00:05:02 +0100 Subject: [PATCH] Add link to album from sharing page (#2625) --- app/Http/Resources/Models/AccessPermissionResource.php | 2 ++ resources/js/components/forms/album/AlbumProperties.vue | 2 +- resources/js/components/forms/sharing/ShareLine.vue | 6 +++++- resources/js/lychee.d.ts | 3 ++- resources/js/views/Sharing.vue | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/Http/Resources/Models/AccessPermissionResource.php b/app/Http/Resources/Models/AccessPermissionResource.php index 105135c0a8e..0b890f0b983 100644 --- a/app/Http/Resources/Models/AccessPermissionResource.php +++ b/app/Http/Resources/Models/AccessPermissionResource.php @@ -14,6 +14,7 @@ public function __construct( public ?int $user_id = null, public ?string $username = null, public ?string $album_title = null, + public ?string $album_id = null, public bool $grants_full_photo_access = false, public bool $grants_download = false, public bool $grants_upload = false, @@ -29,6 +30,7 @@ public static function fromModel(AccessPermission $accessPermission): AccessPerm user_id: $accessPermission->user_id, username: $accessPermission->user->name, album_title: $accessPermission->album->title, + album_id: $accessPermission->base_album_id, grants_full_photo_access: $accessPermission->grants_full_photo_access, grants_download: $accessPermission->grants_download, grants_upload: $accessPermission->grants_upload, diff --git a/resources/js/components/forms/album/AlbumProperties.vue b/resources/js/components/forms/album/AlbumProperties.vue index bc946c90b03..daf2ad4f4ca 100644 --- a/resources/js/components/forms/album/AlbumProperties.vue +++ b/resources/js/components/forms/album/AlbumProperties.vue @@ -320,7 +320,7 @@ function load(editable: App.Http.Resources.Editable.EditableBaseAlbumResource, p photoSortingOrder.value = SelectBuilders.buildSortingOrder(editable.photo_sorting?.order); albumSortingColumn.value = SelectBuilders.buildAlbumSorting(editable.album_sorting?.column); albumSortingOrder.value = SelectBuilders.buildSortingOrder(editable.album_sorting?.order); - photoLayout.value = SelectBuilders.buildPhotoLayout(editable.photo_layout); + photoLayout.value = SelectBuilders.buildPhotoLayout(editable.photo_layout ?? undefined); license.value = SelectBuilders.buildLicense(editable.license); aspectRatio.value = SelectBuilders.buildAspectRatio(editable.aspect_ratio); header_id.value = buildHeaderId(editable.header_id, photos); diff --git a/resources/js/components/forms/sharing/ShareLine.vue b/resources/js/components/forms/sharing/ShareLine.vue index 08f1a2924c7..cb5bc0851f6 100644 --- a/resources/js/components/forms/sharing/ShareLine.vue +++ b/resources/js/components/forms/sharing/ShareLine.vue @@ -1,7 +1,11 @@