отображение карточек более красивое

This commit is contained in:
2025-07-28 14:06:27 +03:00
parent fed745b0e3
commit bffa0a01f3
7 changed files with 262 additions and 466 deletions

View File

@@ -15,14 +15,12 @@ import {
DialogTrigger,
} from '@/component/ui/dialog'
import { Input } from '@/component/ui/input'
import { Label } from '@/component/ui/label'
import { Separator } from '@/component/ui/separator'
import {
SidebarInset,
SidebarProvider,
SidebarTrigger,
} from '@/component/ui/sidebar'
import { Textarea } from '@/component/ui/textarea'
import {
apiTemplateWithAttributesToTemplate,
getTemplateWithAttributesApi,
@@ -36,9 +34,7 @@ import {
CheckSquare,
Copy,
Edit3,
FileText,
Plus,
Settings2,
Square,
Tag,
Trash2,
@@ -162,16 +158,12 @@ const TemplateForm: React.FC<TemplateFormProps> = ({
<Card>
<CardHeader className="pb-3">
<div className="flex items-center gap-2">
<Settings2 className={`h-4 w-4 ${iconColor}`} />
<CardTitle className="text-sm">Основная информация</CardTitle>
<Type className={`h-4 w-4 ${iconColor}`} />
<CardTitle className="text-sm">{nameLabel}</CardTitle>
</div>
</CardHeader>
<CardContent className="space-y-4">
<div className="space-y-2">
<Label className="flex items-center gap-2 text-sm font-medium">
<Type className="h-3 w-3" />
{nameLabel}
</Label>
<Input
placeholder={`Введите ${nameLabel.toLowerCase()}`}
value={name}
@@ -179,19 +171,6 @@ const TemplateForm: React.FC<TemplateFormProps> = ({
className="h-9"
/>
</div>
<div className="space-y-2">
<Label className="flex items-center gap-2 text-sm font-medium">
<FileText className="h-3 w-3" />
{descriptionLabel}
</Label>
<Textarea
placeholder={`${descriptionLabel}...`}
value={templateDescription}
onChange={e => onDescriptionChange(e.target.value)}
className="min-h-[80px] resize-none"
/>
</div>
</CardContent>
</Card>
@@ -665,7 +644,7 @@ export const TemplatesOverviewPage = () => {
<section
className={clsx(
'grid gap-4',
'grid-cols-1 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5'
'grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6'
)}
>
{filteredTemplates.map(t => (