import QtQuick 2.10
import QtQuick.Controls 2.3
import QtGraphicalEffects 1.0
import QtQuick.Shapes 1.0
import trinity.matrix 1.0
Rectangle {
id: roomDirectory
color: myPalette.window
width: 700
height: parent.height
anchors.horizontalCenter: parent.horizontalCenter
color: "transparent"
BackButton {
id: backButton
anchors.top: parent.top
anchors.topMargin: 15
anchors.right: parent.right
}
Text {
id: directoryLabel
text: "Directory"
font.pointSize: 25
font.bold: true
color: myPalette.text
TextEdit {
id: serverEdit
anchors.top: directoryLabel.bottom
anchors.topMargin: 10
width: parent.width
onEditingFinished: matrix.loadDirectory(text)
ListView {
height: parent.height - backButton.height
anchors.top: serverEdit.bottom
model: matrix.publicRooms
clip: true
delegate: Rectangle {
height: 40 + roomTopic.contentHeight
RoundedImage {
id: roomAvatar
width: 32
height: 32
source: avatarURL
id: roomName
anchors.left: roomAvatar.right
anchors.leftMargin: 15
text: alias
id: roomTopic
anchors.top: roomName.bottom
anchors.topMargin: 5
text: topic
wrapMode: Text.Wrap
MouseArea {
anchors.fill: parent
onClicked: {
matrix.joinRoom(id)
stack.pop()