fix: additional text on channel identifier

This commit is contained in:
Richard Ramos 2020-08-07 17:36:35 -04:00
parent edbb183242
commit d3b6ff32b8
No known key found for this signature in database
GPG Key ID: 80D4B01265FDFE8F

View File

@ -71,9 +71,35 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
}
Rectangle {
id: channelDescription
width: 330
height: childrenRect.height
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: channelName.bottom
anchors.topMargin: 16
StyledText {
wrapMode: Text.Wrap
text: {
switch(chatsModel.activeChannel.chatType) {
case Constants.chatTypePrivateGroupChat: return qsTr(`Welcome to the beginning of the <span style="color: ${Style.current.textColor}">%1</span> group!`).arg(chatsModel.activeChannel.name);
case Constants.chatTypeOneToOne: return qsTr(`Any messages you send here are encrypted and can only be read by you and <span style="color: ${Style.current.textColor}">%1</span>`).arg(Utils.removeStatusEns(chatsModel.activeChannel.name))
default: return "";
}
}
font.pixelSize: 14
color: Style.current.darkGrey
anchors.left: parent.left
anchors.right: parent.right
horizontalAlignment: Text.AlignHCenter
textFormat: Text.RichText
}
}
Item {
visible: chatsModel.activeChannel.chatType === Constants.chatTypePrivateGroupChat && !chatsModel.activeChannel.isMember(profileModel.profile.pubKey)
anchors.top: channelName.bottom
anchors.top: channelDescription.bottom
anchors.topMargin: 16
id: joinOrDecline