Add "Add another account" entry to settings menu

To do: replace the bottom-left "add account" button by something else,
move the corresponding keybind code away
This commit is contained in:
miruka 2021-03-06 17:29:59 -04:00
parent 4cf3a69a92
commit 03349ae33f
2 changed files with 12 additions and 0 deletions

View File

@ -44,6 +44,7 @@ HDrawer {
anchors.fill: parent anchors.fill: parent
TopBar { TopBar {
roomList: roomList
Layout.fillWidth: true Layout.fillWidth: true
} }

View File

@ -7,6 +7,8 @@ import ".."
import "../Base" import "../Base"
Rectangle { Rectangle {
property RoomList roomList
clip: true clip: true
implicitHeight: theme.baseElementsHeight implicitHeight: theme.baseElementsHeight
color: theme.mainPane.topBar.background color: theme.mainPane.topBar.background
@ -25,6 +27,15 @@ Rectangle {
id: settingsMenu id: settingsMenu
y: parent.height y: parent.height
HMenuItem {
icon.name: "add-account"
text: qsTr("Add another account")
onTriggered: {
pageLoader.show("Pages/AddAccount/AddAccount.qml")
roomList.startCorrectItemSearch()
}
}
HMenuItem { HMenuItem {
icon.name: "more-settings" icon.name: "more-settings"
text: qsTr("Open configuration folder") text: qsTr("Open configuration folder")