feat: redesigned Git tab layout with improved organization

This commit is contained in:
Bohdan Triapitsyn
2025-12-19 02:48:58 +02:00
parent 71574acf19
commit bbceccfb64
17 changed files with 1726 additions and 1058 deletions
@@ -0,0 +1,56 @@
import React from 'react';
import { RiArrowDownLine } from '@remixicon/react';
import { Button } from '@/components/ui/button';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
interface AIHighlightsBoxProps {
highlights: string[];
onInsert: () => void;
onClear: () => void;
}
export const AIHighlightsBox: React.FC<AIHighlightsBoxProps> = ({
highlights,
onInsert,
onClear,
}) => {
if (highlights.length === 0) {
return null;
}
const handleInsert = () => {
onInsert();
onClear();
};
return (
<div className="space-y-2 rounded-xl border border-border/60 bg-background/60 px-3 py-2">
<div className="flex items-center justify-between gap-2">
<p className="typography-micro text-muted-foreground">AI highlights</p>
<Tooltip delayDuration={1000}>
<TooltipTrigger asChild>
<Button
variant="ghost"
size="icon"
className="size-6"
onClick={handleInsert}
aria-label="Insert highlights into commit message"
>
<RiArrowDownLine className="size-4" />
</Button>
</TooltipTrigger>
<TooltipContent sideOffset={8}>
Append highlights to commit message
</TooltipContent>
</Tooltip>
</div>
<ul className="space-y-1">
{highlights.map((highlight, index) => (
<li key={index} className="typography-meta text-foreground">
{highlight}
</li>
))}
</ul>
</div>
);
};