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