Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
23 changes: 17 additions & 6 deletions immichFrame.Web/src/lib/components/elements/asset-info.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
showImageDesc: boolean;
showPeopleDesc: boolean;
showAlbumName: boolean;
split: boolean;
}

let {
Expand All @@ -23,7 +24,8 @@
showPhotoDate,
showImageDesc,
showPeopleDesc,
showAlbumName
showAlbumName,
split,
}: Props = $props();

function formatLocation(format: string, city?: string, state?: string, country?: string) {
Expand Down Expand Up @@ -76,31 +78,31 @@
{#if showPhotoDate && formattedDate}
<p id="photodate" class="info-item">
<Icon path={mdiCalendar} class="info-icon" />
{formattedDate}
<span class="info-text" class:short-text={split}>{formattedDate}</span>
</p>
{/if}
{#if showImageDesc && desc}
<p id="imagedescription" class="info-item">
<Icon path={mdiText} class="info-icon" />
{desc}
<span class="info-text" class:short-text={split}>{desc}</span>
</p>
{/if}
{#if showAlbumName && albums && albums.length > 0}
<p id="imagealbums" class="info-item">
<Icon path={mdiImageAlbum} />
{albums.map((x) => x.albumName).join(', ')}
<span class="info-text" class:short-text={split}>{albums.map((x) => x.albumName).join(', ')}</span>
</p>
{/if}
{#if showPeopleDesc && availablePeople && availablePeople.length > 0}
<p id="peopledescription" class="info-item">
<Icon path={mdiAccount} />
{availablePeople.map((x) => x.name).join(', ')}
<span class="info-text" class:short-text={split}>{availablePeople.map((x) => x.name).join(', ')}</span>
</p>
{/if}
{#if showLocation && location}
<p id="imagelocation" class="info-item">
<Icon path={mdiMapMarker} />
{location}
<span class="info-text" class:short-text={split}>{location}</span>
</p>
{/if}
</div>
Expand All @@ -113,4 +115,13 @@
gap: 0.5rem;
margin: 0.2rem 0.5rem;
}
.info-text {
max-width: 40vw;
overflow: hidden;
text-wrap: nowrap;
text-overflow: ellipsis;
}
.short-text {
max-width: 22vw;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
{imageFill}
{imageZoom}
{imagePan}
{split}
bind:showInfo
/>
</div>
Expand All @@ -107,6 +108,7 @@
{imageFill}
{imageZoom}
{imagePan}
{split}
bind:showInfo
/>
</div>
Expand All @@ -124,6 +126,7 @@
{imageFill}
{imageZoom}
{imagePan}
{split}
bind:showInfo
/>
</div>
Expand Down
3 changes: 3 additions & 0 deletions immichFrame.Web/src/lib/components/elements/image.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
imageZoom: boolean;
imagePan: boolean;
interval: number;
split: boolean
showInfo: boolean;
}

Expand All @@ -34,6 +35,7 @@
imageZoom,
imagePan,
interval,
split,
showInfo = $bindable(false)
}: Props = $props();

Expand Down Expand Up @@ -179,6 +181,7 @@
{showImageDesc}
{showPeopleDesc}
{showAlbumName}
{split}
/>
<img
class="absolute flex w-full h-full z-[-1]"
Expand Down
Loading