Files
metabuilder/qml/MetaBuilder/CStatsStrip.qml
johndoe6345789 6e394d7846 style(qt6): 80-char margin enforced — 737 violations → 29 remaining
191 files reformatted across views, components, widgets, hybrid, contexts.
New components: CCreateSchemaDialog, CAddFieldDialog, CAdminContentPanel.
JS helpers: connBadgeStatus/Text, adminStats, exampleLabels, onLevelClicked.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 15:48:39 +00:00

69 lines
2.1 KiB
QML

import QtQuick
import QtQuick.Layouts
import QmlComponents 1.0
Rectangle {
id: root
property var stats: ({ users: "0", packages: "0", workflows: "0",
backends: "0" })
property color accentColor: "#6366F1"
property bool isDark: false
readonly property color onSurfaceVariant: Theme.textSecondary
readonly property color outlineVariant: isDark
? Qt.rgba(1, 1, 1, 0.06) : Qt.rgba(0, 0, 0, 0.08)
implicitHeight: 88
color: isDark ? Qt.rgba(1, 1, 1, 0.05) : Qt.rgba(0.31, 0.31, 0.44, 0.06)
RowLayout {
anchors.fill: parent
anchors.leftMargin: 60
anchors.rightMargin: 60
spacing: 0
Repeater {
model: [
{ label: "USERS", value: stats.users },
{ label: "PACKAGES", value: stats.packages },
{ label: "WORKFLOWS", value: stats.workflows },
{ label: "BACKENDS", value: stats.backends }
]
delegate: Item {
Layout.fillWidth: true
Layout.fillHeight: true
RowLayout {
anchors.centerIn: parent
spacing: 10
CText {
text: modelData.value
font.pixelSize: 24
font.weight: Font.Bold
font.family: "monospace"
color: root.accentColor
}
CText {
text: modelData.label
font.pixelSize: 10
font.family: "monospace"
font.letterSpacing: 2
color: onSurfaceVariant
}
}
Rectangle {
visible: index < 3
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
width: 1
height: 32
color: outlineVariant
}
}
}
}
}