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

32 lines
807 B
QML
Raw Normal View History

import QtQuick 2.12
import "../../Base"
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.avatarUrl: chatPage.userInfo.avatar_url
labelText: qsTr("You are not part of this room anymore.")
buttonModel: [
{
name: "forget",
text: qsTr("Forget"),
2019-07-18 18:23:23 +10:00
iconName: "forget-room",
}
]
buttonCallbacks: ({
forget: button => {
button.loading = true
py.callClientCoro(
chatPage.userId, "room_forget", [chatPage.roomId], () => {
button.loading = false
Qt.callLater(pageStack.showPage, "Default")
})
2019-07-08 12:19:17 +10:00
}
})
}