Add member list and settings buttons to spaces (#1051)

* Add member list and settings buttons to spaces

* Un-buttonify the member list button

* Properly button settings *and* members
This commit is contained in:
Loren Burkholder 2022-04-22 19:43:25 -04:00 committed by GitHub
parent c8e8546315
commit 9cf0e3ca55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 6 deletions

View File

@ -10,6 +10,8 @@ import im.nheko 1.0
TextEdit {
id: r
property alias cursorShape: cs.cursorShape
textFormat: TextEdit.RichText
readOnly: true
focus: false
@ -28,6 +30,8 @@ TextEdit {
}
CursorShape {
id: cs
anchors.fill: parent
cursorShape: hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}

View File

@ -10,7 +10,7 @@ import "./emoji"
import "./ui"
import "./voip"
import Qt.labs.platform 1.1 as Platform
import QtQuick 2.9
import QtQuick 2.15
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.3
import QtQuick.Window 2.13
@ -173,16 +173,44 @@ Item {
enabled: false
}
MatrixText {
text: parent.roomName == "" ? qsTr("No preview available") : parent.roomName
font.pixelSize: 24
RowLayout {
spacing: Nheko.paddingMedium
Layout.alignment: Qt.AlignHCenter
MatrixText {
text: preview.roomName == "" ? qsTr("No preview available") : preview.roomName
font.pixelSize: 24
}
ImageButton {
image: ":/icons/icons/ui/settings.svg"
visible: !!room
hoverEnabled: true
ToolTip.visible: hovered
ToolTip.text: qsTr("Settings")
onClicked: TimelineManager.openRoomSettings(room.roomId)
}
}
MatrixText {
RowLayout {
visible: !!room
text: qsTr("%1 member(s)").arg(room ? room.roomMemberCount : 0)
spacing: Nheko.paddingMedium
Layout.alignment: Qt.AlignHCenter
MatrixText {
text: qsTr("%1 member(s)").arg(room ? room.roomMemberCount : 0)
cursorShape: Qt.PointingHandCursor
}
ImageButton {
image: ":/icons/icons/ui/people.svg"
hoverEnabled: true
ToolTip.visible: hovered
ToolTip.text: qsTr("View members of %1").arg(room.roomName)
onClicked: TimelineManager.openRoomMembers(room)
}
}
ScrollView {