Skip to content

Commit

Permalink
chore(mobile,web): use originalFilename (immich-app#7692)
Browse files Browse the repository at this point in the history
* chore(mobile,web): use originalFilename

* web

* remove unused code
  • Loading branch information
alextran1502 authored Mar 7, 2024
1 parent 1eea547 commit cd058fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mobile/lib/shared/models/asset.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 4 additions & 6 deletions web/src/lib/components/asset-viewer/detail-panel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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">
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit cd058fd

Please sign in to comment.