mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
feat(web): add comment trigger and improve panel empty state
This commit is contained in:
parent
d719370dc2
commit
8de448a8ce
4 changed files with 164 additions and 4 deletions
|
|
@ -42,10 +42,11 @@ export function CommentPanel({
|
|||
}
|
||||
|
||||
const hasThreads = threads.length > 0;
|
||||
const showEmptyState = !hasThreads && !isComposerOpen;
|
||||
|
||||
return (
|
||||
<div className="flex w-96 flex-col rounded-lg border bg-card">
|
||||
{hasThreads ? (
|
||||
{hasThreads && (
|
||||
<div
|
||||
className="overflow-y-auto"
|
||||
style={{ maxHeight }}
|
||||
|
|
@ -65,7 +66,9 @@ export function CommentPanel({
|
|||
))}
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
)}
|
||||
|
||||
{showEmptyState && (
|
||||
<div className="flex min-h-[120px] flex-col items-center justify-center gap-2 p-4 text-center">
|
||||
<MessageSquarePlus className="size-8 text-muted-foreground/50" />
|
||||
<p className="text-sm text-muted-foreground">No comments yet</p>
|
||||
|
|
@ -75,7 +78,7 @@ export function CommentPanel({
|
|||
</div>
|
||||
)}
|
||||
|
||||
<div className="border-t p-3">
|
||||
<div className={showEmptyState ? "border-t p-3" : "p-3"}>
|
||||
{isComposerOpen ? (
|
||||
<CommentComposer
|
||||
members={members}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue