2020-07-21 21:03:22 +00:00
|
|
|
import QtQuick 2.13
|
2022-03-28 09:38:58 +00:00
|
|
|
import QtQuick.Controls 2.3
|
2020-07-21 21:03:22 +00:00
|
|
|
import QtQuick.Layouts 1.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared 1.0
|
|
|
|
import shared.panels 1.0
|
|
|
|
import shared.popups 1.0
|
2022-03-16 21:20:03 +00:00
|
|
|
import shared.controls.chat 1.0
|
2020-07-21 21:03:22 +00:00
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
import "../popups"
|
2021-12-30 12:39:47 +00:00
|
|
|
import "../stores"
|
2022-06-22 12:16:21 +00:00
|
|
|
import "../controls"
|
|
|
|
import "./profile"
|
2021-10-06 09:16:39 +00:00
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
2021-09-09 14:03:17 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Components 0.1
|
2021-10-18 10:34:16 +00:00
|
|
|
import StatusQ.Controls 0.1
|
2021-09-09 14:03:17 +00:00
|
|
|
|
2022-05-07 11:45:15 +00:00
|
|
|
SettingsContentBase {
|
2021-10-06 09:16:39 +00:00
|
|
|
id: root
|
|
|
|
|
2022-06-22 12:16:21 +00:00
|
|
|
property WalletStore walletStore
|
2021-12-30 12:39:47 +00:00
|
|
|
property ProfileStore profileStore
|
2022-06-22 12:16:21 +00:00
|
|
|
property PrivacyStore privacyStore
|
|
|
|
|
|
|
|
titleRowComponentLoader.sourceComponent: StatusButton {
|
|
|
|
text: qsTr("Change Password")
|
|
|
|
onClicked: changePasswordModal.open()
|
2022-09-26 11:57:32 +00:00
|
|
|
enabled: !userProfile.isKeycardUser
|
2022-06-22 12:16:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dirty: settingsView.dirty
|
|
|
|
saveChangesButtonEnabled: settingsView.valid
|
|
|
|
|
|
|
|
onResetChangesClicked: settingsView.reset()
|
|
|
|
onSaveChangesClicked: settingsView.save()
|
2020-07-21 21:03:22 +00:00
|
|
|
|
2022-05-07 11:45:15 +00:00
|
|
|
ColumnLayout {
|
2022-06-22 12:16:21 +00:00
|
|
|
id: layout
|
2022-05-07 11:45:15 +00:00
|
|
|
spacing: Constants.settingsSection.itemSpacing
|
|
|
|
width: root.contentWidth
|
2020-07-21 21:03:22 +00:00
|
|
|
|
2022-06-22 12:16:21 +00:00
|
|
|
StatusTabBar {
|
|
|
|
id: editPreviwTabBar
|
2022-05-07 11:45:15 +00:00
|
|
|
Layout.fillWidth: true
|
2020-07-21 21:03:22 +00:00
|
|
|
|
2022-06-22 12:16:21 +00:00
|
|
|
StatusTabButton {
|
|
|
|
width: implicitWidth
|
|
|
|
text: qsTr("Edit")
|
2022-05-07 11:45:15 +00:00
|
|
|
}
|
2022-06-22 12:16:21 +00:00
|
|
|
StatusTabButton {
|
|
|
|
width: implicitWidth
|
|
|
|
text: qsTr("Preview")
|
2022-05-07 11:45:15 +00:00
|
|
|
}
|
2020-07-21 21:03:22 +00:00
|
|
|
}
|
|
|
|
|
2022-06-22 12:16:21 +00:00
|
|
|
StackLayout {
|
2022-05-07 11:45:15 +00:00
|
|
|
Layout.fillWidth: true
|
2022-06-22 12:16:21 +00:00
|
|
|
currentIndex: editPreviwTabBar.currentIndex
|
2020-07-21 21:03:22 +00:00
|
|
|
|
2022-06-22 12:16:21 +00:00
|
|
|
MyProfileSettingsView {
|
|
|
|
id: settingsView
|
|
|
|
Layout.fillWidth: true
|
|
|
|
profileStore: root.profileStore
|
|
|
|
privacyStore: root.privacyStore
|
|
|
|
walletStore: root.walletStore
|
2022-05-07 11:45:15 +00:00
|
|
|
}
|
2022-03-16 21:20:03 +00:00
|
|
|
|
2022-06-22 12:16:21 +00:00
|
|
|
MyProfilePreview {
|
|
|
|
id: profilePreview
|
|
|
|
Layout.fillWidth: true
|
|
|
|
profileStore: root.profileStore
|
2022-05-07 11:45:15 +00:00
|
|
|
}
|
2022-03-16 21:20:03 +00:00
|
|
|
}
|
|
|
|
|
2022-06-22 12:16:21 +00:00
|
|
|
ChangePasswordModal {
|
|
|
|
id: changePasswordModal
|
|
|
|
privacyStore: root.privacyStore
|
|
|
|
anchors.centerIn: parent
|
|
|
|
onPasswordChanged: successPopup.open()
|
2020-07-21 21:03:22 +00:00
|
|
|
}
|
|
|
|
|
2022-06-22 12:16:21 +00:00
|
|
|
ChangePasswordSuccessModal {
|
|
|
|
id: successPopup
|
|
|
|
anchors.centerIn: parent
|
2020-08-19 21:01:22 +00:00
|
|
|
}
|
|
|
|
}
|
2020-07-21 21:03:22 +00:00
|
|
|
}
|