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

42 lines
1.1 KiB
QML
Raw Normal View History

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