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

41 lines
1.1 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
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 => {
2019-09-10 10:24:29 +10:00
Utils.makePopup(
"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
}
})
}