2020-06-17 15:18:31 -04:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2020-05-19 14:44:45 -05:00
|
|
|
import "../../../imports"
|
|
|
|
import "../../../shared"
|
2020-05-27 17:28:25 -04:00
|
|
|
import "./Sections"
|
2020-05-19 14:44:45 -05:00
|
|
|
|
2020-06-11 17:29:30 -04:00
|
|
|
SplitView {
|
2021-03-18 10:33:39 +01:00
|
|
|
property int contentMaxWidth: 624
|
2021-04-08 11:44:58 -04:00
|
|
|
property int contentMinWidth: 450
|
2021-01-18 15:25:20 -05:00
|
|
|
property int topMargin: 46
|
2020-10-21 10:45:28 -04:00
|
|
|
property alias changeProfileSection: leftTab.changeProfileSection
|
2020-06-23 16:49:04 -04:00
|
|
|
|
2020-05-19 14:44:45 -05:00
|
|
|
id: profileView
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
2020-06-23 14:51:10 -04:00
|
|
|
handle: SplitViewHandle {}
|
2020-06-11 17:29:30 -04:00
|
|
|
|
2020-09-15 15:47:13 -04:00
|
|
|
Connections {
|
2021-02-18 15:14:31 -04:00
|
|
|
target: appMain
|
2020-09-15 15:47:13 -04:00
|
|
|
onSettingsLoaded: {
|
|
|
|
// Add recent
|
|
|
|
profileView.restoreState(appSettings.profileSplitView)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Component.onDestruction: appSettings.profileSplitView = this.saveState()
|
2020-06-23 16:49:04 -04:00
|
|
|
|
2020-05-19 14:44:45 -05:00
|
|
|
LeftTab {
|
|
|
|
id: leftTab
|
2021-04-14 17:13:34 +02:00
|
|
|
SplitView.preferredWidth: Style.current.leftTabPreferredSize
|
2020-05-19 14:44:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
StackLayout {
|
2021-04-08 11:44:58 -04:00
|
|
|
property int profileContentWidth: Math.max(contentMinWidth, Math.min(profileContainer.width * 0.8, contentMaxWidth))
|
|
|
|
|
2020-05-19 14:44:45 -05:00
|
|
|
id: profileContainer
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 0
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: 0
|
|
|
|
currentIndex: leftTab.currentTab
|
|
|
|
|
2020-07-21 17:03:22 -04:00
|
|
|
// This list needs to match LeftTab/constants.js
|
|
|
|
// Would be better if we could make them match automatically
|
2020-11-30 12:03:52 -05:00
|
|
|
MyProfileContainer {}
|
2020-05-19 14:44:45 -05:00
|
|
|
|
2020-08-04 18:22:51 -04:00
|
|
|
onCurrentIndexChanged: {
|
|
|
|
if(visibleChildren[0] === ensContainer){
|
|
|
|
ensContainer.goToStart();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-27 17:28:25 -04:00
|
|
|
ContactsContainer {}
|
2020-05-19 14:44:45 -05:00
|
|
|
|
2020-08-04 18:22:51 -04:00
|
|
|
EnsContainer {
|
|
|
|
id: ensContainer
|
|
|
|
}
|
2020-07-21 17:03:22 -04:00
|
|
|
|
2020-05-27 17:28:25 -04:00
|
|
|
PrivacyContainer {}
|
2020-05-19 14:44:45 -05:00
|
|
|
|
2020-07-21 17:03:22 -04:00
|
|
|
AppearanceContainer {}
|
2020-07-03 12:54:27 -04:00
|
|
|
|
2020-07-21 17:03:22 -04:00
|
|
|
SoundsContainer {}
|
2020-05-24 18:23:00 -04:00
|
|
|
|
2020-05-27 17:28:25 -04:00
|
|
|
LanguageContainer {}
|
2020-05-24 18:23:00 -04:00
|
|
|
|
2020-05-27 17:28:25 -04:00
|
|
|
NotificationsContainer {}
|
2020-05-24 18:23:00 -04:00
|
|
|
|
2020-07-21 17:03:22 -04:00
|
|
|
SyncContainer {}
|
|
|
|
|
|
|
|
DevicesContainer {}
|
|
|
|
|
2020-10-21 10:45:28 -04:00
|
|
|
BrowserContainer {}
|
|
|
|
|
2020-09-15 13:42:23 -04:00
|
|
|
AdvancedContainer {}
|
2020-05-24 18:23:00 -04:00
|
|
|
|
2020-05-27 17:28:25 -04:00
|
|
|
HelpContainer {}
|
2020-05-19 14:44:45 -05:00
|
|
|
|
2020-05-27 17:28:25 -04:00
|
|
|
AboutContainer {}
|
2020-05-19 14:44:45 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;autoSize:true;height:480;width:640}
|
|
|
|
}
|
|
|
|
##^##*/
|