Skip to content

High performance self-hosted photo and video management solution.

chore(mobile,web): use originalFilename (#7692)

Alexcd058fdafa60
diff --git a/mobile/lib/shared/models/asset.dart b/mobile/lib/shared/models/asset.dart
index 3c3c4df82f..ea49d0202d 100644
--- a/mobile/lib/shared/models/asset.dart
+++ b/mobile/lib/shared/models/asset.dart
@@ -22,7 +22,7 @@ class Asset {
updatedAt = remote.updatedAt,
durationInSeconds = remote.duration.toDuration()?.inSeconds ?? 0,
type = remote.type.toAssetType(),
- fileName = p.basename(remote.originalPath),
+ fileName = remote.originalFileName,
height = remote.exifInfo?.exifImageHeight?.toInt(),
width = remote.exifInfo?.exifImageWidth?.toInt(),
livePhotoVideoId = remote.livePhotoVideoId,
diff --git a/web/src/lib/components/asset-viewer/detail-panel.svelte b/web/src/lib/components/asset-viewer/detail-panel.svelte
index 47dc9d3e9d..aa6905a4d6 100644
--- a/web/src/lib/components/asset-viewer/detail-panel.svelte
+++ b/web/src/lib/components/asset-viewer/detail-panel.svelte
@@ -8,7 +8,7 @@
import { user } from '$lib/stores/user.store';
import { websocketEvents } from '$lib/stores/websocket';
import { getAssetThumbnailUrl, getPeopleThumbnailUrl, isSharedLink, handlePromiseError } from '$lib/utils';
- import { delay, getAssetFilename } from '$lib/utils/asset-utils';
+ import { delay } from '$lib/utils/asset-utils';
import { autoGrowHeight } from '$lib/utils/autogrow';
import { clickOutside } from '$lib/utils/click-outside';
import {
@@ -459,13 +459,11 @@
<div>
<p class="break-all flex place-items-center gap-2">
+ {asset.originalFileName}
{#if isOwner}
- {asset.originalFileName}
- <button title="Show File Location" on:click={toggleAssetPath}>
+ <button title="Show File Location" on:click={toggleAssetPath} class="-translate-y-[2px]">
<Icon path={mdiInformationOutline} />
</button>
- {:else}
- {getAssetFilename(asset)}
{/if}
</p>
<div class="flex gap-2 text-sm">
@@ -650,7 +648,7 @@
{/if}
{#if currentAlbum && currentAlbum.sharedUsers.length > 0 && asset.owner}
- <section class="px-6 dark:text-immich-dark-fg">
+ <section class="px-6 dark:text-immich-dark-fg mt-4">
<p class="text-sm">SHARED BY</p>
<div class="flex gap-4 pt-4">
<div>