- cleanup albumUsers creation

- use font-light for the user's name
This commit is contained in:
CJPeckover
2025-08-23 01:09:51 -04:00
parent a02635f9a5
commit 251e644b2a
2 changed files with 3 additions and 7 deletions

View File

@@ -273,7 +273,7 @@
{#if !!assetOwner}
<div class="absolute bottom-0 end-1">
<span class="text-white">{assetOwner.name}</span>
<span class="text-white font-light">{assetOwner.name}</span>
</div>
{/if}

View File

@@ -31,6 +31,7 @@
import { navigate } from '$lib/utils/navigation';
import { getTimes, toTimelineAsset, type ScrubberListener, type TimelineYearMonth } from '$lib/utils/timeline-util';
import {
AlbumUserRole,
AssetVisibility,
getAssetInfo,
type AlbumResponseDto,
@@ -94,13 +95,8 @@
let { isViewing: showAssetViewer, asset: viewingAsset, preloadAssets, gridScrollTarget, mutex } = assetViewingStore;
const isUser = (user: UserResponseDto | undefined): user is UserResponseDto => {
return !!user;
};
const albumUsers = $derived(
album?.shared && album?.albumUsers.length
? [album?.owner, ...(album?.albumUsers?.map(({ user }) => user) ?? [])].filter((element) => isUser(element))
: [],
album?.shared && album?.albumUsers.filter(({ role }) => role === AlbumUserRole.Editor).length > 0 ? [album.owner, ...album.albumUsers.map(({ user }) => user)] : [],
);
let element: HTMLElement | undefined = $state();