moment/src/gui/Pages/Chat/Banners/LeftBanner.qml
2019-12-19 07:46:16 -04:00

42 lines
1.1 KiB
QML

// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
import "../../../Base"
Banner {
color: theme.chat.leftBanner.background
// TODO: avatar func auto
avatar.userId: chat.userId
avatar.displayName: chat.userInfo.display_name
avatar.mxc: chat.userInfo.avatar_url
labelText: qsTr("You are not part of this room anymore")
buttonModel: [
{
name: "forget",
text: qsTr("Forget"),
iconName: "room-forget",
iconColor: theme.colors.negativeBackground
}
]
buttonCallbacks: ({
forget: button => {
utils.makePopup(
"Popups/ForgetRoomPopup.qml",
mainUI, // Must not be destroyed with chat
{
userId: chat.userId,
roomId: chat.roomId,
roomName: chat.roomInfo.display_name,
},
obj => {
obj.onOk.connect(() => { button.loading = true })
},
false,
)
}
})
}