separate profile sections

This commit is contained in:
Iuri Matias 2020-05-27 17:28:25 -04:00
parent 1503f2d1f8
commit d2a23fb265
15 changed files with 594 additions and 527 deletions

View File

@ -10,7 +10,6 @@ import "./LeftTab"
ColumnLayout {
readonly property int w: 340
// property alias currentTab: profileScreenButtons.currentIndex
property alias currentTab: profileMenu.profileCurrentIndex
id: profileInfoContainer
@ -23,12 +22,25 @@ ColumnLayout {
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
RowLayout {
id: profileHeader
height: 240
Layout.fillWidth: true
width: profileInfoContainer.w
Profile {}
}
RowLayout {
width: profileInfoContainer.w
height: btnheight * 10
Layout.fillHeight: true
Layout.fillWidth: true
Menu {
id: profileMenu
}
}
}
/*##^##

View File

@ -4,18 +4,11 @@ import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
RowLayout {
Rectangle {
property alias profileCurrentIndex: profileScreenButtons.currentIndex
readonly property int btnheight: 42
id: profileTabBar
width: profileInfoContainer.w
height: btnheight * 10
Layout.fillHeight: true
Layout.fillWidth: true
Rectangle {
id: profileTabBarBg
color: "#ffffff"
height: parent.height
Layout.fillHeight: true
@ -281,5 +274,4 @@ RowLayout {
}
}
}
}
}

View File

@ -4,13 +4,7 @@ import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
RowLayout {
id: profileHeader
height: 240
Layout.fillWidth: true
width: profileInfoContainer.w
Rectangle {
Rectangle {
id: profileHeaderContent
height: parent.height
Layout.fillWidth: true
@ -60,5 +54,4 @@ RowLayout {
font.pixelSize: 20
}
}
}
}

View File

@ -6,6 +6,7 @@ import QtQuick.Layouts 1.3
import Qt.labs.platform 1.1
import "../../../imports"
import "../../../shared"
import "./Sections"
import "."
Item {
@ -31,264 +32,25 @@ Item {
anchors.leftMargin: 0
currentIndex: leftTab.currentTab
Item {
id: ensContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
EnsContainer {}
Text {
id: element1
text: qsTr("ENS usernames")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}
ContactsContainer {}
Item {
id: contactsContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
PrivacyContainer {}
Text {
id: element2
text: qsTr("Contacts")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
SyncContainer {}
Component {
id: contactsList
LanguageContainer {}
Item {
height: 56
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
Column {
Row {
Text {
text: name
font.weight: Font.Bold
font.pixelSize: 14
}
}
Row {
Text {
text: address
font.weight: Font.Bold
font.pixelSize: 12
}
}
}
}
}
NotificationsContainer {}
ListView {
id: contactListView
anchors.topMargin: 48
anchors.top: element2.bottom
anchors.fill: parent
model: profileModel.contactList
delegate: contactsList
}
AdvancedContainer {}
}
HelpContainer {}
Item {
id: privacyContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
AboutContainer {}
Text {
id: element3
text: qsTr("Privacy and security settings")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}
Item {
id: syncContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element4
text: qsTr("Sync settings")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
Component {
id: mailserversList
RadioButton {
text: name
checked: index == 0 ? true: false
}
}
ListView {
id: mailServersListView
anchors.topMargin: 48
anchors.top: element4.bottom
anchors.fill: parent
model: profileModel.mailserversList
delegate: mailserversList
}
}
Item {
id: languageContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element5
text: qsTr("Language settings")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}
Item {
id: notificationsContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element6
text: qsTr("Notifications settings")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}
Item {
id: advancedContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element7
text: qsTr("Advanced settings")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}
Item {
id: helpContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element8
text: qsTr("Help menus: FAQ, Glossary, etc.")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
Text {
anchors.centerIn: parent
text: "<a href='https://status.im/docs/FAQs.html'>Frequently asked questions</a>"
onLinkActivated: Qt.openUrlExternally(link)
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}
}
Item {
id: aboutContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element9
text: qsTr("About the app")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}
Item {
id: signoutContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element10
text: qsTr("Sign out controls")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}
SignoutContainer {}
}
}

View File

@ -0,0 +1,23 @@
import QtQuick 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
Item {
id: aboutContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element9
text: qsTr("About the app")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}

View File

@ -0,0 +1,23 @@
import QtQuick 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
Item {
id: advancedContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element7
text: qsTr("Advanced settings")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}

View File

@ -0,0 +1,60 @@
import QtQuick 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
Item {
id: contactsContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element2
text: qsTr("Contacts")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
Component {
id: contactsList
Item {
height: 56
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
Column {
Row {
Text {
text: name
font.weight: Font.Bold
font.pixelSize: 14
}
}
Row {
Text {
text: address
font.weight: Font.Bold
font.pixelSize: 12
}
}
}
}
}
ListView {
id: contactListView
anchors.topMargin: 48
anchors.top: element2.bottom
anchors.fill: parent
model: profileModel.contactList
delegate: contactsList
}
}

View File

@ -0,0 +1,23 @@
import QtQuick 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
Item {
id: ensContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element1
text: qsTr("ENS usernames")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}

View File

@ -0,0 +1,35 @@
import QtQuick 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
Item {
id: helpContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element8
text: qsTr("Help menus: FAQ, Glossary, etc.")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
Text {
anchors.centerIn: parent
text: "<a href='https://status.im/docs/FAQs.html'>Frequently asked questions</a>"
onLinkActivated: Qt.openUrlExternally(link)
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}
}

View File

@ -0,0 +1,23 @@
import QtQuick 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
Item {
id: languageContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element5
text: qsTr("Language settings")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}

View File

@ -0,0 +1,23 @@
import QtQuick 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
Item {
id: notificationsContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element6
text: qsTr("Notifications settings")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}

View File

@ -0,0 +1,23 @@
import QtQuick 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
Item {
id: privacyContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element3
text: qsTr("Privacy and security settings")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}

View File

@ -0,0 +1,23 @@
import QtQuick 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
Item {
id: signoutContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element10
text: qsTr("Sign out controls")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
}

View File

@ -0,0 +1,42 @@
import QtQuick 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
Item {
id: syncContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
Text {
id: element4
text: qsTr("Sync settings")
anchors.left: parent.left
anchors.leftMargin: 24
anchors.top: parent.top
anchors.topMargin: 24
font.weight: Font.Bold
font.pixelSize: 20
}
Component {
id: mailserversList
RadioButton {
text: name
checked: index == 0 ? true: false
}
}
ListView {
id: mailServersListView
anchors.topMargin: 48
anchors.top: element4.bottom
anchors.fill: parent
model: profileModel.mailserversList
delegate: mailserversList
}
}

View File

@ -0,0 +1,10 @@
EnsContainer 1.0 EnsContainer.qml
ContactsContainer 1.0 ContactsContainer.qml
PrivacyContainer 1.0 PrivacyContainer.qml
SyncContainer 1.0 SyncContainer.qml
LanguageContainer 1.0 LanguageContainer.qml
NotificationsContainer 1.0 NotificationsContainer.qml
AdvancedContainer 1.0 AdvancedContainer.qml
HelpContainer 1.0 HelpContainer.qml
AboutContainer 1.0 AboutContainer.qml
SignoutContainer 1.0 SignoutContainer.qml