mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
- Delete QmlComponents symlink (Windows incompatible, bad practice) - main.cpp: add qml/ and project root as import paths directly - No more symlink dependency — works cross-platform - Clean up stale duplicate files from background agents - Update generate_cmake.py and CMakeLists.txt for new paths Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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 recipientEdited(string value)
|
|
signal subjectEdited(string value)
|
|
signal bodyEdited(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.recipientEdited(text)
|
|
}
|
|
|
|
CTextField {
|
|
Layout.fillWidth: true
|
|
label: "Subject"
|
|
placeholderText: "Test subject"
|
|
text: root.subject
|
|
onTextChanged: root.subjectEdited(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.bodyEdited(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"
|
|
}
|
|
}
|
|
}
|
|
}
|