2023-09-22 10:08:28 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
2024-02-07 09:54:45 +00:00
|
|
|
import QtQuick.Window 2.15
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared 1.0
|
2022-06-03 10:48:03 +00:00
|
|
|
import shared.panels 1.0
|
2024-02-09 11:31:37 +00:00
|
|
|
import shared.stores 1.0 as SharedStores
|
2023-08-25 09:05:05 +00:00
|
|
|
import shared.popups.keycard 1.0
|
2023-11-28 19:16:18 +00:00
|
|
|
import shared.stores.send 1.0
|
2021-10-06 09:16:39 +00:00
|
|
|
|
2024-03-27 10:44:49 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
2023-07-18 09:10:48 +00:00
|
|
|
import AppLayouts.Wallet.controls 1.0
|
2023-10-26 21:11:20 +00:00
|
|
|
import AppLayouts.Wallet.stores 1.0
|
2023-07-18 09:10:48 +00:00
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
import "stores"
|
|
|
|
import "popups"
|
|
|
|
import "views"
|
2024-02-07 09:54:45 +00:00
|
|
|
import "views/profile"
|
2020-05-19 19:44:45 +00:00
|
|
|
|
2024-04-17 08:02:02 +00:00
|
|
|
import StatusQ 0.1
|
2023-08-25 09:05:05 +00:00
|
|
|
import StatusQ.Core 0.1
|
2021-06-16 11:15:28 +00:00
|
|
|
import StatusQ.Layout 0.1
|
2022-05-07 11:45:15 +00:00
|
|
|
import StatusQ.Controls 0.1
|
2023-08-25 09:05:05 +00:00
|
|
|
import StatusQ.Popups.Dialog 0.1
|
2023-09-22 10:08:28 +00:00
|
|
|
import StatusQ.Core.Utils 0.1 as SQUtils
|
2021-06-16 11:15:28 +00:00
|
|
|
|
2024-04-17 08:02:02 +00:00
|
|
|
import SortFilterProxyModel 0.2
|
2024-05-22 08:13:39 +00:00
|
|
|
import AppLayouts.stores 1.0 as AppLayoutsStores
|
2024-10-16 07:56:23 +00:00
|
|
|
import AppLayouts.Communities.stores 1.0 as CommunitiesStore
|
2024-04-17 08:02:02 +00:00
|
|
|
|
2022-08-09 15:08:39 +00:00
|
|
|
StatusSectionLayout {
|
|
|
|
id: root
|
2021-06-16 11:15:28 +00:00
|
|
|
|
2024-10-18 21:43:29 +00:00
|
|
|
property alias settingsSubsection: profileContainer.currentIndex
|
2024-10-18 22:50:21 +00:00
|
|
|
property int settingsSubSubsection
|
2024-10-18 21:43:29 +00:00
|
|
|
|
2023-11-16 08:11:18 +00:00
|
|
|
objectName: "profileStatusSectionLayout"
|
|
|
|
|
2024-10-02 20:47:14 +00:00
|
|
|
property SharedStores.RootStore sharedRootStore
|
2024-10-21 22:01:34 +00:00
|
|
|
property SharedStores.UtilsStore utilsStore
|
2021-12-30 12:39:47 +00:00
|
|
|
property ProfileSectionStore store
|
2024-05-22 08:13:39 +00:00
|
|
|
property AppLayoutsStores.RootStore globalStore
|
2024-10-16 07:56:23 +00:00
|
|
|
property CommunitiesStore.CommunitiesStore communitiesStore
|
2024-10-03 13:14:27 +00:00
|
|
|
required property var sendModalPopup
|
2021-12-09 13:28:02 +00:00
|
|
|
property var systemPalette
|
2022-03-10 17:01:17 +00:00
|
|
|
property var emojiPopup
|
2024-05-22 08:13:39 +00:00
|
|
|
property SharedStores.NetworkConnectionStore networkConnectionStore
|
2023-10-26 21:11:20 +00:00
|
|
|
required property TokensStore tokensStore
|
2024-01-13 03:24:57 +00:00
|
|
|
required property WalletAssetsStore walletAssetsStore
|
2024-01-29 18:02:59 +00:00
|
|
|
required property CollectiblesStore collectiblesStore
|
2024-02-09 11:31:37 +00:00
|
|
|
required property SharedStores.CurrenciesStore currencyStore
|
2024-10-21 22:01:34 +00:00
|
|
|
|
2024-07-19 12:15:50 +00:00
|
|
|
required property bool isCentralizedMetricsEnabled
|
2021-12-09 13:28:02 +00:00
|
|
|
|
2022-09-13 16:17:54 +00:00
|
|
|
backButtonName: root.store.backButtonName
|
2022-10-26 16:00:20 +00:00
|
|
|
notificationCount: activityCenterStore.unreadNotificationsCount
|
2023-02-07 15:53:56 +00:00
|
|
|
hasUnseenNotifications: activityCenterStore.hasUnseenNotifications
|
2022-10-18 09:06:18 +00:00
|
|
|
|
2022-08-09 15:08:39 +00:00
|
|
|
onNotificationButtonClicked: Global.openActivityCenterPopup()
|
2022-09-13 16:17:54 +00:00
|
|
|
onBackButtonClicked: {
|
2024-10-18 21:43:29 +00:00
|
|
|
switch (root.settingsSubsection) {
|
2022-10-18 09:06:18 +00:00
|
|
|
case Constants.settingsSubsection.contacts:
|
2022-09-13 16:17:54 +00:00
|
|
|
Global.changeAppSectionBySectionType(Constants.appSection.profile, Constants.settingsSubsection.messaging)
|
|
|
|
break;
|
2023-09-22 10:08:28 +00:00
|
|
|
case Constants.settingsSubsection.about_privacy:
|
|
|
|
case Constants.settingsSubsection.about_terms:
|
|
|
|
Global.changeAppSectionBySectionType(Constants.appSection.profile, Constants.settingsSubsection.about)
|
|
|
|
break;
|
2022-10-18 09:06:18 +00:00
|
|
|
case Constants.settingsSubsection.wallet:
|
2022-12-14 13:59:14 +00:00
|
|
|
walletView.item.resetStack()
|
2022-09-13 16:17:54 +00:00
|
|
|
break;
|
2022-10-11 12:15:33 +00:00
|
|
|
case Constants.settingsSubsection.keycard:
|
2022-12-14 13:59:14 +00:00
|
|
|
keycardView.item.handleBackAction()
|
2022-10-11 12:15:33 +00:00
|
|
|
break;
|
2022-09-13 16:17:54 +00:00
|
|
|
}
|
2024-10-18 22:50:21 +00:00
|
|
|
|
|
|
|
root.settingsSubSubsection = -1
|
2022-09-13 16:17:54 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Component.onCompleted: {
|
2024-10-18 21:43:29 +00:00
|
|
|
profileContainer.currentIndexChanged()
|
2023-06-15 08:53:35 +00:00
|
|
|
root.store.devicesStore.loadDevices() // Load devices to get non-paired number for badge
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
|
|
|
|
2021-12-09 13:28:02 +00:00
|
|
|
QtObject {
|
2022-05-07 11:45:15 +00:00
|
|
|
id: d
|
|
|
|
|
|
|
|
readonly property int contentWidth: 560
|
2024-02-07 09:54:45 +00:00
|
|
|
readonly property int rightPanelWidth: 768
|
|
|
|
|
|
|
|
readonly property bool isProfilePanelActive: profileContainer.currentIndex === Constants.settingsSubsection.profile
|
|
|
|
readonly property bool sideBySidePreviewAvailable: root.Window.width >= 1840 // design
|
2024-03-15 16:10:42 +00:00
|
|
|
|
|
|
|
// Used to alternatively add an error message to the dirty bubble if ephemeral notification
|
|
|
|
// can clash at smaller viewports
|
|
|
|
readonly property bool toastClashesWithDirtyBubble: root.Window.width <= 1650 // design
|
2021-12-09 13:28:02 +00:00
|
|
|
}
|
|
|
|
|
2023-07-18 09:10:48 +00:00
|
|
|
headerBackground: AccountHeaderGradient {
|
|
|
|
width: parent.width
|
|
|
|
overview: root.store.walletStore.selectedAccount
|
|
|
|
visible: profileContainer.currentIndex === Constants.settingsSubsection.wallet && !!root.store.walletStore.selectedAccount
|
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
leftPanel: LeftTabView {
|
2022-08-09 15:08:39 +00:00
|
|
|
store: root.store
|
2021-10-06 09:16:39 +00:00
|
|
|
anchors.fill: parent
|
2022-06-22 12:16:21 +00:00
|
|
|
onMenuItemClicked: {
|
2023-11-17 14:08:43 +00:00
|
|
|
if (profileContainer.currentItem.dirty && !profileContainer.currentItem.ignoreDirty) {
|
2022-06-22 12:16:21 +00:00
|
|
|
event.accepted = true;
|
|
|
|
profileContainer.currentItem.notifyDirty();
|
|
|
|
}
|
|
|
|
}
|
2024-10-18 21:43:29 +00:00
|
|
|
|
|
|
|
onSettingsSubsectionChanged: root.settingsSubsection = settingsSubsection
|
|
|
|
|
|
|
|
Binding on settingsSubsection {
|
|
|
|
value: root.settingsSubsection
|
|
|
|
}
|
2020-05-19 19:44:45 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
centerPanel: StackLayout {
|
|
|
|
id: profileContainer
|
2022-03-16 21:20:03 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
readonly property var currentItem: (currentIndex >= 0 && currentIndex < children.length) ? children[currentIndex].item : null
|
2022-06-22 12:16:21 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
anchors.fill: parent
|
2024-03-08 17:03:44 +00:00
|
|
|
anchors.leftMargin: Constants.settingsSection.leftMargin
|
2022-12-14 13:59:14 +00:00
|
|
|
|
|
|
|
onCurrentIndexChanged: {
|
2023-01-24 17:31:20 +00:00
|
|
|
if (!!children[currentIndex] && !children[currentIndex].active)
|
2022-12-14 13:59:14 +00:00
|
|
|
children[currentIndex].active = true
|
|
|
|
|
|
|
|
root.store.backButtonName = ""
|
|
|
|
|
2023-05-01 20:32:36 +00:00
|
|
|
if (currentIndex === Constants.settingsSubsection.contacts) {
|
2022-12-14 13:59:14 +00:00
|
|
|
root.store.backButtonName = root.store.getNameForSubsection(Constants.settingsSubsection.messaging)
|
2023-09-22 10:08:28 +00:00
|
|
|
} else if (currentIndex === Constants.settingsSubsection.about_privacy || currentIndex === Constants.settingsSubsection.about_terms) {
|
|
|
|
root.store.backButtonName = root.store.getNameForSubsection(Constants.settingsSubsection.about)
|
2022-12-14 13:59:14 +00:00
|
|
|
} else if (currentIndex === Constants.settingsSubsection.wallet) {
|
|
|
|
walletView.item.resetStack()
|
|
|
|
} else if (currentIndex === Constants.settingsSubsection.keycard) {
|
|
|
|
keycardView.item.handleBackAction()
|
2022-05-07 11:45:15 +00:00
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2020-07-21 21:03:22 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: MyProfileView {
|
2024-03-29 11:43:49 +00:00
|
|
|
id: myProfileView
|
2022-06-03 15:32:03 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2022-03-07 20:34:59 +00:00
|
|
|
|
2022-08-09 15:08:39 +00:00
|
|
|
profileStore: root.store.profileStore
|
2022-09-27 21:26:26 +00:00
|
|
|
contactsStore: root.store.contactsStore
|
2024-10-16 07:56:23 +00:00
|
|
|
communitiesStore: root.communitiesStore
|
2024-10-21 22:01:34 +00:00
|
|
|
utilsStore: root.utilsStore
|
2024-10-16 07:56:23 +00:00
|
|
|
|
2024-03-29 11:43:49 +00:00
|
|
|
sendToAccountEnabled: root.networkConnectionStore.sendBuyBridgeEnabled
|
2022-08-09 15:08:39 +00:00
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.profile)
|
2022-05-07 11:45:15 +00:00
|
|
|
contentWidth: d.contentWidth
|
2024-02-07 09:54:45 +00:00
|
|
|
sideBySidePreview: d.sideBySidePreviewAvailable
|
2024-03-15 16:10:42 +00:00
|
|
|
toastClashesWithDirtyBubble: d.toastClashesWithDirtyBubble
|
2024-03-29 11:43:49 +00:00
|
|
|
|
|
|
|
communitiesShowcaseModel: root.store.ownShowcaseCommunitiesModel
|
|
|
|
accountsShowcaseModel: root.store.ownShowcaseAccountsModel
|
|
|
|
socialLinksShowcaseModel: root.store.ownShowcaseSocialLinksModel
|
2024-04-17 08:02:02 +00:00
|
|
|
collectiblesShowcaseModel: SortFilterProxyModel {
|
|
|
|
sourceModel: root.store.ownShowcaseCollectiblesModel
|
|
|
|
sorters: [
|
|
|
|
FastExpressionSorter {
|
|
|
|
expression: {
|
|
|
|
root.collectiblesStore.collectiblesController.revision
|
|
|
|
return root.collectiblesStore.collectiblesController.compareTokens(modelLeft.uid, modelRight.uid)
|
|
|
|
}
|
|
|
|
expectedRoles: ["uid"]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
filters: [
|
|
|
|
FastExpressionFilter {
|
|
|
|
expression: {
|
|
|
|
root.collectiblesStore.collectiblesController.revision
|
|
|
|
return root.collectiblesStore.collectiblesController.filterAcceptsSymbol(model.uid)
|
|
|
|
}
|
|
|
|
expectedRoles: ["uid"]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2024-02-15 09:25:40 +00:00
|
|
|
|
|
|
|
assetsModel: root.globalStore.globalAssetsModel
|
|
|
|
collectiblesModel: root.globalStore.globalCollectiblesModel
|
2022-05-07 11:45:15 +00:00
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2022-02-11 09:44:49 +00:00
|
|
|
|
2024-02-09 11:31:37 +00:00
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: ChangePasswordView {
|
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
|
|
|
privacyStore: root.store.privacyStore
|
2024-10-02 20:47:14 +00:00
|
|
|
passwordStrengthScoreFunction: root.sharedRootStore.getPasswordStrengthScore
|
2024-02-09 11:31:37 +00:00
|
|
|
contentWidth: d.contentWidth
|
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.password)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: ContactsView {
|
2022-06-03 15:32:03 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2022-08-09 15:08:39 +00:00
|
|
|
contactsStore: root.store.contactsStore
|
2024-10-22 12:39:42 +00:00
|
|
|
utilsStore: root.utilsStore
|
2022-05-07 11:45:15 +00:00
|
|
|
sectionTitle: qsTr("Contacts")
|
|
|
|
contentWidth: d.contentWidth
|
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2020-05-24 22:23:00 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
id: ensContainer
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: EnsView {
|
2022-05-07 11:45:15 +00:00
|
|
|
// TODO: we need to align structure for the entire this part using `SettingsContentBase` as root component
|
|
|
|
// TODO: handle structure for this subsection to match style used in onther sections
|
|
|
|
// using `SettingsContentBase` component as base.
|
2022-12-14 13:59:14 +00:00
|
|
|
|
2022-06-03 15:32:03 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2022-08-09 15:08:39 +00:00
|
|
|
ensUsernamesStore: root.store.ensUsernamesStore
|
2024-02-05 16:44:49 +00:00
|
|
|
walletAssetsStore: root.walletAssetsStore
|
2024-10-03 13:14:27 +00:00
|
|
|
sendModalPopup: root.sendModalPopup
|
2022-08-09 15:08:39 +00:00
|
|
|
contactsStore: root.store.contactsStore
|
2023-04-04 11:31:04 +00:00
|
|
|
networkConnectionStore: root.networkConnectionStore
|
2022-05-07 11:45:15 +00:00
|
|
|
profileContentWidth: d.contentWidth
|
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2020-05-24 22:23:00 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: MessagingView {
|
2022-06-03 15:32:03 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2022-08-09 15:08:39 +00:00
|
|
|
messagingStore: root.store.messagingStore
|
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.messaging)
|
|
|
|
contactsStore: root.store.contactsStore
|
2022-05-07 11:45:15 +00:00
|
|
|
contentWidth: d.contentWidth
|
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
id: walletView
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: WalletView {
|
2022-06-03 15:32:03 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2024-10-15 08:14:36 +00:00
|
|
|
contentWidth: d.contentWidth
|
|
|
|
|
2024-10-18 22:50:21 +00:00
|
|
|
settingsSubSubsection: root.settingsSubSubsection
|
|
|
|
|
2022-09-13 16:17:54 +00:00
|
|
|
rootStore: root.store
|
2023-10-26 21:11:20 +00:00
|
|
|
tokensStore: root.tokensStore
|
2024-02-02 09:55:56 +00:00
|
|
|
networkConnectionStore: root.networkConnectionStore
|
2024-01-29 18:02:59 +00:00
|
|
|
assetsStore: root.walletAssetsStore
|
|
|
|
collectiblesStore: root.collectiblesStore
|
2024-10-15 08:14:36 +00:00
|
|
|
|
|
|
|
myPublicKey: root.store.contactsStore.myPublicKey
|
|
|
|
currencySymbol: root.sharedRootStore.currencyStore.currentCurrency
|
2022-08-09 15:08:39 +00:00
|
|
|
emojiPopup: root.emojiPopup
|
2024-10-15 08:14:36 +00:00
|
|
|
sendModalPopup: root.sendModalPopup
|
2022-08-09 15:08:39 +00:00
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.wallet)
|
2022-05-07 11:45:15 +00:00
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
onLoaded: root.store.backButtonName = ""
|
|
|
|
}
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: AppearanceView {
|
2022-06-03 15:32:03 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2022-08-09 15:08:39 +00:00
|
|
|
appearanceStore: root.store.appearanceStore
|
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.appearance)
|
2022-05-07 11:45:15 +00:00
|
|
|
contentWidth: d.contentWidth
|
2022-08-09 15:08:39 +00:00
|
|
|
systemPalette: root.systemPalette
|
2022-05-07 11:45:15 +00:00
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: LanguageView {
|
2022-06-03 15:32:03 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2024-04-29 12:02:19 +00:00
|
|
|
languageSelectionEnabled: localAppSettings.translationsEnabled
|
2022-08-09 15:08:39 +00:00
|
|
|
languageStore: root.store.languageStore
|
2024-02-07 09:54:45 +00:00
|
|
|
currencyStore: root.currencyStore
|
2022-08-09 15:08:39 +00:00
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.language)
|
2022-05-07 11:45:15 +00:00
|
|
|
contentWidth: d.contentWidth
|
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: NotificationsView {
|
2022-06-03 15:32:03 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2022-08-09 15:08:39 +00:00
|
|
|
notificationsStore: root.store.notificationsStore
|
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.notifications)
|
2022-05-07 11:45:15 +00:00
|
|
|
contentWidth: d.contentWidth
|
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
2023-03-14 02:52:16 +00:00
|
|
|
sourceComponent: SyncingView {
|
2022-06-03 15:32:03 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2023-10-03 11:44:45 +00:00
|
|
|
isProduction: production
|
2023-03-14 02:52:16 +00:00
|
|
|
profileStore: root.store.profileStore
|
2022-08-09 15:08:39 +00:00
|
|
|
devicesStore: root.store.devicesStore
|
2023-02-27 13:36:54 +00:00
|
|
|
privacyStore: root.store.privacyStore
|
2023-06-14 13:02:57 +00:00
|
|
|
advancedStore: root.store.advancedStore
|
2023-03-14 02:52:16 +00:00
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.syncingSettings)
|
2022-05-07 11:45:15 +00:00
|
|
|
contentWidth: d.contentWidth
|
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: AdvancedView {
|
2022-06-03 15:32:03 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2023-04-26 15:46:04 +00:00
|
|
|
messagingStore: root.store.messagingStore
|
2022-08-09 15:08:39 +00:00
|
|
|
advancedStore: root.store.advancedStore
|
2024-02-07 13:47:28 +00:00
|
|
|
walletStore: root.store.walletStore
|
2024-03-06 09:14:48 +00:00
|
|
|
isFleetSelectionEnabled: fleetSelectionEnabled
|
2022-08-09 15:08:39 +00:00
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.advanced)
|
2022-05-07 11:45:15 +00:00
|
|
|
contentWidth: d.contentWidth
|
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: AboutView {
|
2022-06-03 15:32:03 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2022-08-09 15:08:39 +00:00
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.about)
|
2022-05-07 11:45:15 +00:00
|
|
|
contentWidth: d.contentWidth
|
2022-10-13 19:02:40 +00:00
|
|
|
|
|
|
|
store: QtObject {
|
2023-01-31 15:52:57 +00:00
|
|
|
readonly property bool isProduction: production
|
|
|
|
|
2022-10-13 19:02:40 +00:00
|
|
|
function checkForUpdates() {
|
|
|
|
return root.store.checkForUpdates()
|
|
|
|
}
|
|
|
|
|
|
|
|
function getCurrentVersion() {
|
|
|
|
return root.store.getCurrentVersion()
|
|
|
|
}
|
|
|
|
|
2023-07-26 14:34:21 +00:00
|
|
|
function getStatusGoVersion() {
|
|
|
|
return root.store.getStatusGoVersion()
|
|
|
|
}
|
|
|
|
|
2024-08-12 19:05:13 +00:00
|
|
|
function qtRuntimeVersion() {
|
|
|
|
return SystemUtils.qtRuntimeVersion()
|
|
|
|
}
|
|
|
|
|
2022-10-13 19:02:40 +00:00
|
|
|
function getReleaseNotes() {
|
2023-07-26 14:34:21 +00:00
|
|
|
const link = isProduction ? "https://github.com/status-im/status-desktop/releases/tag/%1" :
|
|
|
|
"https://github.com/status-im/status-desktop/commit/%1"
|
2023-01-31 15:52:57 +00:00
|
|
|
|
2023-07-26 14:34:21 +00:00
|
|
|
openLink(link.arg(getCurrentVersion()))
|
2022-10-13 19:02:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function openLink(url) {
|
|
|
|
Global.openLink(url)
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2022-10-13 19:02:40 +00:00
|
|
|
}
|
2022-05-07 11:45:15 +00:00
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2022-03-23 10:56:25 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
2023-01-24 17:31:20 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2022-12-14 13:59:14 +00:00
|
|
|
sourceComponent: CommunitiesView {
|
2022-06-03 15:32:03 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2022-03-23 10:56:25 +00:00
|
|
|
|
2022-08-09 15:08:39 +00:00
|
|
|
profileSectionStore: root.store
|
|
|
|
rootStore: root.globalStore
|
2024-01-24 16:35:53 +00:00
|
|
|
currencyStore: root.currencyStore
|
|
|
|
walletAssetsStore: root.walletAssetsStore
|
2022-08-09 15:08:39 +00:00
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.communitiesSettings)
|
2022-03-23 10:56:25 +00:00
|
|
|
contentWidth: d.contentWidth
|
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2022-08-16 09:19:15 +00:00
|
|
|
|
2022-12-14 13:59:14 +00:00
|
|
|
Loader {
|
|
|
|
id: keycardView
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: KeycardView {
|
2022-08-16 09:19:15 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
|
|
|
|
2022-10-11 12:15:33 +00:00
|
|
|
profileSectionStore: root.store
|
2022-08-31 17:09:07 +00:00
|
|
|
keycardStore: root.store.keycardStore
|
2022-12-16 09:37:08 +00:00
|
|
|
emojiPopup: root.emojiPopup
|
2022-08-31 17:09:07 +00:00
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.keycard)
|
2022-10-11 12:15:33 +00:00
|
|
|
mainSectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.keycard)
|
2022-08-16 09:19:15 +00:00
|
|
|
contentWidth: d.contentWidth
|
|
|
|
}
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
2023-09-22 10:08:28 +00:00
|
|
|
|
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
sourceComponent: SettingsContentBase {
|
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2024-08-19 20:42:27 +00:00
|
|
|
sectionTitle: "Status Software - Terms of Use"
|
2023-09-22 10:08:28 +00:00
|
|
|
contentWidth: d.contentWidth
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
width: d.contentWidth
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
textFormat: Text.MarkdownText
|
|
|
|
text: SQUtils.StringUtils.readTextFile(":/imports/assets/docs/terms-of-use.mdwn")
|
2024-08-19 20:42:27 +00:00
|
|
|
onLinkActivated: Global.openLinkWithConfirmation(link, SQUtils.StringUtils.extractDomainFromLink(link))
|
2023-09-22 10:08:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
sourceComponent: SettingsContentBase {
|
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
2024-08-19 20:42:27 +00:00
|
|
|
sectionTitle: "Status Software - Privacy Policy"
|
2023-09-22 10:08:28 +00:00
|
|
|
contentWidth: d.contentWidth
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
width: d.contentWidth
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
textFormat: Text.MarkdownText
|
|
|
|
text: SQUtils.StringUtils.readTextFile(":/imports/assets/docs/privacy.mdwn")
|
2024-08-19 20:42:27 +00:00
|
|
|
onLinkActivated: Global.openLinkWithConfirmation(link, SQUtils.StringUtils.extractDomainFromLink(link))
|
2023-09-22 10:08:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-07-15 13:34:40 +00:00
|
|
|
|
|
|
|
Loader {
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
|
|
|
sourceComponent: PrivacyAndSecurityView {
|
2024-07-19 12:15:50 +00:00
|
|
|
isCentralizedMetricsEnabled: root.isCentralizedMetricsEnabled
|
2024-07-15 13:34:40 +00:00
|
|
|
implicitWidth: parent.width
|
|
|
|
implicitHeight: parent.height
|
|
|
|
|
|
|
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.privacyAndSecurity)
|
|
|
|
contentWidth: d.contentWidth
|
|
|
|
}
|
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|
2023-08-25 09:05:05 +00:00
|
|
|
|
2024-02-07 09:54:45 +00:00
|
|
|
showRightPanel: d.isProfilePanelActive && d.sideBySidePreviewAvailable
|
|
|
|
rightPanelWidth: d.rightPanelWidth
|
2024-03-29 11:43:49 +00:00
|
|
|
rightPanel: d.isProfilePanelActive ? profileContainer.currentItem.sideBySidePreviewComponent : null
|
2024-02-07 09:54:45 +00:00
|
|
|
|
2023-08-25 09:05:05 +00:00
|
|
|
Connections {
|
|
|
|
target: root.store.keycardStore.keycardModule
|
|
|
|
enabled: profileContainer.currentIndex === Constants.settingsSubsection.wallet ||
|
|
|
|
profileContainer.currentIndex === Constants.settingsSubsection.keycard
|
|
|
|
|
|
|
|
function onDisplayKeycardSharedModuleFlow() {
|
|
|
|
keycardPopup.active = true
|
|
|
|
}
|
|
|
|
function onDestroyKeycardSharedModuleFlow() {
|
|
|
|
keycardPopup.active = false
|
|
|
|
}
|
|
|
|
function onSharedModuleBusy() {
|
|
|
|
Global.openPopup(sharedModuleBusyPopupComponent)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
id: keycardPopup
|
|
|
|
active: false
|
|
|
|
sourceComponent: KeycardPopup {
|
2024-10-15 12:26:45 +00:00
|
|
|
myKeyUid: store.profileStore.keyUid
|
2023-08-25 09:05:05 +00:00
|
|
|
sharedKeycardModule: root.store.keycardStore.keycardModule.keycardSharedModule
|
|
|
|
emojiPopup: root.emojiPopup
|
|
|
|
}
|
|
|
|
|
|
|
|
onLoaded: {
|
|
|
|
keycardPopup.item.open()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: sharedModuleBusyPopupComponent
|
|
|
|
StatusDialog {
|
|
|
|
id: titleContentDialog
|
|
|
|
title: qsTr("Status Keycard")
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
anchors.fill: parent
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
text: qsTr("The Keycard module is still busy, please try again")
|
|
|
|
}
|
|
|
|
|
|
|
|
standardButtons: Dialog.Ok
|
|
|
|
}
|
|
|
|
}
|
2022-12-14 13:59:14 +00:00
|
|
|
}
|