Disable composer/upload button when no permission

This commit is contained in:
miruka
2019-12-11 13:53:22 -04:00
parent c2b7b458f9
commit c4ee77ca15
6 changed files with 55 additions and 8 deletions

View File

@@ -68,7 +68,11 @@ Rectangle {
saveName: "composer"
saveId: [chat.roomId, writingUserId]
enabled: chat.roomInfo.can_send_messages
disabledText:
qsTr("You do not have permission to post in this room")
placeholderText: qsTr("Type a message...")
backgroundColor: "transparent"
area.tabStopDistance: 4 * 4 // 4 spaces
area.focus: true
@@ -209,6 +213,7 @@ Rectangle {
}
HButton {
enabled: chat.roomInfo.can_send_messages
icon.name: "upload-file"
backgroundColor: theme.chat.composer.uploadButton.background
toolTip.text: qsTr("Send files")