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
avatar.userId: chatPage.userId
avatar.displayName: chatPage.userInfo.display_name
avatar.mxc: 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",
mainUI, // Must not be destroyed with chatPage
2019-09-10 10:24:29 +10:00
{
userId: chatPage.userId,
roomId: chatPage.roomId,
roomName: chatPage.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
}
})
}