2019-07-13 19:39:01 +10:00
|
|
|
import QtQuick 2.12
|
2019-04-29 05:18:36 +10:00
|
|
|
import "../../Base"
|
2019-09-10 10:24:29 +10:00
|
|
|
import "../../utils.js" as Utils
|
2019-04-22 05:20:20 +10:00
|
|
|
|
|
|
|
Banner {
|
2019-07-07 07:50:55 +10:00
|
|
|
color: theme.chat.leftBanner.background
|
2019-04-29 01:01:38 +10:00
|
|
|
|
2019-07-07 13:43:51 +10:00
|
|
|
// TODO: avatar func auto
|
2019-08-16 03:00:15 +10:00
|
|
|
avatar.userId: chatPage.userId
|
|
|
|
avatar.displayName: chatPage.userInfo.display_name
|
2019-11-04 04:48:12 +11:00
|
|
|
avatar.mxc: chatPage.userInfo.avatar_url
|
2019-07-07 13:43:51 +10:00
|
|
|
labelText: qsTr("You are not part of this room anymore.")
|
2019-04-22 05:20:20 +10:00
|
|
|
|
|
|
|
buttonModel: [
|
|
|
|
{
|
2019-04-29 04:20:30 +10:00
|
|
|
name: "forget",
|
|
|
|
text: qsTr("Forget"),
|
2019-08-22 06:29:44 +10:00
|
|
|
iconName: "room-forget",
|
2019-08-29 08:21:13 +10:00
|
|
|
iconColor: theme.colors.negativeBackground
|
2019-04-22 05:20:20 +10:00
|
|
|
}
|
|
|
|
]
|
2019-04-29 04:20:30 +10:00
|
|
|
|
2019-07-18 18:17:35 +10:00
|
|
|
buttonCallbacks: ({
|
|
|
|
forget: button => {
|
2019-09-10 10:24:29 +10:00
|
|
|
Utils.makePopup(
|
|
|
|
"Popups/ForgetRoomPopup.qml",
|
2019-09-10 10:56:10 +10:00
|
|
|
mainUI, // Must not be destroyed with chatPage
|
2019-09-10 10:24:29 +10:00
|
|
|
{
|
2019-09-10 10:56:10 +10:00
|
|
|
userId: chatPage.userId,
|
|
|
|
roomId: chatPage.roomId,
|
|
|
|
roomName: chatPage.roomInfo.display_name,
|
2019-09-10 10:24:29 +10:00
|
|
|
},
|
|
|
|
obj => {
|
|
|
|
obj.onOk.connect(() => { button.loading = true })
|
|
|
|
},
|
2019-09-10 10:56:10 +10:00
|
|
|
false,
|
2019-09-10 10:24:29 +10:00
|
|
|
)
|
2019-07-08 12:19:17 +10:00
|
|
|
}
|
2019-07-18 18:17:35 +10:00
|
|
|
})
|
2019-04-22 05:20:20 +10:00
|
|
|
}
|