Web player general changes #22

Merged
NotS1mp merged 27 commits from web-player-general-changes into master 2026-09-23 22:37:30 +00:00
3 changed files with 8 additions and 16 deletions
Showing only changes of commit 0f28e19c1d - Show all commits
@@ -1,28 +1,20 @@
<script lang="ts"> <script lang="ts">
import ListRow from './ListRow.svelte'; import ListRow from './ListRow.svelte';
import Avatar from './Avatar.svelte'; import Avatar from './Avatar.svelte';
import FollowButton from './FollowButton.svelte';
interface Props { interface Props {
user: { user: {
id: string; id: string;
name: string; name: string;
profilePictureUrl: string | null; profilePictureUrl: string | null;
isFollowedByViewer: boolean;
}; };
canFollow?: boolean;
} }
let { user, canFollow = false }: Props = $props(); let { user }: Props = $props();
</script> </script>
<div class="flex items-center gap-3"> <ListRow title={user.name} href="/user/{user.id}" size="lg" class="min-w-0 flex-1">
<ListRow title={user.name} href="/user/{user.id}" size="lg" class="min-w-0 flex-1">
{#snippet art()} {#snippet art()}
<Avatar name={user.name} src={user.profilePictureUrl} size="md" /> <Avatar name={user.name} src={user.profilePictureUrl} size="md" />
{/snippet} {/snippet}
</ListRow> </ListRow>
{#if canFollow}
<FollowButton following={user.isFollowedByViewer} userId={user.id} class="shrink-0" />
{/if}
</div>
@@ -403,7 +403,7 @@
<ul class="flex flex-col gap-1"> <ul class="flex flex-col gap-1">
{#each capped(sfilter, users) as u (u.id)} {#each capped(sfilter, users) as u (u.id)}
<li> <li>
<UserRow user={u} canFollow={data.viewerId !== null && data.viewerId !== u.id} /> <UserRow user={u} />
</li> </li>
{/each} {/each}
</ul> </ul>
@@ -84,7 +84,7 @@
<ul class="flex flex-col gap-1"> <ul class="flex flex-col gap-1">
{#each items as user (user.id)} {#each items as user (user.id)}
<li> <li>
<UserRow {user} canFollow={data.viewerId !== null && data.viewerId !== user.id} /> <UserRow {user} />
</li> </li>
{/each} {/each}
</ul> </ul>