Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add link to album from sharing page #2625

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/Http/Resources/Models/AccessPermissionResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/forms/album/AlbumProperties.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion resources/js/components/forms/sharing/ShareLine.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<div class="flex">
<div class="w-5/12 flex items-center text-muted-color">
<span v-if="props.withAlbum" class="w-full">{{ props.perm.album_title }}</span>
<span v-if="props.withAlbum" class="w-full">
<router-link :to="{ name: 'album', params: { albumid: props.perm.album_id } }">{{ props.perm.album_title }}</router-link>
</span>
<span class="w-full">{{ props.perm.username }}</span>
</div>
<div class="w-1/2 flex items-center justify-around">
Expand Down
3 changes: 2 additions & 1 deletion resources/js/lychee.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ declare namespace App.Http.Resources.Editable {
photo_sorting: App.DTO.PhotoSortingCriterion | null;
album_sorting: App.DTO.AlbumSortingCriterion | null;
aspect_ratio: App.Enum.AspectRatioType | null;
photo_layout: any | null;
photo_layout: App.Enum.PhotoLayoutType | null;
header_id: string | null;
cover_id: string | null;
tags: Array<string>;
Expand Down Expand Up @@ -270,6 +270,7 @@ declare namespace App.Http.Resources.Models {
user_id: number | null;
username: string | null;
album_title: string | null;
album_id: string | null;
grants_full_photo_access: boolean;
grants_download: boolean;
grants_upload: boolean;
Expand Down
2 changes: 1 addition & 1 deletion resources/js/views/Sharing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="flex flex-col text-muted-color-emphasis">
<div class="flex items-center">
<div class="w-5/12 flex items-center">
<span class="w-full">{{ $t("lychee.ALBUM_TITLE") }}</span>
<span class="w-full">{{ "Album Title" }}</span>
<span class="w-full">{{ $t("lychee.USERNAME") }}</span>
</div>
<div class="w-1/2 flex items-center justify-around">
Expand Down