Minor design improvements to user table and diagnose page

This commit is contained in:
2025-12-30 16:06:18 +01:00
parent ba942b2f8f
commit 170cac2091
2 changed files with 115 additions and 107 deletions

View File

@@ -48,11 +48,13 @@
</Card> </Card>
</div> </div>
<div class="col-span-1"> <div class="col-span-1">
<Card>
<CardContent ClassName="flex justify-center items-center">
@if (IsLoading) @if (IsLoading)
{ {
<Card>
<CardContent ClassName="flex justify-center items-center">
<Spinner ClassName="size-10"/> <Spinner ClassName="size-10"/>
</CardContent>
</Card>
} }
else else
{ {
@@ -60,6 +62,8 @@
{ {
if (Entries.Length == 0) if (Entries.Length == 0)
{ {
<Card>
<CardContent ClassName="flex justify-center items-center">
<Empty> <Empty>
<EmptyHeader> <EmptyHeader>
<EmptyMedia Variant="EmptyMediaVariant.Icon"> <EmptyMedia Variant="EmptyMediaVariant.Icon">
@@ -71,6 +75,8 @@
</EmptyDescription> </EmptyDescription>
</EmptyHeader> </EmptyHeader>
</Empty> </Empty>
</CardContent>
</Card>
} }
else else
{ {
@@ -85,12 +91,12 @@
var textColor = entry.Level switch var textColor = entry.Level switch
{ {
DiagnoseLevel.Error => "text-destructive", DiagnoseLevel.Error => "text-destructive",
DiagnoseLevel.Warning => "text-yellow-300", DiagnoseLevel.Warning => "text-yellow-400",
DiagnoseLevel.Healthy => "text-green-500" DiagnoseLevel.Healthy => "text-green-500"
}; };
<AccordionItem <AccordionItem
ClassName="overflow-hidden border bg-background px-4 first:rounded-t-lg last:rounded-b-lg last:border-b" ClassName="overflow-hidden border bg-card px-4 first:rounded-t-lg last:rounded-b-lg last:border-b"
Value="@($"diagnoseEntry{i}")"> Value="@($"diagnoseEntry{i}")">
<AccordionTrigger className="hover:no-underline"> <AccordionTrigger className="hover:no-underline">
@@ -188,6 +194,8 @@
} }
else else
{ {
<Card>
<CardContent ClassName="flex justify-center items-center">
<Empty> <Empty>
<EmptyHeader> <EmptyHeader>
<EmptyMedia Variant="EmptyMediaVariant.Icon"> <EmptyMedia Variant="EmptyMediaVariant.Icon">
@@ -199,10 +207,10 @@
</EmptyDescription> </EmptyDescription>
</EmptyHeader> </EmptyHeader>
</Empty> </Empty>
}
}
</CardContent> </CardContent>
</Card> </Card>
}
}
</div> </div>
</div> </div>

View File

@@ -36,7 +36,7 @@
</div> </div>
<div class="mt-8"> <div class="mt-8">
<DataGrid @ref="Grid" TGridItem="UserResponse" Loader="LoadAsync" PageSize="10"> <DataGrid @ref="Grid" TGridItem="UserResponse" Loader="LoadAsync" PageSize="10" ClassName="bg-card">
<PropertyColumn HeadClassName="text-left" CellClassName="text-left" Field="u => u.Id"/> <PropertyColumn HeadClassName="text-left" CellClassName="text-left" Field="u => u.Id"/>
<PropertyColumn HeadClassName="text-left" CellClassName="text-left" IsFilterable="true" <PropertyColumn HeadClassName="text-left" CellClassName="text-left" IsFilterable="true"
Identifier="@nameof(UserResponse.Username)" Field="u => u.Username"/> Identifier="@nameof(UserResponse.Username)" Field="u => u.Username"/>