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

33 lines
777 B
QML
Raw Normal View History

import QtQuick 2.7
import "../../Base"
Banner {
property string userId: ""
2019-07-08 12:41:32 +10:00
readonly property var userInfo: users.find(userId)
color: theme.chat.leftBanner.background
2019-04-29 01:01:38 +10:00
// TODO: avatar func auto
avatar.userId: userId
2019-07-08 12:41:32 +10:00
avatar.imageUrl: users.find(userId).avatarUrl
labelText: qsTr("You are not part of this room anymore.")
buttonModel: [
{
name: "forget",
text: qsTr("Forget"),
2019-04-27 06:02:20 +10:00
iconName: "forget_room",
}
]
buttonCallbacks: {
"forget": function(button) {
button.loading = true
py.callClientCoro(
chatPage.userId, "room_forget", [chatPage.roomId], {},
2019-07-08 12:19:17 +10:00
function() { button.loading = false }
)
2019-07-08 12:19:17 +10:00
}
}
}