This commit is contained in:
me
2026-01-30 20:32:37 +08:00
parent 222449cb1b
commit a4e6557d1b
24 changed files with 2189 additions and 6235 deletions

40
ui/components/empty.slint Normal file
View File

@@ -0,0 +1,40 @@
// Empty state component - Shows when no data is available
import { Theme, Typography, SpacingSystem } from "../theme/theme.slint";
export component Empty inherits Rectangle {
in property <string> icon: "📭";
in property <string> title: "No Data";
in property <string> description: "";
background: transparent;
VerticalLayout {
alignment: center;
spacing: SpacingSystem.spacing.s3;
// Icon
Text {
text: root.icon;
font-size: 48px;
horizontal-alignment: center;
}
// Title
Text {
text: root.title;
font-size: Typography.sizes.lg;
font-weight: Typography.weights.semibold;
color: Theme.colors.foreground;
horizontal-alignment: center;
}
// Description (optional)
if root.description != "": Text {
text: root.description;
font-size: Typography.sizes.sm;
color: Theme.colors.muted-foreground;
horizontal-alignment: center;
wrap: word-wrap;
}
}
}