Skip to content

Commit

Permalink
feat(Communities): Add checking access type in Welcome modal
Browse files Browse the repository at this point in the history
Part of: #7072
  • Loading branch information
borismelnik committed Sep 8, 2022
1 parent b248560 commit a38ad3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/imports/shared/popups/CommunityIntroDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import QtQuick.Controls 2.14
import QtQuick.Layouts 1.1
import QtQml.Models 2.14

import utils 1.0

import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
Expand All @@ -14,6 +16,7 @@ StatusDialog {

property string name
property string introMessage
property int access
property url imageSrc

signal joined
Expand All @@ -23,7 +26,9 @@ StatusDialog {
footer: StatusDialogFooter {
rightButtons: ObjectModel {
StatusButton {
text: qsTr("Join %1").arg(root.name)
text: root.access === Constants.communityChatOnRequestAccess
? qsTr("Request to join %1").arg(root.name)
: qsTr("Join %1").arg(root.name)
enabled: checkBox.checked
onClicked: {
root.joined()
Expand Down
1 change: 1 addition & 0 deletions ui/imports/shared/views/chat/InvitationBubbleView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Item {
name: root.invitedCommunity ? root.invitedCommunity.name : ""
introMessage: root.invitedCommunity ? root.invitedCommunity.introMessage : ""
imageSrc: root.invitedCommunity ? root.invitedCommunity.image : ""
access: root.invitedCommunity ? root.invitedCommunity.access : -1

onJoined: joinMethod()
}
Expand Down

0 comments on commit a38ad3b

Please sign in to comment.