refactor(web): update layout and styling in c-tabs-2 and DashboardPage
Build, Test, and Push CFDM Docker Image / test (push) Successful in 3m30s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Successful in 2m0s
Build, Test, and Push CFDM Docker Image / update-wiki (push) Successful in 6s
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped

- Changed CardContent and inner divs in c-tabs-2 to use flexbox for improved spacing and layout consistency.
- Refactored KPI card creation in DashboardPage to eliminate useMemo, simplifying the code structure and enhancing readability.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-07-17 00:59:57 +07:00
co-authored by Cursor
parent 6ceb7ff9c7
commit 600044d6b2
2 changed files with 49 additions and 61 deletions
@@ -33,8 +33,8 @@ export function Pattern() {
Update your account information. Update your account information.
</CardDescription> </CardDescription>
</CardHeader> </CardHeader>
<CardContent className="space-y-4"> <CardContent className="flex flex-col gap-4">
<div className="space-y-2"> <div className="flex flex-col gap-2">
<Label htmlFor="underline-name" className="text-sm"> <Label htmlFor="underline-name" className="text-sm">
Name Name
</Label> </Label>
@@ -44,7 +44,7 @@ export function Pattern() {
className="h-9" className="h-9"
/> />
</div> </div>
<div className="space-y-2"> <div className="flex flex-col gap-2">
<Label htmlFor="underline-email" className="text-sm"> <Label htmlFor="underline-email" className="text-sm">
Email Email
</Label> </Label>
@@ -69,14 +69,14 @@ export function Pattern() {
Change your password here. Change your password here.
</CardDescription> </CardDescription>
</CardHeader> </CardHeader>
<CardContent className="space-y-4"> <CardContent className="flex flex-col gap-4">
<div className="space-y-2"> <div className="flex flex-col gap-2">
<Label htmlFor="underline-current" className="text-sm"> <Label htmlFor="underline-current" className="text-sm">
Current password Current password
</Label> </Label>
<Input id="underline-current" type="password" className="h-9" /> <Input id="underline-current" type="password" className="h-9" />
</div> </div>
<div className="space-y-2"> <div className="flex flex-col gap-2">
<Label htmlFor="underline-new" className="text-sm"> <Label htmlFor="underline-new" className="text-sm">
New password New password
</Label> </Label>
@@ -96,8 +96,8 @@ export function Pattern() {
Manage your preferences. Manage your preferences.
</CardDescription> </CardDescription>
</CardHeader> </CardHeader>
<CardContent className="space-y-4"> <CardContent className="flex flex-col gap-4">
<div className="space-y-2"> <div className="flex flex-col gap-2">
<Label htmlFor="underline-theme" className="text-sm"> <Label htmlFor="underline-theme" className="text-sm">
Theme Theme
</Label> </Label>
@@ -107,7 +107,7 @@ export function Pattern() {
className="h-9" className="h-9"
/> />
</div> </div>
<div className="space-y-2"> <div className="flex flex-col gap-2">
<Label htmlFor="underline-language" className="text-sm"> <Label htmlFor="underline-language" className="text-sm">
Language Language
</Label> </Label>
+5 -17
View File
@@ -121,8 +121,8 @@ function DashboardPage() {
) )
}, [isLoading, summary, statusChartData, groupChartData, domains, groups]) }, [isLoading, summary, statusChartData, groupChartData, domains, groups])
const kpiCards = useMemo<KpiStatCard[]>( const ungroupedServiceCount = serviceData?.ungrouped.length ?? 0
() => [ const kpiCards: KpiStatCard[] = [
{ {
id: 'domains', id: 'domains',
label: 'Домены', label: 'Домены',
@@ -144,8 +144,8 @@ function DashboardPage() {
id: 'services', id: 'services',
label: 'Сервисы', label: 'Сервисы',
value: serviceCount, value: serviceCount,
hint: serviceData?.ungrouped.length hint: ungroupedServiceCount
? `${serviceData.ungrouped.length} без группы` ? `${ungroupedServiceCount} без группы`
: undefined, : undefined,
to: '/services', to: '/services',
search: { domainId: undefined }, search: { domainId: undefined },
@@ -160,19 +160,7 @@ function DashboardPage() {
: `${certOk} в норме`, : `${certOk} в норме`,
to: '/certificates', to: '/certificates',
}, },
], ]
[
domains?.length,
ungroupedCount,
groups?.length,
groupChartData,
serviceCount,
serviceData?.ungrouped.length,
certs?.length,
certWarnings,
certOk,
],
)
return ( return (
<PageShell> <PageShell>