moment/harmonyqml/components/Chat/Chat.qml
miruka 3299aefaf1 Fix Engine.app_dir and leftover Backend.pdb()
Use __file__ instead of sys.argv[0] to determine the current script's
path, which works correctly when importing the package from another dir
2019-05-01 01:32:06 -04:00

42 lines
799 B
QML

import QtQuick 2.7
import "../Base"
import "Banners"
import "RoomEventList"
HColumnLayout {
property string userId: ""
property string roomId: ""
readonly property var roomInfo:
Backend.models.rooms.get(userId).get(roomId)
property bool canLoadPastEvents: true
id: chatPage
onFocusChanged: sendBox.setFocus()
RoomHeader {
displayName: roomInfo.displayName
topic: roomInfo.topic || ""
}
RoomEventList {}
TypingUsersBar {}
InviteBanner {
visible: roomInfo.category === "Invites"
inviter: roomInfo.inviter
}
SendBox {
id: sendBox
visible: roomInfo.category === "Rooms"
}
LeftBanner {
visible: roomInfo.category === "Left"
leftEvent: roomInfo.leftEvent
}
}