2019-07-08 13:52:41 +10:00
|
|
|
// Copyright 2019 miruka
|
|
|
|
// This file is part of harmonyqml, licensed under LGPLv3.
|
|
|
|
|
2019-07-13 19:39:01 +10:00
|
|
|
import QtQuick 2.12
|
2019-04-29 05:18:36 +10:00
|
|
|
import "../../Base"
|
2019-04-22 05:20:20 +10:00
|
|
|
|
|
|
|
Banner {
|
2019-07-07 13:43:51 +10:00
|
|
|
property string userId: ""
|
2019-07-08 12:41:32 +10:00
|
|
|
readonly property var userInfo: users.find(userId)
|
2019-04-22 05:20:20 +10:00
|
|
|
|
2019-07-07 07:50:55 +10:00
|
|
|
color: theme.chat.leftBanner.background
|
2019-04-29 01:01:38 +10:00
|
|
|
|
2019-07-07 13:43:51 +10:00
|
|
|
// TODO: avatar func auto
|
2019-07-07 14:24:23 +10:00
|
|
|
avatar.userId: userId
|
2019-07-07 13:43:51 +10:00
|
|
|
labelText: qsTr("You are not part of this room anymore.")
|
2019-04-22 05:20:20 +10:00
|
|
|
|
|
|
|
buttonModel: [
|
|
|
|
{
|
2019-04-29 04:20:30 +10:00
|
|
|
name: "forget",
|
|
|
|
text: qsTr("Forget"),
|
2019-04-27 06:02:20 +10:00
|
|
|
iconName: "forget_room",
|
2019-04-22 05:20:20 +10:00
|
|
|
}
|
|
|
|
]
|
2019-04-29 04:20:30 +10:00
|
|
|
|
2019-07-18 18:17:35 +10:00
|
|
|
buttonCallbacks: ({
|
|
|
|
forget: button => {
|
2019-04-29 04:20:30 +10:00
|
|
|
button.loading = true
|
2019-07-07 13:43:51 +10:00
|
|
|
py.callClientCoro(
|
2019-07-18 17:13:34 +10:00
|
|
|
chatPage.userId, "room_forget", [chatPage.roomId], () => {
|
2019-07-08 13:38:37 +10:00
|
|
|
button.loading = false
|
|
|
|
})
|
2019-07-08 12:19:17 +10:00
|
|
|
}
|
2019-07-18 18:17:35 +10:00
|
|
|
})
|
2019-04-22 05:20:20 +10:00
|
|
|
}
|