Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 34 additions & 34 deletions packages/ui/components/CommentPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -322,17 +322,14 @@ export const CommentPopover: React.FC<CommentPopoverProps> = ({

{/* Footer */}
<div className="flex items-center justify-between px-4 py-3 border-t border-border/50">
<div className="flex items-center gap-2">
{allowImages && (
<AttachmentsButton
images={images}
onAdd={(img) => setImages((prev) => [...prev, img])}
onRemove={(path) => setImages((prev) => prev.filter((i) => i.path !== path))}
variant="inline"
/>
)}
</div>
<div className="flex items-center gap-3">
<button
onClick={handleSubmit}
disabled={!canSubmit}
className="px-3 py-1.5 text-xs font-medium rounded-md bg-primary text-primary-foreground hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed transition-opacity"
>
{isGlobal ? 'Add' : 'Save'}
</button>
{onAskAI && (
<button
onClick={handleAskAI}
Expand All @@ -345,13 +342,16 @@ export const CommentPopover: React.FC<CommentPopoverProps> = ({
</button>
)}
<span className="text-[10px] text-muted-foreground">{submitHint}</span>
<button
onClick={handleSubmit}
disabled={!canSubmit}
className="px-3 py-1.5 text-xs font-medium rounded-md bg-primary text-primary-foreground hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed transition-opacity"
>
{isGlobal ? 'Add' : 'Save'}
</button>
</div>
<div className="flex items-center gap-2">
{allowImages && (
<AttachmentsButton
images={images}
onAdd={(img) => setImages((prev) => [...prev, img])}
onRemove={(path) => setImages((prev) => prev.filter((i) => i.path !== path))}
variant="inline"
/>
)}
</div>
</div>
</div>
Expand Down Expand Up @@ -444,17 +444,14 @@ export const CommentPopover: React.FC<CommentPopoverProps> = ({

{/* Footer */}
<div className="flex items-center justify-between px-3 py-2 border-t border-border/50">
<div className="flex items-center gap-2">
{allowImages && (
<AttachmentsButton
images={images}
onAdd={(img) => setImages((prev) => [...prev, img])}
onRemove={(path) => setImages((prev) => prev.filter((i) => i.path !== path))}
variant="inline"
/>
)}
</div>
<div className="flex items-center gap-3">
<button
onClick={handleSubmit}
disabled={!canSubmit}
className="px-3 py-1.5 text-xs font-medium rounded-md bg-primary text-primary-foreground hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed transition-opacity"
>
{isGlobal ? 'Add' : 'Save'}
</button>
{onAskAI && (
<button
onClick={handleAskAI}
Expand All @@ -467,13 +464,16 @@ export const CommentPopover: React.FC<CommentPopoverProps> = ({
</button>
)}
<span className="text-[10px] text-muted-foreground">{submitHint}</span>
<button
onClick={handleSubmit}
disabled={!canSubmit}
className="px-3 py-1.5 text-xs font-medium rounded-md bg-primary text-primary-foreground hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed transition-opacity"
>
{isGlobal ? 'Add' : 'Save'}
</button>
</div>
<div className="flex items-center gap-2">
{allowImages && (
<AttachmentsButton
images={images}
onAdd={(img) => setImages((prev) => [...prev, img])}
onRemove={(path) => setImages((prev) => prev.filter((i) => i.path !== path))}
variant="inline"
/>
)}
</div>
</div>
</div>
Expand Down