Remove score column, react and zaps buttons
This commit is contained in:
parent
f41868fdf1
commit
05dd79f283
6 changed files with 22 additions and 65 deletions
|
|
@ -245,16 +245,6 @@
|
|||
{#if openMenuId === msg.id}
|
||||
<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"
|
||||
>
|
||||
<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
|
||||
onclick={(e) => {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -16,7 +16,6 @@
|
|||
repliers: Author[];
|
||||
lastActiveAuthor: Author;
|
||||
lastActivity: string;
|
||||
score: number;
|
||||
};
|
||||
|
||||
type Props = { thread: ThreadRow };
|
||||
|
|
@ -71,18 +70,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Col 3: replies | score | activity -->
|
||||
<!-- Col 3: replies | activity -->
|
||||
<div class="flex shrink-0 items-center gap-6">
|
||||
<div class="flex flex-col items-center gap-0.5">
|
||||
<span class="text-neutral-800">{thread.replyCount}</span>
|
||||
<span class="text-sm text-neutral-400">replies</span>
|
||||
</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 items-center gap-1">
|
||||
{@render avatar(
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@
|
|||
repliers: t.replierPubkeys.map((pk) => resolveAuthor(pk, profiles)),
|
||||
lastActiveAuthor: resolveAuthor(t.latestPubkey, profiles),
|
||||
lastActivity: relativeTime(t.latestAt),
|
||||
score: 0,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
.slice(0, 4),
|
||||
lastActiveAuthor: t.participants[t.participants.length - 1],
|
||||
lastActivity: t.lastActivity,
|
||||
score: t.op.reactions.reduce((s, r) => s + r.count, 0) + t.op.zaps,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
import { auth, openLogin } from "$lib/auth.svelte";
|
||||
import { withJoin } from "$lib/join.svelte";
|
||||
import { RELAY_URL } from "$lib/config";
|
||||
import Reactions from "$lib/components/Reactions.svelte";
|
||||
import ThreadScrubber from "$lib/components/ThreadScrubber.svelte";
|
||||
import MessageEditor from "$lib/components/MessageEditor.svelte";
|
||||
import PostContent from "$lib/components/PostContent.svelte";
|
||||
|
|
@ -224,8 +223,8 @@
|
|||
{@render avatar(author)}
|
||||
</div>
|
||||
<div class="flex-1 min-w-0">
|
||||
<div class="flex items-baseline justify-between mb-2">
|
||||
<span class="font-medium text-neutral-600">{author.name}</span>
|
||||
<div class="flex items-baseline justify-between mb-3">
|
||||
<span class="font-medium text-neutral-400">{author.name}</span>
|
||||
<span class="text-sm text-neutral-400 ml-4 flex-shrink-0"
|
||||
>{formatDate(p.createdAt)}</span
|
||||
>
|
||||
|
|
@ -233,20 +232,27 @@
|
|||
<div data-quote-post-index={index} id="post-{p.id}" class="scroll-mt-32">
|
||||
<PostContent content={p.content} {profiles} {threadEventAuthors} />
|
||||
</div>
|
||||
<div class="flex items-center justify-between mt-3">
|
||||
<Reactions reactions={[]} zaps={0} />
|
||||
<div
|
||||
class="flex items-center gap-4 text-sm text-neutral-400 flex-shrink-0"
|
||||
>
|
||||
<div class="flex items-center justify-start mt-6">
|
||||
<button
|
||||
onclick={() => quotePost(p)}
|
||||
disabled={!auth.user}
|
||||
class="cursor-pointer hover:text-brand transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
>Quote</button
|
||||
class="flex items-center gap-1.5 text-neutral-300 cursor-pointer hover:text-brand transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
>
|
||||
<button class="hover:text-brand transition-colors">React</button>
|
||||
<button class="hover:text-amber-500 transition-colors">⚡ Zap</button>
|
||||
</div>
|
||||
<span>Quote post</span>
|
||||
<svg
|
||||
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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue