2022-07-25 15:07:19 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Layouts 1.4
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Popups 0.1
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
import shared 1.0
|
2022-08-23 14:57:37 +00:00
|
|
|
import shared.panels 1.0
|
2022-07-25 15:07:19 +00:00
|
|
|
import shared.views 1.0
|
|
|
|
import shared.status 1.0
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: root
|
2022-10-25 18:39:21 +00:00
|
|
|
objectName: "CommunityProfilePopupInviteMessagePanel_ColumnLayout"
|
2022-07-25 15:07:19 +00:00
|
|
|
|
|
|
|
property var pubKeys: ([])
|
|
|
|
|
|
|
|
property var rootStore
|
|
|
|
property var contactsStore
|
|
|
|
|
|
|
|
property alias inviteMessage: messageInput.text
|
|
|
|
|
|
|
|
spacing: Style.current.padding
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: d
|
|
|
|
|
|
|
|
readonly property int maxMsgLength: 140
|
|
|
|
readonly property int msgHeight: 108
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusInput {
|
|
|
|
id: messageInput
|
2022-10-25 18:39:21 +00:00
|
|
|
input.edit.objectName: "CommunityProfilePopupInviteMessagePanel_MessageInput"
|
2022-07-25 15:07:19 +00:00
|
|
|
label: qsTr("Invitation Message")
|
|
|
|
charLimit: d.maxMsgLength
|
|
|
|
placeholderText: qsTr("The message a contact will get with community invitation")
|
|
|
|
input.multiline: true
|
|
|
|
input.implicitHeight: d.msgHeight
|
|
|
|
input.verticalAlignment: TextEdit.AlignTop
|
|
|
|
Layout.minimumHeight: 150 // TODO: implicitHeight is not calculated well from input.implicitHeight
|
|
|
|
Layout.fillWidth: true
|
2022-08-23 14:57:37 +00:00
|
|
|
Layout.leftMargin: Style.current.padding
|
|
|
|
Layout.rightMargin: Style.current.padding
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusModalDivider {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
text: qsTr("Invites will be sent to:")
|
|
|
|
font.pixelSize: Style.current.primaryTextFontSize
|
|
|
|
Layout.leftMargin: Style.current.padding
|
|
|
|
Layout.rightMargin: Style.current.padding
|
2022-07-25 15:07:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PickedContacts {
|
|
|
|
id: existingContacts
|
|
|
|
contactsStore: root.contactsStore
|
|
|
|
pubKeys: root.pubKeys
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2022-08-23 14:57:37 +00:00
|
|
|
Layout.leftMargin: Style.current.halfPadding
|
|
|
|
Layout.rightMargin: Style.current.halfPadding
|
2022-07-25 15:07:19 +00:00
|
|
|
}
|
|
|
|
}
|