- cleanup albumUsers creation
- use font-light for the user's name
This commit is contained in:
@@ -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}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user