Remove score column, react and zaps buttons

This commit is contained in:
dtonon 2026-05-13 15:54:17 +01:00
parent f41868fdf1
commit 05dd79f283
6 changed files with 22 additions and 65 deletions

View file

@ -245,16 +245,6 @@
{#if openMenuId === msg.id} {#if openMenuId === msg.id}
<div <div
class="absolute right-0 bottom-6 z-20 w-36 rounded-lg border border-neutral-100 bg-white py-1 shadow-lg text-sm" class="absolute right-0 bottom-6 z-20 w-36 rounded-lg border border-neutral-100 bg-white py-1 shadow-lg text-sm"
>
<button
disabled
class="w-full px-3 py-1.5 text-left text-neutral-400 cursor-not-allowed"
aria-disabled="true">React</button
>
<button
disabled
class="w-full px-3 py-1.5 text-left text-neutral-400 cursor-not-allowed"
aria-disabled="true">Zap</button
> >
<button <button
onclick={(e) => { onclick={(e) => {

View file

@ -1,31 +0,0 @@
<script lang="ts">
import type { Reaction } from "$lib/mock";
type Props = {
reactions: Reaction[];
zaps: number;
};
let { reactions, zaps }: Props = $props();
</script>
<div class="flex flex-wrap items-center gap-1.5">
{#each reactions as r}
<button
class="flex items-center gap-1 rounded-full border border-neutral-200 px-2 py-0.5 text-xs hover:bg-neutral-50"
>
<span>{r.emoji}</span>
<span class="text-neutral-600">{r.count}</span>
</button>
{/each}
{#if zaps > 0}
<button
class="flex items-center gap-1 rounded-full border border-amber-200 bg-amber-50 px-2 py-0.5 text-xs hover:bg-amber-100"
>
<span></span>
<span class="text-amber-700"
>{zaps >= 1000 ? (zaps / 1000).toFixed(1) + "k" : zaps}</span
>
</button>
{/if}
</div>

View file

@ -16,7 +16,6 @@
repliers: Author[]; repliers: Author[];
lastActiveAuthor: Author; lastActiveAuthor: Author;
lastActivity: string; lastActivity: string;
score: number;
}; };
type Props = { thread: ThreadRow }; type Props = { thread: ThreadRow };
@ -71,18 +70,13 @@
</div> </div>
</div> </div>
<!-- Col 3: replies | score | activity --> <!-- Col 3: replies | activity -->
<div class="flex shrink-0 items-center gap-6"> <div class="flex shrink-0 items-center gap-6">
<div class="flex flex-col items-center gap-0.5"> <div class="flex flex-col items-center gap-0.5">
<span class="text-neutral-800">{thread.replyCount}</span> <span class="text-neutral-800">{thread.replyCount}</span>
<span class="text-sm text-neutral-400">replies</span> <span class="text-sm text-neutral-400">replies</span>
</div> </div>
<div class="flex flex-col items-center gap-0.5">
<span class="text-accent">{thread.score}</span>
<span class="text-sm text-neutral-400">score</span>
</div>
<div class="flex flex-col items-center gap-0.5"> <div class="flex flex-col items-center gap-0.5">
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
{@render avatar( {@render avatar(

View file

@ -55,7 +55,6 @@
repliers: t.replierPubkeys.map((pk) => resolveAuthor(pk, profiles)), repliers: t.replierPubkeys.map((pk) => resolveAuthor(pk, profiles)),
lastActiveAuthor: resolveAuthor(t.latestPubkey, profiles), lastActiveAuthor: resolveAuthor(t.latestPubkey, profiles),
lastActivity: relativeTime(t.latestAt), lastActivity: relativeTime(t.latestAt),
score: 0,
}; };
} }

View file

@ -30,7 +30,6 @@
.slice(0, 4), .slice(0, 4),
lastActiveAuthor: t.participants[t.participants.length - 1], lastActiveAuthor: t.participants[t.participants.length - 1],
lastActivity: t.lastActivity, lastActivity: t.lastActivity,
score: t.op.reactions.reduce((s, r) => s + r.count, 0) + t.op.zaps,
}; };
} }

View file

@ -11,7 +11,6 @@
import { auth, openLogin } from "$lib/auth.svelte"; import { auth, openLogin } from "$lib/auth.svelte";
import { withJoin } from "$lib/join.svelte"; import { withJoin } from "$lib/join.svelte";
import { RELAY_URL } from "$lib/config"; import { RELAY_URL } from "$lib/config";
import Reactions from "$lib/components/Reactions.svelte";
import ThreadScrubber from "$lib/components/ThreadScrubber.svelte"; import ThreadScrubber from "$lib/components/ThreadScrubber.svelte";
import MessageEditor from "$lib/components/MessageEditor.svelte"; import MessageEditor from "$lib/components/MessageEditor.svelte";
import PostContent from "$lib/components/PostContent.svelte"; import PostContent from "$lib/components/PostContent.svelte";
@ -224,8 +223,8 @@
{@render avatar(author)} {@render avatar(author)}
</div> </div>
<div class="flex-1 min-w-0"> <div class="flex-1 min-w-0">
<div class="flex items-baseline justify-between mb-2"> <div class="flex items-baseline justify-between mb-3">
<span class="font-medium text-neutral-600">{author.name}</span> <span class="font-medium text-neutral-400">{author.name}</span>
<span class="text-sm text-neutral-400 ml-4 flex-shrink-0" <span class="text-sm text-neutral-400 ml-4 flex-shrink-0"
>{formatDate(p.createdAt)}</span >{formatDate(p.createdAt)}</span
> >
@ -233,20 +232,27 @@
<div data-quote-post-index={index} id="post-{p.id}" class="scroll-mt-32"> <div data-quote-post-index={index} id="post-{p.id}" class="scroll-mt-32">
<PostContent content={p.content} {profiles} {threadEventAuthors} /> <PostContent content={p.content} {profiles} {threadEventAuthors} />
</div> </div>
<div class="flex items-center justify-between mt-3"> <div class="flex items-center justify-start mt-6">
<Reactions reactions={[]} zaps={0} />
<div
class="flex items-center gap-4 text-sm text-neutral-400 flex-shrink-0"
>
<button <button
onclick={() => quotePost(p)} onclick={() => quotePost(p)}
disabled={!auth.user} disabled={!auth.user}
class="cursor-pointer hover:text-brand transition-colors disabled:opacity-50 disabled:cursor-not-allowed" class="flex items-center gap-1.5 text-neutral-300 cursor-pointer hover:text-brand transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
>Quote</button
> >
<button class="hover:text-brand transition-colors">React</button> <span>Quote post</span>
<button class="hover:text-amber-500 transition-colors">⚡ Zap</button> <svg
</div> class="w-3"
viewBox="0 0 800 800"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:space="preserve"
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;"
><path
d="M101.286,748.313l199.143,0c109.981,0 199.142,-89.161 199.142,-199.142l0,-497.856m0,-0l199.143,199.142m-199.143,-199.142l-199.142,199.142"
style="fill:none;fill-rule:nonzero;stroke:currentColor;stroke-width:99.57px;"
/></svg
>
</button>
</div> </div>
</div> </div>
</div> </div>