Move the "Explore rooms" button from the hamburger to the space drawer
I think we should put this feature in a more obvious place (and similar to other chat applications.) Instead of it being buried underneath a menu, joining spaces/rooms should have the space promenience as creating them - you're going to be more likely to access this dialog more anyway.
This commit is contained in:
@@ -78,21 +78,6 @@ RowLayout {
|
|||||||
Component {
|
Component {
|
||||||
id: menu
|
id: menu
|
||||||
QQC2.Menu {
|
QQC2.Menu {
|
||||||
QQC2.MenuItem {
|
|
||||||
text: i18n("Explore rooms")
|
|
||||||
icon.name: "compass"
|
|
||||||
onTriggered: {
|
|
||||||
let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage'), {
|
|
||||||
connection: root.connection
|
|
||||||
}, {
|
|
||||||
title: i18nc("@title", "Explore Rooms")
|
|
||||||
});
|
|
||||||
dialog.roomSelected.connect((roomId, displayName, avatarUrl, alias, topic, memberCount, isJoined) => {
|
|
||||||
RoomManager.resolveResource(roomId.length > 0 ? roomId : alias, isJoined ? "" : "join");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QQC2.MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18n("Find your friends")
|
text: i18n("Find your friends")
|
||||||
icon.name: "list-add-user"
|
icon.name: "list-add-user"
|
||||||
|
|||||||
@@ -275,6 +275,31 @@ QQC2.Control {
|
|||||||
title: i18nc("@title", "Create a Space")
|
title: i18nc("@title", "Create a Space")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AvatarTabButton {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: width - Kirigami.Units.smallSpacing
|
||||||
|
Layout.maximumHeight: width - Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
|
text: i18nc("@action:button", "Explore rooms")
|
||||||
|
contentItem: Kirigami.Icon {
|
||||||
|
source: "compass"
|
||||||
|
}
|
||||||
|
|
||||||
|
activeFocusOnTab: true
|
||||||
|
|
||||||
|
onSelected: {
|
||||||
|
let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage'), {
|
||||||
|
connection: root.connection,
|
||||||
|
keyword: RoomManager.sortFilterRoomTreeModel.filterText
|
||||||
|
}, {
|
||||||
|
title: i18nc("@title", "Explore Rooms")
|
||||||
|
});
|
||||||
|
dialog.roomSelected.connect((roomId, displayName, avatarUrl, alias, topic, memberCount, isJoined) => {
|
||||||
|
RoomManager.resolveResource(roomId.length > 0 ? roomId : alias, isJoined ? "" : "join");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user