Add a basic 'Space page'
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() : ""
|