feat(Communities): Add checking access type in Welcome modal
Part of: #7072
This commit is contained in:
parent
34d7d4354b
commit
6175beb40a
|
@ -133,6 +133,7 @@ Item {
|
||||||
name: communityData.name
|
name: communityData.name
|
||||||
introMessage: communityData.introMessage
|
introMessage: communityData.introMessage
|
||||||
imageSrc: communityData.image
|
imageSrc: communityData.image
|
||||||
|
accessType: communityData.access
|
||||||
|
|
||||||
onJoined: root.store.requestToJoinCommunity(communityData.id, root.store.userProfileInst.name)
|
onJoined: root.store.requestToJoinCommunity(communityData.id, root.store.userProfileInst.name)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ import QtQuick.Controls 2.14
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQml.Models 2.14
|
import QtQml.Models 2.14
|
||||||
|
|
||||||
|
import utils 1.0
|
||||||
|
|
||||||
import StatusQ.Core 0.1
|
import StatusQ.Core 0.1
|
||||||
import StatusQ.Core.Theme 0.1
|
import StatusQ.Core.Theme 0.1
|
||||||
import StatusQ.Controls 0.1
|
import StatusQ.Controls 0.1
|
||||||
|
@ -14,6 +16,7 @@ StatusDialog {
|
||||||
|
|
||||||
property string name
|
property string name
|
||||||
property string introMessage
|
property string introMessage
|
||||||
|
property int accessType
|
||||||
property url imageSrc
|
property url imageSrc
|
||||||
|
|
||||||
signal joined
|
signal joined
|
||||||
|
@ -23,7 +26,9 @@ StatusDialog {
|
||||||
footer: StatusDialogFooter {
|
footer: StatusDialogFooter {
|
||||||
rightButtons: ObjectModel {
|
rightButtons: ObjectModel {
|
||||||
StatusButton {
|
StatusButton {
|
||||||
text: qsTr("Join %1").arg(root.name)
|
text: root.accessType === Constants.communityChatOnRequestAccess
|
||||||
|
? qsTr("Request to join %1").arg(root.name)
|
||||||
|
: qsTr("Join %1").arg(root.name)
|
||||||
enabled: checkBox.checked
|
enabled: checkBox.checked
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.joined()
|
root.joined()
|
||||||
|
|
Loading…
Reference in New Issue