2021-10-06 09:16:39 +00:00
import QtQuick 2.13
import QtQuick . Controls 2.13
import StatusQ . Components 0.1
import utils 1.0
2021-10-27 21:27:49 +00:00
import shared 1.0
import shared . popups 1.0
2021-10-06 09:16:39 +00:00
import "../panels"
Item {
property var store
StatusNavigationPanelHeadline {
id: title
text: qsTr ( "Settings" )
anchors.top: parent . top
anchors.topMargin: Style . current . padding
anchors.horizontalCenter: parent . horizontalCenter
}
ScrollView {
2022-05-31 13:32:39 +00:00
contentWidth: availableWidth
2021-10-06 09:16:39 +00:00
contentHeight: profileMenu . height + 24
anchors.right: parent . right
anchors.rightMargin: Style . current . smallPadding
anchors.left: parent . left
anchors.leftMargin: Style . current . smallPadding
anchors.top: title . bottom
anchors.topMargin: Style . current . padding
anchors.bottom: parent . bottom
2022-05-31 13:32:39 +00:00
clip: true
ScrollBar.horizontal.policy: ScrollBar . AlwaysOff
2021-10-06 09:16:39 +00:00
MenuPanel {
id: profileMenu
2021-12-30 12:39:47 +00:00
privacyStore: store . privacyStore
2022-03-07 20:34:59 +00:00
messagingStore: store . messagingStore
2021-10-06 09:16:39 +00:00
mainMenuItems: store . mainMenuItems
settingsMenuItems: store . settingsMenuItems
extraMenuItems: store . extraMenuItems
2022-02-11 09:44:49 +00:00
appsMenuItems: store . appsMenuItems
2021-10-06 09:16:39 +00:00
browserMenuItemEnabled: store . browserMenuItemEnabled
2022-03-07 20:34:59 +00:00
walletMenuItemEnabled: store . walletMenuItemEnabled
2022-03-23 10:56:25 +00:00
2021-10-06 09:16:39 +00:00
onMenuItemClicked: {
2022-05-26 13:40:41 +00:00
if ( menu_item . subsection === Constants . settingsSubsection . backUpSeed ) {
Global . openBackUpSeedPopup ( ) ;
} else {
if ( menu_item . subsection === Constants . settingsSubsection . signout ) {
return confirmDialog . open ( ) ;
}
Global . settingsSubsection = menu_item . subsection ;
2021-10-06 09:16:39 +00:00
}
}
}
}
ConfirmationDialog {
id: confirmDialog
header.title: qsTr ( "Sign out" )
confirmationText: qsTr ( "Make sure you have your account password and seed phrase stored. Without them you can lock yourself out of your account and lose funds." )
confirmButtonLabel: qsTr ( "Sign out & Quit" )
onConfirmButtonClicked: {
Qt . quit ( )
}
}
}