2019-04-22 05:20:20 +10:00
|
|
|
import QtQuick 2.7
|
2019-04-29 05:18:36 +10:00
|
|
|
import "../../Base"
|
2019-04-29 04:34:29 +10:00
|
|
|
import "../utils.js" as ChatJS
|
2019-04-22 05:20:20 +10:00
|
|
|
|
|
|
|
Banner {
|
|
|
|
property var leftEvent: null
|
|
|
|
|
2019-04-29 05:18:36 +10:00
|
|
|
color: HStyle.chat.leftBanner.background
|
2019-04-29 01:01:38 +10:00
|
|
|
|
2019-04-22 05:20:20 +10:00
|
|
|
avatarName: ChatJS.getLeftBannerAvatarName(leftEvent, chatPage.userId)
|
|
|
|
labelText: ChatJS.getLeftBannerText(leftEvent)
|
|
|
|
|
|
|
|
buttonModel: [
|
|
|
|
{
|
2019-04-29 04:20:30 +10:00
|
|
|
name: "forget",
|
|
|
|
text: qsTr("Forget"),
|
2019-04-27 06:02:20 +10:00
|
|
|
iconName: "forget_room",
|
2019-04-22 05:20:20 +10:00
|
|
|
}
|
|
|
|
]
|
2019-04-29 04:20:30 +10:00
|
|
|
|
|
|
|
buttonCallbacks: {
|
|
|
|
"forget": function(button) {
|
|
|
|
button.loading = true
|
2019-05-03 04:54:37 +10:00
|
|
|
Backend.clients.get(chatPage.userId).forgetRoom(chatPage.roomId)
|
2019-04-29 04:20:30 +10:00
|
|
|
pageStack.clear()
|
|
|
|
},
|
|
|
|
}
|
2019-04-22 05:20:20 +10:00
|
|
|
}
|