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

35 lines
800 B
QML
Raw Normal View History

2019-07-07 23:52:41 -04: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-07 22:41:32 -04:00
readonly property var userInfo: users.find(userId)
color: theme.chat.leftBanner.background
2019-04-28 11:01:38 -04: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-26 16:02:20 -04:00
iconName: "forget_room",
}
]
buttonCallbacks: ({
forget: button => {
button.loading = true
py.callClientCoro(
chatPage.userId, "room_forget", [chatPage.roomId], () => {
button.loading = false
})
2019-07-07 22:19:17 -04:00
}
})
}