feat: add option to display expiry date

This commit is contained in:
lukasganster
2026-07-07 17:16:44 +02:00
parent 02791c9817
commit 056615f9da
4 changed files with 29 additions and 1 deletions
+6
View File
@@ -13,6 +13,9 @@ export interface GalleryProps {
path: string
showDownload: boolean
showTitle: boolean
// Formatted "available until" date shown in the subtitle, or undefined when
// ipp.gallery.showExpiryDate is off or the share never expires.
expiryDate?: string
openItem?: number
ogImageItem?: GalleryItem
lightboxConfig: LightboxConfig
@@ -71,6 +74,9 @@ export function Gallery (props: GalleryProps) {
<p class="subtitle">
{props.items.length}{' '}
{props.items.length === 1 ? 'item' : 'items'}
{props.expiryDate && (
<>{' · available until '}{props.expiryDate}</>
)}
</p>
</div>
)}