Files
metabuilder/qml/MetaBuilder/CGodPanelHeader.qml
johndoe6345789 786f91ec64 Add QML Material lib, demo email UI, and QML refactor
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.
2026-03-19 10:18:09 +00:00

102 lines
3.1 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QmlComponents 1.0
Rectangle {
id: root
property var configCounts: ({})
property bool isDark: false
signal navigateLevel(int level)
// MD3 tonal surfaces
readonly property color surfaceContainerHigh: isDark ? Qt.rgba(1, 1, 1, 0.08) : Qt.rgba(0.31, 0.31, 0.44, 0.10)
readonly property color outlineVariant: isDark ? Qt.rgba(1, 1, 1, 0.06) : Qt.rgba(0, 0, 0, 0.08)
readonly property color onSurface: Theme.text
readonly property color onSurfaceVariant: Theme.textSecondary
implicitHeight: headerCol.implicitHeight + 40
radius: 16
clip: true
color: surfaceContainerHigh
border.width: 1
border.color: outlineVariant
// Subtle gradient wash
Rectangle {
anchors.fill: parent
radius: parent.radius
gradient: Gradient {
GradientStop { position: 0.0; color: root.isDark ? Qt.rgba(0.39, 0.4, 0.95, 0.04) : Qt.rgba(0.30, 0.40, 0.90, 0.08) }
GradientStop { position: 1.0; color: "transparent" }
}
}
ColumnLayout {
id: headerCol
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.margins: 20
spacing: 14
RowLayout {
Layout.fillWidth: true
spacing: 12
CText {
text: "God Panel"
font.pixelSize: 28
font.weight: Font.Bold
font.letterSpacing: -0.5
color: root.onSurface
}
CBadge {
text: "Level 4"
variant: "primary"
}
CStatusBadge { status: "success"; text: "Active" }
Item { Layout.fillWidth: true }
CButton {
text: "Level 1"
variant: "ghost"
size: "sm"
onClicked: root.navigateLevel(1)
}
CButton {
text: "Level 2"
variant: "ghost"
size: "sm"
onClicked: root.navigateLevel(2)
}
CButton {
text: "Level 3"
variant: "ghost"
size: "sm"
onClicked: root.navigateLevel(3)
}
}
// Config summary chips
Flow {
Layout.fillWidth: true
spacing: 8
CChip { text: root.configCounts.schemas + " Schemas"; variant: "primary" }
CChip { text: root.configCounts.workflows + " Workflows"; variant: "primary" }
CChip { text: root.configCounts.luaScripts + " Lua Scripts"; variant: "primary" }
CChip { text: root.configCounts.packages + " Packages"; variant: "primary" }
CChip { text: root.configCounts.pages + " Pages"; variant: "primary" }
CChip { text: root.configCounts.components + " Components"; variant: "primary" }
CChip { text: root.configCounts.users + " Users"; variant: "primary" }
CChip { text: root.configCounts.dbBackends + " DB Backends"; variant: "primary" }
}
}
}