diff --git a/web/src/lib/components/asset-viewer/detail-panel-location.svelte b/web/src/lib/components/asset-viewer/detail-panel-location.svelte new file mode 100644 index 0000000000..faff480934 --- /dev/null +++ b/web/src/lib/components/asset-viewer/detail-panel-location.svelte @@ -0,0 +1,87 @@ + + +{#if asset.exifInfo?.city} + (isOwner ? (isShowChangeLocation = true) : null)} + title={isOwner ? 'Edit location' : ''} + class:hover:dark:text-immich-dark-primary={isOwner} + class:hover:text-immich-primary={isOwner} + > + + + + + {asset.exifInfo.city} + {#if asset.exifInfo?.state} + + {asset.exifInfo.state} + + {/if} + {#if asset.exifInfo?.country} + + {asset.exifInfo.country} + + {/if} + + + + {#if isOwner} + + + + {/if} + +{:else if !asset.exifInfo?.city && isOwner} + (isShowChangeLocation = true)} + title="Add location" + > + + + + Add a location + + + + + +{/if} + +{#if isShowChangeLocation} + + handleConfirmChangeLocation(gps)} + on:cancel={() => (isShowChangeLocation = false)} + /> + +{/if} diff --git a/web/src/lib/components/asset-viewer/detail-panel.svelte b/web/src/lib/components/asset-viewer/detail-panel.svelte index 52a80e3baa..0f901d67a3 100644 --- a/web/src/lib/components/asset-viewer/detail-panel.svelte +++ b/web/src/lib/components/asset-viewer/detail-panel.svelte @@ -1,4 +1,5 @@ @@ -464,65 +451,7 @@ {/if} - {#if asset.exifInfo?.city} - (isOwner ? (isShowChangeLocation = true) : null)} - title={isOwner ? 'Edit location' : ''} - class:hover:dark:text-immich-dark-primary={isOwner} - class:hover:text-immich-primary={isOwner} - > - - - - - {asset.exifInfo.city} - {#if asset.exifInfo?.state} - - {asset.exifInfo.state} - - {/if} - {#if asset.exifInfo?.country} - - {asset.exifInfo.country} - - {/if} - - - - {#if isOwner} - - - - {/if} - - {:else if !asset.exifInfo?.city && isOwner} - (isShowChangeLocation = true)} - title="Add location" - > - - - - - - Add a location - - - - - - {/if} - {#if isShowChangeLocation} - handleConfirmChangeLocation(gps)} - on:cancel={() => (isShowChangeLocation = false)} - /> - {/if} +
{asset.exifInfo.city}
{asset.exifInfo.state}
{asset.exifInfo.country}
Add a location