minor updates

This commit is contained in:
Ren Amamiya
2023-06-18 11:24:57 +07:00
parent 3cc24dc8c1
commit 7ec284d4a5
15 changed files with 174 additions and 164 deletions

View File

@@ -11,7 +11,7 @@ export function Kind1({
return (
<>
<div className="select-text whitespace-pre-line break-words text-base text-zinc-100">
{truncate ? truncateContent(content.parsed, 120) : content.parsed}
{truncate ? truncateContent(content.original, 100) : content.parsed}
</div>
{Array.isArray(content.images) && content.images.length ? (
<ImagePreview urls={content.images} />

View File

@@ -28,7 +28,7 @@ export function LinkPreview({ urls }: { urls: string[] }) {
<Image
src={data["og:image"]}
alt={urls[0]}
className="w-full h-auto object-cover rounded-t-lg"
className="w-full h-44 object-cover rounded-t-lg bg-white"
/>
)}
<div className="flex flex-col gap-2 px-3 py-3">

View File

@@ -21,7 +21,11 @@ export function User({
const avatarHeight = size === "small" ? "h-6" : "h-11";
return (
<Popover className="relative flex items-start gap-3">
<Popover
className={`relative flex gap-3 ${
size === "small" ? "items-center" : "items-start"
}`}
>
<Popover.Button
className={`${avatarWidth} ${avatarHeight} shrink-0 overflow-hidden rounded-md bg-zinc-900`}
>
@@ -32,7 +36,11 @@ export function User({
/>
</Popover.Button>
<div className="flex flex-wrap items-baseline gap-1">
<h5 className="text-zinc-200 max-w-[10rem] font-medium leading-none truncate">
<h5
className={`text-zinc-200 font-medium leading-none truncate ${
size === "small" ? "max-w-[7rem]" : "max-w-[10rem]"
}`}
>
{user?.nip05 || user?.name || shortenKey(pubkey)}
</h5>
{repost && (