mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-31 16:56:05 +00:00
496d3c8441
Click on "Notification settings" in activity center takes user to profile tab, but not to the notification section there, but to the last selected section. That is fixed now. Also marking selected section within profile section is fixed now. Fixes: #3049
85 lines
2.5 KiB
QML
85 lines
2.5 KiB
QML
import QtQuick 2.13
|
|
import QtQuick.Controls 2.13
|
|
import QtQuick.Layouts 1.13
|
|
import "../../../../imports"
|
|
import "../../../../shared"
|
|
import "./components"
|
|
import "./constants.js" as ProfileConstants
|
|
|
|
ScrollView {
|
|
readonly property int btnheight: 42
|
|
readonly property int w: 340
|
|
property var changeProfileSection: function (sectionId) {
|
|
Config.currentMenuTab = sectionId
|
|
}
|
|
contentHeight: menuItems.height + 24
|
|
|
|
id: profileMenu
|
|
clip: true
|
|
|
|
Column {
|
|
id: menuItems
|
|
spacing: 8
|
|
|
|
Repeater {
|
|
model: ProfileConstants.mainMenuButtons
|
|
delegate: MenuButton {
|
|
menuItemId: modelData.id
|
|
text: modelData .text
|
|
source: "../../../img/profile/" + modelData.filename
|
|
active: Config.currentMenuTab === modelData.id
|
|
Layout.fillWidth: true
|
|
width: profileMenu.width
|
|
onClicked: {
|
|
Config.currentMenuTab = modelData.id
|
|
}
|
|
}
|
|
}
|
|
|
|
StyledText {
|
|
topPadding: 10
|
|
leftPadding: 20
|
|
text: "Settings"
|
|
color: Style.current.secondaryText
|
|
}
|
|
|
|
Repeater {
|
|
model: ProfileConstants.settingsMenuButtons
|
|
delegate: MenuButton {
|
|
menuItemId: modelData.id
|
|
text: modelData .text
|
|
source: "../../../img/profile/" + modelData.filename
|
|
active: Config.currentMenuTab === modelData.id
|
|
visible: modelData.ifEnabled !== "browser" || appSettings.isBrowserEnabled
|
|
Layout.fillWidth: true
|
|
width: profileMenu.width
|
|
onClicked: function () {
|
|
Config.currentMenuTab = modelData.id
|
|
}
|
|
}
|
|
}
|
|
|
|
StyledText {
|
|
text: " "
|
|
}
|
|
|
|
Repeater {
|
|
model: ProfileConstants.extraMenuButtons
|
|
delegate: MenuButton {
|
|
menuItemId: modelData.id
|
|
text: modelData.text
|
|
source: "../../../img/profile/" + modelData.filename
|
|
active: Config.currentMenuTab === modelData.id
|
|
Layout.fillWidth: true
|
|
width: profileMenu.width
|
|
onClicked: function () {
|
|
if (modelData.function === "exit") {
|
|
return Qt.quit()
|
|
}
|
|
Config.currentMenuTab = modelData.id
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|