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

35 lines
800 B
QML
Raw Normal View History

2019-07-08 13:52:41 +10:00
// Copyright 2019 miruka
// This file is part of harmonyqml, licensed under LGPLv3.
import QtQuick 2.12
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
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: button => {
button.loading = true
py.callClientCoro(
chatPage.userId, "room_forget", [chatPage.roomId], () => {
button.loading = false
})
2019-07-08 12:19:17 +10:00
}
})
}