mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
Add a large set of QML components (qml/Material, qml/MetaBuilder, qml/dbal) and a QmlComponents symlink for local development; migrate many frontends/qt6 files into qml/qt6. Replace the email client bootloader with a self-contained demo UI using FakeMUI primitives (MailboxLayout, ThreadList, EmailHeader, ComposeWindow), demo data, handlers, and new folder-navigation styles in globals.css. Update several QML component APIs to new signal/handler names (e.g. selectAllChanged→selectAllToggled, pageChanged→pageRequested, *Changed→*Edited) to standardize events. Add find_config_files() to frontends/qt6/generate_cmake.py to include config JS/JSON in QML/files and resources. Also add /frontends/qt6/_build to .gitignore.
100 lines
2.3 KiB
QML
100 lines
2.3 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
Rectangle {
|
|
id: root
|
|
|
|
property var workflow: null
|
|
property bool useLiveData: false
|
|
property real zoom: 1.0
|
|
property string executionStatus: ""
|
|
property int nodeCount: 0
|
|
property var tags: []
|
|
|
|
signal newWorkflow()
|
|
signal runTest()
|
|
signal toggleActive(bool active)
|
|
signal resetZoom()
|
|
|
|
implicitHeight: 56
|
|
color: Theme.paper
|
|
border.color: Theme.border
|
|
border.width: 1
|
|
|
|
RowLayout {
|
|
anchors.fill: parent
|
|
anchors.leftMargin: 16
|
|
anchors.rightMargin: 16
|
|
spacing: 12
|
|
|
|
CText {
|
|
variant: "h3"
|
|
text: workflow ? workflow.name : "No Workflow"
|
|
}
|
|
|
|
CBadge {
|
|
visible: workflow !== null
|
|
text: workflow && workflow.active ? "Active" : "Inactive"
|
|
accent: workflow ? workflow.active : false
|
|
}
|
|
|
|
CBadge {
|
|
text: useLiveData ? "Live" : "Mock"
|
|
color: useLiveData ? Theme.success : Theme.warning
|
|
}
|
|
|
|
Repeater {
|
|
model: tags.length > 3 ? 3 : tags.length
|
|
CChip {
|
|
text: tags[index] ? tags[index].name : ""
|
|
chipColor: Theme.border
|
|
}
|
|
}
|
|
|
|
CBadge {
|
|
visible: nodeCount > 0
|
|
text: nodeCount + " nodes"
|
|
color: Theme.border
|
|
}
|
|
|
|
Item { Layout.fillWidth: true }
|
|
|
|
CText {
|
|
variant: "caption"
|
|
text: Math.round(zoom * 100) + "%"
|
|
}
|
|
|
|
CButton {
|
|
text: "Fit"
|
|
variant: "ghost"
|
|
size: "sm"
|
|
onClicked: root.resetZoom()
|
|
}
|
|
|
|
CSwitch {
|
|
visible: workflow !== null
|
|
checked: workflow ? workflow.active : false
|
|
onCheckedChanged: {
|
|
if (workflow && workflow.active !== checked) {
|
|
root.toggleActive(checked)
|
|
}
|
|
}
|
|
}
|
|
|
|
CButton {
|
|
text: "New"
|
|
variant: "ghost"
|
|
onClicked: root.newWorkflow()
|
|
}
|
|
|
|
CButton {
|
|
text: executionStatus === "running" ? "Running..." : "Run Test"
|
|
variant: "primary"
|
|
enabled: executionStatus !== "running" && workflow !== null
|
|
onClicked: root.runTest()
|
|
}
|
|
}
|
|
}
|