2019-07-13 19:39:01 +10:00
|
|
|
import QtQuick 2.12
|
2019-04-29 05:18:36 +10:00
|
|
|
import "../../Base"
|
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
|
|
|
|
avatar.avatarUrl: 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-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-04-29 04:20:30 +10:00
|
|
|
button.loading = true
|
2019-07-07 13:43:51 +10:00
|
|
|
py.callClientCoro(
|
2019-07-18 17:13:34 +10:00
|
|
|
chatPage.userId, "room_forget", [chatPage.roomId], () => {
|
2019-07-08 13:38:37 +10:00
|
|
|
button.loading = false
|
2019-08-20 05:37:48 +10:00
|
|
|
Qt.callLater(pageLoader.showPage, "Default")
|
2019-07-08 13:38:37 +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
|
|
|
}
|