2026-05-17 02:28:15 +02:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
import QtQuick.Controls 2.15
|
2026-05-17 03:08:16 +02:00
|
|
|
import QtQuick.Layouts 1.15
|
2026-05-17 02:28:15 +02:00
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
id: composePage
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
|
|
// Back button
|
|
|
|
|
Rectangle {
|
|
|
|
|
anchors {
|
|
|
|
|
top: parent.top
|
|
|
|
|
left: parent.left
|
|
|
|
|
margins: 10
|
|
|
|
|
}
|
|
|
|
|
width: 40
|
|
|
|
|
height: 40
|
|
|
|
|
color: "#e0e0e0"
|
|
|
|
|
radius: 5
|
|
|
|
|
MouseArea {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
onClicked: {
|
|
|
|
|
StackView.view.pop()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Text {
|
|
|
|
|
text: "←"
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
font.pointSize: 20
|
|
|
|
|
color: "#333"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-17 03:08:16 +02:00
|
|
|
// Form for composing email
|
2026-05-17 02:28:15 +02:00
|
|
|
Rectangle {
|
|
|
|
|
anchors {
|
|
|
|
|
top: backButton.bottom
|
|
|
|
|
bottom: parent.bottom
|
|
|
|
|
left: parent.left
|
|
|
|
|
right: parent.right
|
2026-05-17 03:08:16 +02:00
|
|
|
margins: 10
|
2026-05-17 02:28:15 +02:00
|
|
|
}
|
|
|
|
|
color: "#fafafa"
|
2026-05-17 03:08:16 +02:00
|
|
|
ColumnLayout {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
spacing: 10
|
|
|
|
|
|
|
|
|
|
// To field
|
|
|
|
|
Text {
|
|
|
|
|
text: qsTr("To:")
|
|
|
|
|
font.pointSize: 14
|
|
|
|
|
Layout.alignment: Qt.AlignLeft
|
|
|
|
|
}
|
|
|
|
|
TextField {
|
|
|
|
|
id: toField
|
|
|
|
|
placeholderText: qsTr("Recipient")
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Subject field
|
|
|
|
|
Text {
|
|
|
|
|
text: qsTr("Subject:")
|
|
|
|
|
font.pointSize: 14
|
|
|
|
|
Layout.alignment: Qt.AlignLeft
|
|
|
|
|
}
|
|
|
|
|
TextField {
|
|
|
|
|
id: subjectField
|
|
|
|
|
placeholderText: qsTr("Subject")
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Body
|
|
|
|
|
Text {
|
|
|
|
|
text: qsTr("Body:")
|
|
|
|
|
font.pointSize: 14
|
|
|
|
|
Layout.alignment: Qt.AlignLeft
|
|
|
|
|
}
|
|
|
|
|
TextArea {
|
|
|
|
|
id: bodyArea
|
|
|
|
|
placeholderText: qsTr("Write your message...")
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.fillHeight: true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Send button
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: sendButton
|
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
|
width: 80
|
|
|
|
|
height: 30
|
|
|
|
|
color: "#1976D2"
|
|
|
|
|
radius: 4
|
|
|
|
|
MouseArea {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
onClicked: {
|
|
|
|
|
// TODO: Implement sending email
|
|
|
|
|
console.log("Sending email to:", toField.text, "subject:", subjectField.text)
|
|
|
|
|
// For now, just go back
|
|
|
|
|
StackView.view.pop()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Text {
|
|
|
|
|
text: qsTr("Send")
|
|
|
|
|
color: "white"
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
font.pointSize: 12
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-05-17 02:28:15 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|