summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-06-18 16:22:06 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-06-25 11:34:19 +0200
commit884fb74d2d1386c7355a709b3972619f5bd0f78a (patch)
treece4fb2ddd2cc57a1c3a254d2312bdecf9e664b4a /resources
parentFix off by 1 in previousRoom condition (diff)
downloadnheko-884fb74d2d1386c7355a709b3972619f5bd0f78a.tar.xz
Add a basic 'Space page'
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/ChatPage.qml2
-rw-r--r--resources/qml/RoomList.qml2
-rw-r--r--resources/qml/TimelineView.qml63
3 files changed, 64 insertions, 3 deletions
diff --git a/resources/qml/ChatPage.qml b/resources/qml/ChatPage.qml

index df2bf41f..cd323a97 100644 --- a/resources/qml/ChatPage.qml +++ b/resources/qml/ChatPage.qml
@@ -71,7 +71,7 @@ Rectangle { AdaptiveLayoutElement { id: timlineViewC - minimumWidth: fontMetrics.averageCharacterWidth * 40 + Nheko.avatarSize + 2* Nheko.paddingMedium + minimumWidth: fontMetrics.averageCharacterWidth * 40 + Nheko.avatarSize + 2 * Nheko.paddingMedium TimelineView { id: timeline diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml
index 99e0ed41..d69f608b 100644 --- a/resources/qml/RoomList.qml +++ b/resources/qml/RoomList.qml
@@ -254,9 +254,9 @@ Page { Label { id: timestamp + visible: !model.isInvite && !model.isSpace width: visible ? 0 : undefined - Layout.alignment: Qt.AlignRight | Qt.AlignBottom font.pixelSize: fontMetrics.font.pixelSize * 0.9 color: roomItem.unimportantText diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 90e28166..703f2fac 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml
@@ -41,7 +41,8 @@ Item { ColumnLayout { id: timelineLayout - visible: room != null + visible: room != null && !room.isSpace + enabled: visible anchors.fill: parent spacing: 0 @@ -127,6 +128,66 @@ Item { } + ColumnLayout { + id: contentLayout1 + + visible: room != null && room.isSpace + enabled: visible + anchors.fill: parent + anchors.margins: Nheko.paddingLarge + spacing: Nheko.paddingLarge + + Avatar { + url: room.roomAvatarUrl.replace("mxc://", "image://MxcImage/") + displayName: room ? room.roomName : "" + height: 130 + width: 130 + Layout.alignment: Qt.AlignHCenter + enabled: false + } + + MatrixText { + text: room ? room.roomName : "" + font.pixelSize: 24 + Layout.alignment: Qt.AlignHCenter + } + + MatrixText { + text: qsTr("%1 member(s)").arg(room ? room.roomMemberCount : 0) + Layout.alignment: Qt.AlignHCenter + } + + ScrollView { + //Layout.maximumHeight: 75 + Layout.alignment: Qt.AlignHCenter + width: parent.width + + TextArea { + text: TimelineManager.escapeEmoji(room ? room.roomTopic : "") + wrapMode: TextEdit.WordWrap + textFormat: TextEdit.RichText + readOnly: true + background: null + selectByMouse: true + color: Nheko.colors.text + horizontalAlignment: TextEdit.AlignHCenter + onLinkActivated: Nheko.openLink(link) + + CursorShape { + anchors.fill: parent + cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor + } + + } + + } + + Item { + Layout.fillHeight: true + } + + } + NhekoDropArea { anchors.fill: parent roomid: room ? room.roomId() : ""