wip: convert more components to new ui
This commit is contained in:
@@ -27,9 +27,9 @@ export function ImagePreview({ urls, truncate }: { urls: string[]; truncate?: bo
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => downloadImage(url)}
|
||||
className="absolute right-3 top-3 hidden h-7 w-7 items-center justify-center rounded-md bg-black/70 backdrop-blur-md hover:bg-fuchsia-500 group-hover:inline-flex"
|
||||
className="absolute right-2 top-2 hidden h-8 w-8 items-center justify-center rounded-md bg-black/50 backdrop-blur-md hover:bg-black/40 group-hover:inline-flex"
|
||||
>
|
||||
<DownloadIcon className="h-4 w-4 text-zinc-100" />
|
||||
<DownloadIcon className="h-5 w-5 text-white" />
|
||||
</button>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -26,17 +26,17 @@ export function NoteReplyForm({ id, pubkey }: { id: string; pubkey: string }) {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex flex-col rounded-xl border-t border-zinc-800/50 bg-zinc-900">
|
||||
<div className="mt-3 flex flex-col rounded-xl bg-white/10">
|
||||
<div className="relative w-full flex-1 overflow-hidden">
|
||||
<textarea
|
||||
value={value}
|
||||
onChange={(e) => setValue(e.target.value)}
|
||||
placeholder="Reply to this thread..."
|
||||
className=" relative h-24 w-full resize-none rounded-md bg-transparent px-3 py-3 text-base !outline-none placeholder:text-zinc-400 dark:text-zinc-100 dark:placeholder:text-zinc-500"
|
||||
className=" relative h-24 w-full resize-none rounded-md bg-transparent px-3 py-3 text-base text-white !outline-none placeholder:text-white/50"
|
||||
spellCheck={false}
|
||||
/>
|
||||
</div>
|
||||
<div className="w-full border-t border-zinc-800 px-3 py-3">
|
||||
<div className="w-full border-t border-white/10 px-3 py-3">
|
||||
{status === 'loading' ? (
|
||||
<div>
|
||||
<p>Loading...</p>
|
||||
@@ -53,8 +53,8 @@ export function NoteReplyForm({ id, pubkey }: { id: string; pubkey: string }) {
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<p className="mb-1 text-sm leading-none text-zinc-400">Reply as</p>
|
||||
<p className="text-sm font-medium leading-none text-zinc-100">
|
||||
<p className="mb-1 text-sm leading-none text-white/50">Reply as</p>
|
||||
<p className="text-sm font-medium leading-none text-white">
|
||||
{user?.nip05 || user?.name || displayNpub(pubkey, 16)}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@ export function Reply({ event, root }: { event: LumeEvent; root?: string }) {
|
||||
|
||||
return (
|
||||
<div className="h-min w-full py-1.5">
|
||||
<div className="relative overflow-hidden rounded-xl border-t border-zinc-800/50 bg-zinc-900 px-3 pt-3">
|
||||
<div className="relative overflow-hidden rounded-xl bg-white/10 px-3 pt-3">
|
||||
<div className="relative flex flex-col">
|
||||
<User pubkey={event.pubkey} time={event.created_at} />
|
||||
<div className="relative z-20 -mt-6 flex items-start gap-3">
|
||||
|
||||
@@ -54,14 +54,12 @@ export function RepliesList({ id }: { id: string }) {
|
||||
return (
|
||||
<div className="mt-3">
|
||||
<div className="mb-2">
|
||||
<h5 className="text-lg font-semibold text-zinc-300">
|
||||
{data?.length || 0} replies
|
||||
</h5>
|
||||
<h5 className="text-lg font-semibold text-white">{data?.length || 0} replies</h5>
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
{data?.length === 0 ? (
|
||||
<div className="px=3">
|
||||
<div className="flex w-full items-center justify-center rounded-xl bg-zinc-900">
|
||||
<div className="flex w-full items-center justify-center rounded-xl bg-white/10">
|
||||
<div className="flex flex-col items-center justify-center gap-2 py-6">
|
||||
<h3 className="text-3xl">👋</h3>
|
||||
<p className="leading-none text-zinc-400">Share your thought on it...</p>
|
||||
|
||||
@@ -61,22 +61,22 @@ export function NoteStats({ id }: { id: string }) {
|
||||
|
||||
return (
|
||||
<div className="flex h-11 items-center gap-3">
|
||||
<p className="text-zinc-500">
|
||||
<span className="font-semibold text-zinc-300">
|
||||
<p className="text-white/50">
|
||||
<span className="font-semibold text-white">
|
||||
{compactNumber.format(data.reactions)}
|
||||
</span>{' '}
|
||||
reactions
|
||||
</p>
|
||||
<span className="text-zinc-500">·</span>
|
||||
<p className="text-zinc-500">
|
||||
<span className="font-semibold text-zinc-300">
|
||||
<span className="text-white/50">·</span>
|
||||
<p className="text-white/50">
|
||||
<span className="font-semibold text-white">
|
||||
{compactNumber.format(data.reposts)}
|
||||
</span>{' '}
|
||||
reposts
|
||||
</p>
|
||||
<span className="text-zinc-500">·</span>
|
||||
<p className="text-zinc-500">
|
||||
<span className="font-semibold text-zinc-300">
|
||||
<span className="text-white/50">·</span>
|
||||
<p className="text-white/50">
|
||||
<span className="font-semibold text-white">
|
||||
{compactNumber.format(data.zaps)}
|
||||
</span>{' '}
|
||||
zaps
|
||||
|
||||
@@ -25,20 +25,20 @@ export function ThreadUser({ pubkey, time }: { pubkey: string; time: number }) {
|
||||
/>
|
||||
<div className="lex flex-1 items-baseline justify-between">
|
||||
<div className="inline-flex w-full items-center justify-between">
|
||||
<h5 className="max-w-[15rem] truncate font-semibold leading-none text-zinc-100">
|
||||
<h5 className="max-w-[15rem] truncate font-semibold leading-none text-white">
|
||||
{user?.nip05?.toLowerCase() || user?.name || user?.display_name}
|
||||
</h5>
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex h-5 w-max items-center justify-center rounded px-1 hover:bg-zinc-800"
|
||||
className="inline-flex h-5 w-max items-center justify-center rounded px-1 hover:bg-white/10"
|
||||
>
|
||||
<VerticalDotsIcon className="h-4 w-4 rotate-90 transform text-zinc-200" />
|
||||
<VerticalDotsIcon className="h-4 w-4 rotate-90 transform text-white/50" />
|
||||
</button>
|
||||
</div>
|
||||
<div className="mt-1 inline-flex items-center gap-2">
|
||||
<span className="leading-none text-zinc-500">{createdAt}</span>
|
||||
<span className="leading-none text-zinc-500">·</span>
|
||||
<span className="leading-none text-zinc-500">{displayNpub(pubkey, 16)}</span>
|
||||
<span className="leading-none text-white/50">{createdAt}</span>
|
||||
<span className="leading-none text-white/50">·</span>
|
||||
<span className="leading-none text-white/50">{displayNpub(pubkey, 16)}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user