2024-10-15 19:26:12 +00:00
import QtQuick 2.15
2022-07-13 12:29:38 +00:00
2021-10-06 09:16:39 +00:00
import StatusQ . Components 0.1
2024-10-31 12:41:52 +00:00
import StatusQ . Core . Theme 0.1
2021-10-06 09:16:39 +00:00
2022-07-13 12:29:38 +00:00
import utils 1.0
2021-10-27 21:27:49 +00:00
import shared . popups 1.0
2022-07-13 12:29:38 +00:00
2024-10-31 12:41:52 +00:00
import AppLayouts . Profile . controls 1.0
2021-10-06 09:16:39 +00:00
Item {
2022-06-22 12:16:21 +00:00
id: root
2021-10-06 09:16:39 +00:00
2024-10-31 12:41:52 +00:00
property alias model: settingsList . model
2021-10-06 09:16:39 +00:00
2022-06-22 12:16:21 +00:00
signal menuItemClicked ( var event )
2024-10-31 12:41:52 +00:00
property alias settingsSubsection: settingsList . currenctSubsection
2024-10-18 21:43:29 +00:00
2021-10-06 09:16:39 +00:00
StatusNavigationPanelHeadline {
id: title
text: qsTr ( "Settings" )
anchors.top: parent . top
2024-10-15 19:26:12 +00:00
anchors.topMargin: Theme . padding
2022-08-09 09:31:57 +00:00
anchors.left: parent . left
2024-10-15 19:26:12 +00:00
anchors.leftMargin: Theme . bigPadding
2021-10-06 09:16:39 +00:00
}
2024-10-31 12:41:52 +00:00
SettingsList {
id: settingsList
2021-10-06 09:16:39 +00:00
anchors.right: parent . right
anchors.left: parent . left
anchors.top: title . bottom
anchors.bottom: parent . bottom
2024-10-31 12:41:52 +00:00
anchors.topMargin: Theme . bigPadding
anchors.bottomMargin: Theme . padding
leftMargin: Theme . halfPadding
rightMargin: Theme . padding
bottomMargin: Theme . bigPadding
onClicked: {
if ( subsection === Constants . settingsSubsection . backUpSeed ) {
Global . openBackUpSeedPopup ( )
return
2021-10-06 09:16:39 +00:00
}
2024-10-31 12:41:52 +00:00
const event = { accepted: false , item: subsection } ;
root . menuItemClicked ( event )
if ( event . accepted )
return
if ( subsection === Constants . settingsSubsection . signout )
return confirmDialog . open ( )
root . settingsSubsection = subsection
2021-10-06 09:16:39 +00:00
}
}
ConfirmationDialog {
id: confirmDialog
2022-08-10 10:57:21 +00:00
confirmButtonObjectName: "signOutConfirmation"
2023-05-23 12:46:16 +00:00
headerSettings.title: qsTr ( "Sign out" )
2021-10-06 09:16:39 +00:00
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" )
2024-10-31 12:41:52 +00:00
onConfirmButtonClicked: Qt . quit ( )
2021-10-06 09:16:39 +00:00
}
}