|
@@ -6,10 +6,18 @@
|
|
|
import { AlbumResponseDto, AssetResponseDto, ThumbnailFormat, api } from '@api';
|
|
|
import { DateTime } from 'luxon';
|
|
|
import { createEventDispatcher } from 'svelte';
|
|
|
+ import { slide } from 'svelte/transition';
|
|
|
import { asByteUnitString } from '../../utils/byte-units';
|
|
|
import ImageThumbnail from '../assets/thumbnail/image-thumbnail.svelte';
|
|
|
import UserAvatar from '../shared-components/user-avatar.svelte';
|
|
|
- import { mdiCalendar, mdiCameraIris, mdiClose, mdiImageOutline, mdiMapMarkerOutline } from '@mdi/js';
|
|
|
+ import {
|
|
|
+ mdiCalendar,
|
|
|
+ mdiCameraIris,
|
|
|
+ mdiClose,
|
|
|
+ mdiImageOutline,
|
|
|
+ mdiMapMarkerOutline,
|
|
|
+ mdiInformationOutline,
|
|
|
+ } from '@mdi/js';
|
|
|
import Icon from '$lib/components/elements/icon.svelte';
|
|
|
import Map from '../shared-components/map/map.svelte';
|
|
|
|
|
@@ -77,6 +85,9 @@
|
|
|
console.error(error);
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ let showAssetPath = false;
|
|
|
+ const toggleAssetPath = () => (showAssetPath = !showAssetPath);
|
|
|
</script>
|
|
|
|
|
|
<section class="p-2 dark:bg-immich-dark-bg dark:text-immich-dark-fg">
|
|
@@ -215,8 +226,15 @@
|
|
|
<div><Icon path={mdiImageOutline} size="24" /></div>
|
|
|
|
|
|
<div>
|
|
|
- <p class="break-all">
|
|
|
- {getAssetFilename(asset)}
|
|
|
+ <p class="break-all flex place-items-center gap-2">
|
|
|
+ {#if isOwner}
|
|
|
+ {asset.originalFileName}
|
|
|
+ <button title="Show File Location" on:click={toggleAssetPath}>
|
|
|
+ <Icon path={mdiInformationOutline} />
|
|
|
+ </button>
|
|
|
+ {:else}
|
|
|
+ {getAssetFilename(asset)}
|
|
|
+ {/if}
|
|
|
</p>
|
|
|
<div class="flex gap-2 text-sm">
|
|
|
{#if asset.exifInfo.exifImageHeight && asset.exifInfo.exifImageWidth}
|
|
@@ -230,6 +248,11 @@
|
|
|
{/if}
|
|
|
<p>{asByteUnitString(asset.exifInfo.fileSizeInByte, $locale)}</p>
|
|
|
</div>
|
|
|
+ {#if showAssetPath}
|
|
|
+ <p class="text-xs opacity-50 break-all" transition:slide={{ duration: 250 }}>
|
|
|
+ {asset.originalPath}
|
|
|
+ </p>
|
|
|
+ {/if}
|
|
|
</div>
|
|
|
</div>
|
|
|
{/if}
|