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

42 lines
1.1 KiB
QML
Raw Normal View History

2019-12-19 22:46:16 +11:00
// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
2019-12-18 19:53:08 +11:00
import "../../../Base"
Banner {
color: theme.chat.leftBanner.background
2019-04-29 01:01:38 +10:00
// TODO: avatar func auto
2019-12-09 20:25:31 +11:00
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",
2019-08-29 08:21:13 +10:00
iconColor: theme.colors.negativeBackground
}
]
buttonCallbacks: ({
forget: button => {
utils.makePopup(
2019-09-10 10:24:29 +10:00
"Popups/ForgetRoomPopup.qml",
2019-12-09 20:25:31 +11:00
mainUI, // Must not be destroyed with chat
2019-09-10 10:24:29 +10:00
{
2019-12-09 20:25:31 +11:00
userId: chat.userId,
roomId: chat.roomId,
roomName: chat.roomInfo.display_name,
2019-09-10 10:24:29 +10:00
},
obj => {
obj.onOk.connect(() => { button.loading = true })
},
false,
2019-09-10 10:24:29 +10:00
)
2019-07-08 12:19:17 +10:00
}
})
}