mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-12-01 14:58:47 +03:00
Simplify room details access
This removes the redundant room name property
This commit is contained in:
parent
908629bec0
commit
59a2630be7
3 changed files with 4 additions and 6 deletions
|
@ -56,7 +56,6 @@ ApplicationWindow {
|
||||||
id: inviteeEntry
|
id: inviteeEntry
|
||||||
|
|
||||||
placeholderText: qsTr("@joe:matrix.org", "Example user id. The name 'joe' can be localized however you want.")
|
placeholderText: qsTr("@joe:matrix.org", "Example user id. The name 'joe' can be localized however you want.")
|
||||||
backgroundColor: colors.window
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onAccepted: if (text !== "") addInvite()
|
onAccepted: if (text !== "") addInvite()
|
||||||
Component.onCompleted: forceActiveFocus()
|
Component.onCompleted: forceActiveFocus()
|
||||||
|
|
|
@ -7,10 +7,9 @@ import im.nheko 1.0
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: roomMembersRoot
|
id: roomMembersRoot
|
||||||
|
|
||||||
property string roomName: Rooms.currentRoom.roomName
|
|
||||||
property MemberList members
|
property MemberList members
|
||||||
|
|
||||||
title: qsTr("Members of ") + roomName
|
title: qsTr("Members of ") + members.roomName
|
||||||
x: MainWindow.x + (MainWindow.width / 2) - (width / 2)
|
x: MainWindow.x + (MainWindow.width / 2) - (width / 2)
|
||||||
y: MainWindow.y + (MainWindow.height / 2) - (height / 2)
|
y: MainWindow.y + (MainWindow.height / 2) - (height / 2)
|
||||||
height: 650
|
height: 650
|
||||||
|
@ -40,7 +39,7 @@ ApplicationWindow {
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
font.pixelSize: 24
|
font.pixelSize: 24
|
||||||
text: members.memberCount + (members.memberCount === 1 ? qsTr(" person in ") : qsTr(" people in ")) + roomName
|
text: members.memberCount + (members.memberCount === 1 ? qsTr(" person in ") : qsTr(" people in ")) + members.roomName
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,12 +111,12 @@ Rectangle {
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
visible: room ? room.permissions.canInvite() : false
|
visible: room ? room.permissions.canInvite() : false
|
||||||
text: qsTr("Invite users")
|
text: qsTr("Invite users")
|
||||||
onTriggered: TimelineManager.timeline.openInviteUsers()
|
onTriggered: Rooms.currentRoom.openInviteUsers()
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
text: qsTr("Members")
|
text: qsTr("Members")
|
||||||
onTriggered: Rooms.currentRoom.openRoomMembers(room.roomId())
|
onTriggered: Rooms.currentRoom.openRoomMembers()
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
|
|
Loading…
Reference in a new issue