status-desktop/ui/app/AppLayouts/Profile/LeftTab/Menu.qml

293 lines
9.1 KiB
QML
Raw Normal View History

2020-05-27 20:57:36 +00:00
import QtGraphicalEffects 1.12
import QtQuick 2.0
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import "../../../../imports"
2020-05-27 21:28:25 +00:00
Rectangle {
2020-05-27 20:57:36 +00:00
property alias profileCurrentIndex: profileScreenButtons.currentIndex
readonly property int btnheight: 42
id: profileTabBar
2020-05-27 21:28:25 +00:00
color: "#ffffff"
height: parent.height
2020-05-27 20:57:36 +00:00
Layout.fillHeight: true
Layout.fillWidth: true
2020-05-27 21:28:25 +00:00
TabBar {
id: profileScreenButtons
width: profileInfoContainer.w
2020-05-27 20:57:36 +00:00
height: parent.height
2020-05-27 21:28:25 +00:00
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
currentIndex: 0
spacing: 0
background: Rectangle {
color: "#00000000"
}
2020-05-27 20:57:36 +00:00
2020-05-27 21:28:25 +00:00
TabButton {
id: ensTabButton
2020-05-27 20:57:36 +00:00
width: profileInfoContainer.w
2020-06-17 21:12:36 +00:00
height: 0 //profileTabBar.btnheight
visible: false
2020-05-27 21:28:25 +00:00
text: ""
anchors.top: parent.top
anchors.topMargin: 0
2020-05-27 20:57:36 +00:00
background: Rectangle {
2020-05-27 21:28:25 +00:00
color: Theme.transparent
2020-05-27 20:57:36 +00:00
}
2020-05-27 21:28:25 +00:00
Text {
id: element1
color: "#000000"
text: qsTr("ENS usernames")
anchors.left: parent.left
anchors.leftMargin: 72
anchors.verticalCenter: parent.verticalCenter
2020-06-17 20:33:44 +00:00
font.weight: profileScreenButtons.currentIndex === 0 ? Font.Bold : Font.Medium
2020-05-27 21:28:25 +00:00
font.pixelSize: 14
}
}
2020-05-27 20:57:36 +00:00
2020-05-27 21:28:25 +00:00
TabButton {
id: contactsTabButton
width: profileInfoContainer.w
height: profileTabBar.btnheight
text: ""
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: ensTabButton.bottom
anchors.topMargin: 0
background: Rectangle {
color: Theme.transparent
2020-05-27 20:57:36 +00:00
}
2020-05-27 21:28:25 +00:00
Text {
id: element2
color: "#000000"
text: qsTr("Contacts")
2020-05-27 20:57:36 +00:00
anchors.left: parent.left
2020-05-27 21:28:25 +00:00
anchors.leftMargin: 72
anchors.verticalCenter: parent.verticalCenter
2020-06-17 20:33:44 +00:00
font.weight: profileScreenButtons.currentIndex === 1 ? Font.Bold : Font.Medium
2020-05-27 21:28:25 +00:00
font.pixelSize: 14
}
}
2020-05-27 20:57:36 +00:00
2020-05-27 21:28:25 +00:00
TabButton {
id: privacyTabButton
width: profileInfoContainer.w
2020-06-17 21:12:36 +00:00
height: 0 //profileTabBar.btnheight
visible: false
2020-05-27 21:28:25 +00:00
text: ""
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: contactsTabButton.bottom
anchors.topMargin: 0
background: Rectangle {
color: Theme.transparent
2020-05-27 20:57:36 +00:00
}
2020-05-27 21:28:25 +00:00
Text {
id: element3
color: "#000000"
text: qsTr("Privacy and security")
2020-05-27 20:57:36 +00:00
anchors.left: parent.left
2020-05-27 21:28:25 +00:00
anchors.leftMargin: 72
anchors.verticalCenter: parent.verticalCenter
2020-06-17 20:33:44 +00:00
font.weight: profileScreenButtons.currentIndex === 2 ? Font.Bold : Font.Medium
2020-05-27 21:28:25 +00:00
font.pixelSize: 14
}
}
2020-05-27 20:57:36 +00:00
2020-05-27 21:28:25 +00:00
TabButton {
id: syncTabButton
width: profileInfoContainer.w
2020-06-17 21:12:36 +00:00
height: 0 //profileTabBar.btnheight
visible: false
2020-05-27 21:28:25 +00:00
text: ""
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: privacyTabButton.bottom
anchors.topMargin: 0
background: Rectangle {
color: Theme.transparent
2020-05-27 20:57:36 +00:00
}
2020-05-27 21:28:25 +00:00
Text {
id: element4
color: "#000000"
text: qsTr("Sync settings")
2020-05-27 20:57:36 +00:00
anchors.left: parent.left
2020-05-27 21:28:25 +00:00
anchors.leftMargin: 72
anchors.verticalCenter: parent.verticalCenter
2020-06-17 20:33:44 +00:00
font.weight: profileScreenButtons.currentIndex === 3 ? Font.Bold : Font.Medium
2020-05-27 21:28:25 +00:00
font.pixelSize: 14
}
}
2020-05-27 20:57:36 +00:00
2020-05-27 21:28:25 +00:00
TabButton {
id: languageTabButton
width: profileInfoContainer.w
2020-06-17 21:12:36 +00:00
height: 0 //profileTabBar.btnheight
visible: false
2020-05-27 21:28:25 +00:00
text: ""
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: syncTabButton.bottom
anchors.topMargin: 0
background: Rectangle {
color: Theme.transparent
2020-05-27 20:57:36 +00:00
}
2020-05-27 21:28:25 +00:00
Text {
id: element5
color: "#000000"
text: qsTr("Language settings")
2020-05-27 20:57:36 +00:00
anchors.left: parent.left
2020-05-27 21:28:25 +00:00
anchors.leftMargin: 72
anchors.verticalCenter: parent.verticalCenter
2020-06-17 20:33:44 +00:00
font.weight: profileScreenButtons.currentIndex === 4 ? Font.Bold : Font.Medium
2020-05-27 21:28:25 +00:00
font.pixelSize: 14
}
}
2020-05-27 20:57:36 +00:00
2020-05-27 21:28:25 +00:00
TabButton {
id: notificationsTabButton
width: profileInfoContainer.w
2020-06-17 21:12:36 +00:00
height: 0 //profileTabBar.btnheight
visible: false
2020-05-27 21:28:25 +00:00
text: ""
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: languageTabButton.bottom
anchors.topMargin: 0
background: Rectangle {
color: Theme.transparent
2020-05-27 20:57:36 +00:00
}
2020-05-27 21:28:25 +00:00
Text {
id: element6
color: "#000000"
text: qsTr("Notifications settings")
2020-05-27 20:57:36 +00:00
anchors.left: parent.left
2020-05-27 21:28:25 +00:00
anchors.leftMargin: 72
anchors.verticalCenter: parent.verticalCenter
2020-06-17 20:33:44 +00:00
font.weight: profileScreenButtons.currentIndex === 5 ? Font.Bold : Font.Medium
2020-05-27 21:28:25 +00:00
font.pixelSize: 14
}
}
2020-05-27 20:57:36 +00:00
2020-05-27 21:28:25 +00:00
TabButton {
id: advancedTabButton
width: profileInfoContainer.w
height: profileTabBar.btnheight
2020-05-27 21:28:25 +00:00
text: ""
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: notificationsTabButton.bottom
anchors.topMargin: 0
background: Rectangle {
color: Theme.transparent
2020-05-27 20:57:36 +00:00
}
2020-05-27 21:28:25 +00:00
Text {
id: element7
color: "#000000"
text: qsTr("Advanced settings")
2020-05-27 20:57:36 +00:00
anchors.left: parent.left
2020-05-27 21:28:25 +00:00
anchors.leftMargin: 72
anchors.verticalCenter: parent.verticalCenter
2020-06-17 20:33:44 +00:00
font.weight: profileScreenButtons.currentIndex === 6 ? Font.Bold : Font.Medium
2020-05-27 21:28:25 +00:00
font.pixelSize: 14
}
}
2020-05-27 20:57:36 +00:00
2020-05-27 21:28:25 +00:00
TabButton {
id: helpTabButton
width: profileInfoContainer.w
2020-06-17 21:05:59 +00:00
height: 0 //profileTabBar.btnheight
2020-05-27 21:28:25 +00:00
text: ""
2020-06-17 21:05:59 +00:00
visible: false
2020-05-27 21:28:25 +00:00
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: advancedTabButton.bottom
anchors.topMargin: 0
background: Rectangle {
color: Theme.transparent
2020-05-27 20:57:36 +00:00
}
2020-05-27 21:28:25 +00:00
Text {
id: element8
color: "#000000"
text: qsTr("Need help?")
2020-05-27 20:57:36 +00:00
anchors.left: parent.left
2020-05-27 21:28:25 +00:00
anchors.leftMargin: 72
anchors.verticalCenter: parent.verticalCenter
2020-06-17 20:33:44 +00:00
font.weight: profileScreenButtons.currentIndex === 7 ? Font.Bold : Font.Medium
2020-05-27 21:28:25 +00:00
font.pixelSize: 14
}
}
2020-05-27 20:57:36 +00:00
2020-05-27 21:28:25 +00:00
TabButton {
id: aboutTabButton
width: profileInfoContainer.w
height: profileTabBar.btnheight
text: ""
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: helpTabButton.bottom
anchors.topMargin: 0
background: Rectangle {
color: Theme.transparent
2020-05-27 20:57:36 +00:00
}
2020-05-27 21:28:25 +00:00
Text {
id: element9
color: "#000000"
text: qsTr("About")
2020-05-27 20:57:36 +00:00
anchors.left: parent.left
2020-05-27 21:28:25 +00:00
anchors.leftMargin: 72
anchors.verticalCenter: parent.verticalCenter
2020-06-17 20:33:44 +00:00
font.weight: profileScreenButtons.currentIndex === 8 ? Font.Bold : Font.Medium
2020-05-27 21:28:25 +00:00
font.pixelSize: 14
}
}
2020-05-27 20:57:36 +00:00
2020-05-27 21:28:25 +00:00
TabButton {
id: signoutTabButton
width: profileInfoContainer.w
height: profileTabBar.btnheight
text: ""
anchors.left: parent.left
anchors.leftMargin: 0
2020-06-17 21:12:36 +00:00
anchors.bottom: parent.bottom
anchors.bottomMargin: 20
2020-05-27 21:28:25 +00:00
background: Rectangle {
color: Theme.transparent
2020-05-27 20:57:36 +00:00
}
2020-05-27 21:28:25 +00:00
Text {
id: element10
color: "#000000"
text: qsTr("Sign out")
2020-05-27 20:57:36 +00:00
anchors.left: parent.left
2020-05-27 21:28:25 +00:00
anchors.leftMargin: 72
anchors.verticalCenter: parent.verticalCenter
2020-06-17 20:33:44 +00:00
font.weight: profileScreenButtons.currentIndex === 9 ? Font.Bold : Font.Medium
2020-05-27 21:28:25 +00:00
font.pixelSize: 14
2020-06-17 20:33:44 +00:00
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: {
// profileModel.logout();
Qt.quit();
}
}
2020-05-27 20:57:36 +00:00
}
}
}
2020-05-27 21:28:25 +00:00
}