Organize banners, add LeftBanner

Previously there was InviteOffer, now there's a base Banner component,
InviteBanner and LeftBanner.
This commit is contained in:
miruka
2019-04-21 15:20:20 -04:00
parent 909e1c3363
commit ea8f75c729
14 changed files with 274 additions and 134 deletions

View File

@@ -9,8 +9,6 @@ ColumnLayout {
readonly property var roomInfo:
Backend.models.rooms.get(userId).getWhere("roomId", roomId)
property bool isInvite: roomInfo.category === "Invites"
id: chatPage
spacing: 0
onFocusChanged: sendBox.setFocus()
@@ -20,19 +18,22 @@ ColumnLayout {
topic: roomInfo.topic
}
MessageList {}
TypingUsersBar {}
InviteOffer {
visible: isInvite
InviteBanner {
visible: roomInfo.category === "Invites"
inviter: roomInfo.inviter
}
SendBox {
id: sendBox
visible: ! isInvite
visible: roomInfo.category === "Rooms"
}
LeftBanner {
visible: roomInfo.category === "Left"
leftEvent: roomInfo.leftEvent
}
}