2020-06-17 15:18:31 -04:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2021-09-28 18:04:06 +03:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-28 00:27:49 +03:00
|
|
|
import shared 1.0
|
2021-10-06 11:16:39 +02:00
|
|
|
|
|
|
|
import "stores"
|
|
|
|
import "popups"
|
|
|
|
import "views"
|
2020-05-19 14:44:45 -05:00
|
|
|
|
2021-06-16 13:15:28 +02:00
|
|
|
import StatusQ.Layout 0.1
|
|
|
|
|
|
|
|
StatusAppTwoPanelLayout {
|
|
|
|
id: profileView
|
|
|
|
|
2021-12-30 13:39:47 +01:00
|
|
|
property ProfileSectionStore store
|
2021-12-09 14:28:02 +01:00
|
|
|
property var globalStore
|
|
|
|
property var systemPalette
|
2022-03-10 18:01:17 +01:00
|
|
|
property var emojiPopup
|
2021-12-09 14:28:02 +01:00
|
|
|
|
2022-03-04 16:33:48 -05:00
|
|
|
Component.onCompleted: {
|
|
|
|
Global.privacyModuleInst = store.privacyStore.privacyModule
|
|
|
|
}
|
|
|
|
|
2021-12-09 14:28:02 +01:00
|
|
|
QtObject {
|
|
|
|
id: _internal
|
|
|
|
readonly property int contentMaxWidth: 624
|
|
|
|
readonly property int contentMinWidth: 450
|
|
|
|
property int profileContentWidth: Math.max(contentMinWidth, Math.min(profileContainer.width * 0.8, contentMaxWidth))
|
|
|
|
}
|
|
|
|
|
2021-10-06 11:16:39 +02:00
|
|
|
leftPanel: LeftTabView {
|
2020-05-19 14:44:45 -05:00
|
|
|
id: leftTab
|
2021-10-06 11:16:39 +02:00
|
|
|
store: profileView.store
|
|
|
|
anchors.fill: parent
|
2020-05-19 14:44:45 -05:00
|
|
|
}
|
|
|
|
|
2021-06-16 13:15:28 +02:00
|
|
|
rightPanel: StackLayout {
|
|
|
|
id: profileContainer
|
2021-12-09 14:28:02 +01:00
|
|
|
|
2021-06-16 13:15:28 +02:00
|
|
|
anchors.fill: parent
|
2021-04-08 11:44:58 -04:00
|
|
|
|
2022-02-25 14:32:46 +01:00
|
|
|
currentIndex: Global.settingsSubsection
|
2020-05-19 14:44:45 -05:00
|
|
|
|
2020-08-04 18:22:51 -04:00
|
|
|
onCurrentIndexChanged: {
|
|
|
|
if(visibleChildren[0] === ensContainer){
|
|
|
|
ensContainer.goToStart();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-06 11:16:39 +02:00
|
|
|
MyProfileView {
|
2022-03-16 22:20:03 +01:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
|
2021-12-29 16:09:29 +01:00
|
|
|
profileStore: profileView.store.profileStore
|
2021-12-09 14:28:02 +01:00
|
|
|
profileContentWidth: _internal.profileContentWidth
|
2021-10-06 11:16:39 +02:00
|
|
|
}
|
2021-06-16 13:15:28 +02:00
|
|
|
|
2021-10-06 11:16:39 +02:00
|
|
|
ContactsView {
|
2021-12-31 13:29:51 +01:00
|
|
|
contactsStore: profileView.store.contactsStore
|
2021-12-09 14:28:02 +01:00
|
|
|
profileContentWidth: _internal.profileContentWidth
|
2021-10-06 11:16:39 +02:00
|
|
|
}
|
2020-05-19 14:44:45 -05:00
|
|
|
|
2021-10-06 11:16:39 +02:00
|
|
|
EnsView {
|
2020-08-04 18:22:51 -04:00
|
|
|
id: ensContainer
|
2022-01-17 09:56:44 +01:00
|
|
|
ensUsernamesStore: profileView.store.ensUsernamesStore
|
2022-01-04 13:06:05 +01:00
|
|
|
contactsStore: profileView.store.contactsStore
|
2021-12-09 14:28:02 +01:00
|
|
|
profileContentWidth: _internal.profileContentWidth
|
2020-08-04 18:22:51 -04:00
|
|
|
}
|
2020-07-21 17:03:22 -04:00
|
|
|
|
2022-03-07 15:34:59 -05:00
|
|
|
MessagingView {
|
|
|
|
id: messagingView
|
|
|
|
messagingStore: profileView.store.messagingStore
|
|
|
|
profileContentWidth: _internal.profileContentWidth
|
|
|
|
}
|
|
|
|
|
2022-02-11 10:44:49 +01:00
|
|
|
WalletView {
|
|
|
|
id: walletView
|
|
|
|
walletStore: profileView.store.walletStore
|
2022-03-10 18:01:17 +01:00
|
|
|
emojiPopup: profileView.emojiPopup
|
2022-02-11 10:44:49 +01:00
|
|
|
}
|
|
|
|
|
2021-10-06 11:16:39 +02:00
|
|
|
PrivacyView {
|
2021-12-30 13:39:47 +01:00
|
|
|
privacyStore: profileView.store.privacyStore
|
2021-12-09 14:28:02 +01:00
|
|
|
profileContentWidth: _internal.profileContentWidth
|
2021-10-06 11:16:39 +02:00
|
|
|
}
|
2020-05-19 14:44:45 -05:00
|
|
|
|
2021-10-06 11:16:39 +02:00
|
|
|
AppearanceView {
|
2021-12-29 11:32:43 +01:00
|
|
|
appearanceStore: profileView.store.appearanceStore
|
2021-12-09 14:28:02 +01:00
|
|
|
profileContentWidth: _internal.profileContentWidth
|
|
|
|
systemPalette: profileView.systemPalette
|
2021-10-06 11:16:39 +02:00
|
|
|
}
|
2020-07-03 12:54:27 -04:00
|
|
|
|
2021-12-09 14:28:02 +01:00
|
|
|
SoundsView {
|
|
|
|
profileContentWidth: _internal.profileContentWidth
|
|
|
|
}
|
2020-05-24 18:23:00 -04:00
|
|
|
|
2021-10-06 11:16:39 +02:00
|
|
|
LanguageView {
|
2021-12-29 10:53:56 +01:00
|
|
|
languageStore: profileView.store.languageStore
|
2021-12-09 14:28:02 +01:00
|
|
|
profileContentWidth: _internal.profileContentWidth
|
2021-10-06 11:16:39 +02:00
|
|
|
}
|
2020-05-24 18:23:00 -04:00
|
|
|
|
2021-10-06 11:16:39 +02:00
|
|
|
NotificationsView {
|
2021-12-28 15:43:25 +01:00
|
|
|
notificationsStore: profileView.store.notificationsStore
|
2021-12-09 14:28:02 +01:00
|
|
|
profileContentWidth: _internal.profileContentWidth
|
2021-10-06 11:16:39 +02:00
|
|
|
}
|
2020-05-24 18:23:00 -04:00
|
|
|
|
2021-10-06 11:16:39 +02:00
|
|
|
DevicesView {
|
2021-12-27 12:04:10 +01:00
|
|
|
devicesStore: profileView.store.devicesStore
|
2021-10-06 11:16:39 +02:00
|
|
|
}
|
2020-07-21 17:03:22 -04:00
|
|
|
|
2021-10-06 11:16:39 +02:00
|
|
|
BrowserView {
|
|
|
|
store: profileView.store
|
2021-12-09 14:28:02 +01:00
|
|
|
profileContentWidth: _internal.profileContentWidth
|
2021-10-06 11:16:39 +02:00
|
|
|
}
|
2020-10-21 10:45:28 -04:00
|
|
|
|
2021-10-06 11:16:39 +02:00
|
|
|
AdvancedView {
|
2021-12-14 19:47:32 +01:00
|
|
|
advancedStore: profileView.store.advancedStore
|
2021-12-09 14:28:02 +01:00
|
|
|
profileContentWidth: _internal.profileContentWidth
|
2021-10-06 11:16:39 +02:00
|
|
|
}
|
2020-05-24 18:23:00 -04:00
|
|
|
|
2021-12-09 14:28:02 +01:00
|
|
|
HelpView {
|
|
|
|
profileContentWidth: _internal.profileContentWidth
|
|
|
|
}
|
2020-05-19 14:44:45 -05:00
|
|
|
|
2021-10-06 11:16:39 +02:00
|
|
|
AboutView {
|
|
|
|
store: profileView.store
|
2022-01-28 09:19:49 +01:00
|
|
|
globalStore: profileView.globalStore
|
2021-12-09 14:28:02 +01:00
|
|
|
profileContentWidth: _internal.profileContentWidth
|
2021-10-06 11:16:39 +02:00
|
|
|
}
|
2020-05-19 14:44:45 -05:00
|
|
|
}
|
|
|
|
}
|