mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 01:06:23 +02:00
fix(web): improve comment thread layout
This commit is contained in:
parent
66275f1b53
commit
d719370dc2
2 changed files with 15 additions and 20 deletions
|
|
@ -32,7 +32,7 @@ export function CommentPanel({
|
|||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="flex min-h-[120px] w-80 items-center justify-center rounded-lg border bg-card p-4">
|
||||
<div className="flex min-h-[120px] w-96 items-center justify-center rounded-lg border bg-card p-4">
|
||||
<div className="flex items-center gap-2 text-sm text-muted-foreground">
|
||||
<div className="size-4 animate-spin rounded-full border-2 border-current border-t-transparent" />
|
||||
Loading comments...
|
||||
|
|
@ -44,7 +44,7 @@ export function CommentPanel({
|
|||
const hasThreads = threads.length > 0;
|
||||
|
||||
return (
|
||||
<div className="flex w-80 flex-col rounded-lg border bg-card">
|
||||
<div className="flex w-96 flex-col rounded-lg border bg-card">
|
||||
{hasThreads ? (
|
||||
<div
|
||||
className="overflow-y-auto"
|
||||
|
|
|
|||
|
|
@ -53,17 +53,8 @@ export function CommentThread({
|
|||
onDelete={onDeleteComment}
|
||||
/>
|
||||
|
||||
<div className="ml-11 flex items-center gap-2">
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="h-7 px-3 text-xs"
|
||||
onClick={handleReply}
|
||||
>
|
||||
<MessageSquare className="mr-1.5 size-3" />
|
||||
Reply
|
||||
</Button>
|
||||
{thread.replies.length > 1 && (
|
||||
{thread.replies.length > 1 && (
|
||||
<div className="ml-11">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
|
|
@ -77,8 +68,8 @@ export function CommentThread({
|
|||
)}
|
||||
{thread.replies.length} replies
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{thread.replies.length > 0 && (thread.replies.length === 1 || isRepliesExpanded) && (
|
||||
<div className="ml-11 space-y-3">
|
||||
|
|
@ -94,8 +85,8 @@ export function CommentThread({
|
|||
</div>
|
||||
)}
|
||||
|
||||
{isReplyComposerOpen && (
|
||||
<div className="ml-11">
|
||||
<div className="ml-11">
|
||||
{isReplyComposerOpen ? (
|
||||
<CommentComposer
|
||||
members={members}
|
||||
membersLoading={membersLoading}
|
||||
|
|
@ -106,9 +97,13 @@ export function CommentThread({
|
|||
onCancel={handleReplyCancel}
|
||||
autoFocus
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
) : (
|
||||
<Button variant="outline" size="sm" className="h-7 px-3 text-xs" onClick={handleReply}>
|
||||
<MessageSquare className="mr-1.5 size-3" />
|
||||
Reply
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue