2019-04-22 05:20:20 +10:00
|
|
|
import QtQuick 2.7
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
import QtQuick.Layouts 1.4
|
|
|
|
import "../base" as Base
|
|
|
|
|
|
|
|
Banner {
|
|
|
|
property var inviter: null
|
|
|
|
|
2019-04-29 01:01:38 +10:00
|
|
|
color: Base.HStyle.chat.inviteBanner.background
|
|
|
|
|
2019-04-22 05:20:20 +10:00
|
|
|
avatarName: inviter ? inviter.displayname : ""
|
|
|
|
//avatarSource: inviter ? inviter.avatar_url : ""
|
|
|
|
|
|
|
|
labelText:
|
|
|
|
(inviter ?
|
|
|
|
("<b>" + inviter.displayname + "</b>") : qsTr("Someone")) +
|
|
|
|
" " + qsTr("invited you to join the room.")
|
|
|
|
|
|
|
|
buttonModel: [
|
|
|
|
{
|
|
|
|
text: "Accept",
|
2019-04-27 06:02:20 +10:00
|
|
|
iconName: "invite_accept",
|
|
|
|
//iconColor: Qt.hsla(0.45, 0.9, 0.3, 1),
|
2019-04-22 06:12:53 +10:00
|
|
|
clientFunction: "joinRoom",
|
|
|
|
clientArgs: [chatPage.roomId],
|
2019-04-22 05:20:20 +10:00
|
|
|
},
|
|
|
|
{
|
|
|
|
text: "Decline",
|
2019-04-27 06:02:20 +10:00
|
|
|
iconName: "invite_decline",
|
|
|
|
//iconColor: Qt.hsla(0.95, 0.9, 0.35, 1),
|
2019-04-22 06:12:53 +10:00
|
|
|
clientFunction: "leaveRoom",
|
|
|
|
clientArgs: [chatPage.roomId],
|
2019-04-22 05:20:20 +10:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|