mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
WorkflowEditor (325→80): CWorkflowState.qml + WorkflowConnectionState.js DashboardView (121→95): DashboardDBAL.js + config/dashboard-config.json Storybook (114→78): StorybookSidebar + config/storybook-components.json + 7 components compacted to under 100 via formatting (no logic changes) + Multiple view/component splits across all remaining 100+ LOC files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
58 lines
1.4 KiB
QML
58 lines
1.4 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
Rectangle {
|
|
id: root
|
|
|
|
property var fieldData: ({})
|
|
property int fieldIndex: 0
|
|
property bool isSelected: false
|
|
|
|
signal clicked()
|
|
|
|
width: parent ? parent.width : 400
|
|
height: 40
|
|
radius: 4
|
|
color: root.isSelected
|
|
? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12)
|
|
: (fieldMouse.containsMouse ? Theme.surface : "transparent")
|
|
|
|
MouseArea {
|
|
id: fieldMouse
|
|
anchors.fill: parent
|
|
hoverEnabled: true
|
|
onClicked: root.clicked()
|
|
}
|
|
|
|
RowLayout {
|
|
anchors.fill: parent
|
|
anchors.leftMargin: 12
|
|
anchors.rightMargin: 12
|
|
spacing: 8
|
|
|
|
CText {
|
|
variant: "body2"
|
|
text: root.fieldData.name || ""
|
|
Layout.preferredWidth: 140
|
|
font.bold: root.isSelected
|
|
}
|
|
CChip {
|
|
text: root.fieldData.type || ""
|
|
Layout.preferredWidth: 100
|
|
}
|
|
CText {
|
|
variant: "body2"
|
|
text: root.fieldData.required ? "Yes" : "No"
|
|
color: root.fieldData.required ? Theme.primary : Theme.border
|
|
Layout.preferredWidth: 80
|
|
}
|
|
CText {
|
|
variant: "caption"
|
|
text: root.fieldData.defaultValue || "-"
|
|
Layout.fillWidth: true
|
|
elide: Text.ElideRight
|
|
}
|
|
}
|
|
}
|