import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.0 import org.yachat.app 1.0 Page { property string destination EncryptionPopup { id: enctype } header: CustToolbar { id: header title: destination } footer: Pane { RowLayout { anchors.fill: parent TextArea { id: textarea wrapMode: TextArea.Wrap Layout.fillWidth: true placeholderText: qsTr("Compose message") Component.onCompleted: { textarea.forceActiveFocus() } Connections { target: Yc function onSent() { textarea.text = ""; } } } Button { text: qsTr("Enc") onClicked: enctype.open() } Button { text: qsTr("Send") enabled: textarea.length > 1 onClicked: { Yc.send(header.title, textarea.text, false) } } } } }