fix(InviteFriendsToCommunityPopup): adaptive popup height, consistent footer height

Closes: #7604
Closes: #7605
This commit is contained in:
Michał Cieślak 2022-11-07 14:16:29 +01:00 committed by Michał
parent c32973b731
commit 6237d3c7c1
2 changed files with 9 additions and 2 deletions

View File

@ -93,7 +93,7 @@ SplitView {
} }
communitySectionModule: QtObject { communitySectionModule: QtObject {
function inviteUsersToCommunity() { function inviteUsersToCommunity(keys, message) {
logs.logEvent("communitySectionModule::inviteUsersToCommunity", logs.logEvent("communitySectionModule::inviteUsersToCommunity",
["keys", "message"], arguments) ["keys", "message"], arguments)
} }

View File

@ -27,6 +27,10 @@ StatusStackModal {
QtObject { QtObject {
id: d id: d
// values from Figma design
readonly property int footerButtonsHeight: 44
readonly property int popupContentHeight: 551
function sendInvites(pubKeys, inviteMessage) { function sendInvites(pubKeys, inviteMessage) {
const error = root.communitySectionModule.inviteUsersToCommunity(JSON.stringify(pubKeys), inviteMessage); const error = root.communitySectionModule.inviteUsersToCommunity(JSON.stringify(pubKeys), inviteMessage);
d.processInviteResult(error); d.processInviteResult(error);
@ -51,7 +55,6 @@ StatusStackModal {
stackTitle: qsTr("Invite Contacts to %1").arg(community.name) stackTitle: qsTr("Invite Contacts to %1").arg(community.name)
width: 640 width: 640
implicitHeight: 700
padding: 0 padding: 0
leftPadding: 0 leftPadding: 0
@ -59,6 +62,7 @@ StatusStackModal {
nextButton: StatusButton { nextButton: StatusButton {
objectName: "InviteFriendsToCommunityPopup_NextButton" objectName: "InviteFriendsToCommunityPopup_NextButton"
implicitHeight: d.footerButtonsHeight
text: qsTr("Next") text: qsTr("Next")
enabled: root.pubKeys.length enabled: root.pubKeys.length
onClicked: { onClicked: {
@ -68,6 +72,7 @@ StatusStackModal {
finishButton: StatusButton { finishButton: StatusButton {
objectName: "InviteFriendsToCommunityPopup_SendButton" objectName: "InviteFriendsToCommunityPopup_SendButton"
implicitHeight: d.footerButtonsHeight
enabled: root.pubKeys.length > 0 enabled: root.pubKeys.length > 0
text: qsTr("Send Invites") text: qsTr("Send Invites")
onClicked: { onClicked: {
@ -87,6 +92,8 @@ StatusStackModal {
stackItems: [ stackItems: [
Item { Item {
implicitHeight: d.popupContentHeight
CommunityProfilePopupInviteFriendsPanel { CommunityProfilePopupInviteFriendsPanel {
anchors.fill: parent anchors.fill: parent
anchors.topMargin: 16 anchors.topMargin: 16