Newer
Older
// SPDX-FileCopyrightText: 2021 Nheko Contributors
import "./delegates"
import "./device-verification"
import "./emoji"
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.3
import QtQuick.Window 2.2
import im.nheko 1.0
Item {
id: timelineView
visible: !room && !TimelineManager.isInitialSync
anchors.centerIn: parent
text: qsTr("No room open")
font.pointSize: 24
color: Nheko.colors.text
visible: running
anchors.centerIn: parent
running: TimelineManager.isInitialSync
// height is somewhat arbitrary here... don't set width because width scales w/ height
height: parent.height / 16
Jedi18
committed
}
ColumnLayout {
id: timelineLayout
showBackButton: timelineView.showBackButton
Rectangle {
Layout.fillWidth: true
height: 1
Rectangle {
id: msgView
Layout.fillWidth: true
Layout.fillHeight: true
color: Nheko.colors.base
ColumnLayout {
anchors.fill: parent
spacing: 0
StackLayout {
id: stackLayout
currentIndex: 0
function onRoomChanged() {
stackLayout.currentIndex = 0;
MessageView {
Layout.fillWidth: true
implicitHeight: msgView.height - typingIndicator.height
Loader {
source: CallManager.isOnCall && CallManager.callType != CallType.VOICE ? "voip/VideoCall.qml" : ""
onLoaded: TimelineManager.setVideoCallItem()
TypingIndicator {
id: typingIndicator
}
CallInviteBar {
id: callInviteBar
Layout.fillWidth: true
z: 3
}
ActiveCallBar {
Layout.fillWidth: true
z: 3
}
Rectangle {
Layout.fillWidth: true
z: 3
height: 1
MessageInput {
NhekoDropArea {
roomid: room ? room.roomId() : ""
}
Connections {
target: room
onOpenRoomSettingsDialog: {
var roomSettings = roomSettingsComponent.createObject(timelineRoot, {
"roomSettings": settings
});
roomSettings.show();
}