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.
99 lines
2.6 KiB
QML
99 lines
2.6 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
CCard {
|
|
id: root
|
|
Layout.fillWidth: true
|
|
|
|
property string recipient: ""
|
|
property string subject: "MetaBuilder SMTP Test"
|
|
property string body: "This is a test email from MetaBuilder."
|
|
property bool sending: false
|
|
|
|
signal recipientChanged(string value)
|
|
signal subjectChanged(string value)
|
|
signal bodyChanged(string value)
|
|
signal sendRequested()
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
anchors.margins: 16
|
|
spacing: 12
|
|
|
|
CText { variant: "h4"; text: "Send Test Email" }
|
|
CDivider { Layout.fillWidth: true }
|
|
|
|
RowLayout {
|
|
Layout.fillWidth: true
|
|
spacing: 12
|
|
|
|
CTextField {
|
|
Layout.fillWidth: true
|
|
label: "Recipient"
|
|
placeholderText: "test@example.com"
|
|
text: root.recipient
|
|
onTextChanged: root.recipientChanged(text)
|
|
}
|
|
|
|
CTextField {
|
|
Layout.fillWidth: true
|
|
label: "Subject"
|
|
placeholderText: "Test subject"
|
|
text: root.subject
|
|
onTextChanged: root.subjectChanged(text)
|
|
}
|
|
}
|
|
|
|
ColumnLayout {
|
|
Layout.fillWidth: true
|
|
spacing: 4
|
|
|
|
CText { variant: "caption"; text: "Body" }
|
|
|
|
Rectangle {
|
|
Layout.fillWidth: true
|
|
Layout.preferredHeight: 100
|
|
color: Theme.surface
|
|
border.color: Theme.border
|
|
border.width: 1
|
|
radius: 4
|
|
|
|
ScrollView {
|
|
anchors.fill: parent
|
|
anchors.margins: 8
|
|
|
|
TextArea {
|
|
text: root.body
|
|
wrapMode: Text.Wrap
|
|
color: Theme.text
|
|
font.pixelSize: 13
|
|
background: null
|
|
onTextChanged: root.bodyChanged(text)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
FlexRow {
|
|
Layout.fillWidth: true
|
|
spacing: 12
|
|
|
|
CButton {
|
|
text: root.sending ? "Sending..." : "Send Test Email"
|
|
variant: "primary"
|
|
size: "sm"
|
|
enabled: !root.sending && root.recipient.length > 0
|
|
onClicked: root.sendRequested()
|
|
}
|
|
|
|
CText {
|
|
visible: root.recipient.length === 0
|
|
variant: "caption"
|
|
text: "Enter a recipient to enable sending"
|
|
}
|
|
}
|
|
}
|
|
}
|