moment/src/qml/Chat/Banners/LeftBanner.qml

44 lines
1.2 KiB
QML
Raw Normal View History

import QtQuick 2.12
import "../../Base"
2019-09-10 10:24:29 +10:00
import "../../utils.js" as Utils
Banner {
color: theme.chat.leftBanner.background
2019-04-29 01:01:38 +10:00
// TODO: avatar func auto
avatar.userId: chatPage.userId
avatar.displayName: chatPage.userInfo.display_name
avatar.avatarUrl: chatPage.userInfo.avatar_url
labelText: qsTr("You are not part of this room anymore.")
buttonModel: [
{
name: "forget",
text: qsTr("Forget"),
iconName: "room-forget",
2019-08-29 08:21:13 +10:00
iconColor: theme.colors.negativeBackground
}
]
buttonCallbacks: ({
forget: button => {
2019-09-10 10:24:29 +10:00
Utils.makePopup(
"Popups/ForgetRoomPopup.qml",
chatPage,
{
userId: chatPage.userId,
roomId: chatPage.roomId,
roomName: chatPage.roomInfo.display_name,
forgottenCallback: () => {
button.loading = false
Qt.callLater(pageLoader.showPage, "Default")
},
},
obj => {
obj.onOk.connect(() => { button.loading = true })
},
)
2019-07-08 12:19:17 +10:00
}
})
}