2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2020-05-11 21:24:08 +00:00
|
|
|
import "../imports"
|
2020-06-23 18:59:16 +00:00
|
|
|
import "../shared"
|
2020-05-13 17:27:06 +00:00
|
|
|
import "./AppLayouts"
|
2020-05-11 21:24:08 +00:00
|
|
|
|
|
|
|
RowLayout {
|
2020-09-15 19:47:13 +00:00
|
|
|
id: appMain
|
2020-05-13 14:40:51 +00:00
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
2020-05-11 21:24:08 +00:00
|
|
|
|
2020-09-11 17:31:13 +00:00
|
|
|
ToastMessage {
|
|
|
|
id: toastMessage
|
|
|
|
}
|
|
|
|
|
2020-05-11 21:24:08 +00:00
|
|
|
TabBar {
|
|
|
|
id: tabBar
|
2020-06-23 18:59:16 +00:00
|
|
|
width: 78
|
2020-05-13 14:40:51 +00:00
|
|
|
Layout.maximumWidth: 80
|
|
|
|
Layout.preferredWidth: 80
|
|
|
|
Layout.minimumWidth: 80
|
2020-05-11 21:24:08 +00:00
|
|
|
currentIndex: 0
|
|
|
|
topPadding: 57
|
|
|
|
rightPadding: 19
|
|
|
|
leftPadding: 19
|
|
|
|
transformOrigin: Item.Top
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
|
|
|
spacing: 5
|
|
|
|
background: Rectangle {
|
|
|
|
color: "#00000000"
|
2020-07-13 18:45:54 +00:00
|
|
|
border.color: Style.current.border
|
2020-05-11 21:24:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TabButton {
|
|
|
|
id: chatBtn
|
|
|
|
x: 0
|
|
|
|
width: 40
|
|
|
|
height: 40
|
|
|
|
text: ""
|
|
|
|
padding: 0
|
|
|
|
transformOrigin: Item.Center
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
background: Rectangle {
|
2020-07-13 18:45:54 +00:00
|
|
|
color: Style.current.secondaryBackground
|
2020-05-11 21:24:08 +00:00
|
|
|
opacity: parent.checked ? 1 : 0
|
|
|
|
radius: 50
|
|
|
|
}
|
|
|
|
|
2020-06-23 18:59:16 +00:00
|
|
|
SVGImage {
|
2020-05-11 21:24:08 +00:00
|
|
|
id: image
|
2020-06-23 18:59:16 +00:00
|
|
|
height: 24
|
|
|
|
width: 24
|
2020-05-11 21:24:08 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
source: parent.checked ? "img/messageActive.svg" : "img/message.svg"
|
|
|
|
}
|
2020-07-22 19:05:13 +00:00
|
|
|
|
|
|
|
Rectangle {
|
2020-07-23 19:54:40 +00:00
|
|
|
visible: chatsModel.unreadMessagesCount > 0
|
2020-07-22 19:05:13 +00:00
|
|
|
anchors.top: image.top
|
|
|
|
anchors.left: image.right
|
|
|
|
anchors.leftMargin: -10
|
|
|
|
anchors.topMargin: -5
|
|
|
|
radius: 9
|
|
|
|
color: Style.current.blue
|
2020-09-23 20:08:43 +00:00
|
|
|
width: chatsModel.unreadMessagesCount < 10 ? 18 : messageCount.width + 10
|
2020-07-22 19:21:44 +00:00
|
|
|
height: 18
|
2020-07-22 19:05:13 +00:00
|
|
|
Text {
|
2020-09-23 20:08:43 +00:00
|
|
|
id: messageCount
|
2020-07-22 19:21:44 +00:00
|
|
|
font.pixelSize: chatsModel.unreadMessagesCount > 99 ? 10 : 12
|
2020-07-22 19:05:13 +00:00
|
|
|
color: Style.current.white
|
|
|
|
anchors.centerIn: parent
|
|
|
|
text: chatsModel.unreadMessagesCount
|
|
|
|
}
|
|
|
|
}
|
2020-08-14 17:26:36 +00:00
|
|
|
|
2020-05-11 21:24:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TabButton {
|
|
|
|
id: walletBtn
|
2020-09-15 19:47:13 +00:00
|
|
|
enabled: isExperimental === "1" || appSettings.walletEnabled
|
2020-06-26 14:08:08 +00:00
|
|
|
visible: this.enabled
|
2020-05-11 21:24:08 +00:00
|
|
|
width: 40
|
2020-06-26 14:08:08 +00:00
|
|
|
height: this.enabled ? 40 : 0
|
2020-05-11 21:24:08 +00:00
|
|
|
text: ""
|
2020-06-26 14:08:08 +00:00
|
|
|
anchors.topMargin: this.enabled ? 50 : 0
|
2020-05-11 21:24:08 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: chatBtn.top
|
|
|
|
background: Rectangle {
|
2020-07-13 18:45:54 +00:00
|
|
|
color: Style.current.secondaryBackground
|
2020-05-11 21:24:08 +00:00
|
|
|
opacity: parent.checked ? 1 : 0
|
|
|
|
radius: 50
|
|
|
|
}
|
|
|
|
|
2020-06-23 18:59:16 +00:00
|
|
|
SVGImage {
|
2020-05-11 21:24:08 +00:00
|
|
|
id: image1
|
2020-06-23 18:59:16 +00:00
|
|
|
height: 24
|
|
|
|
width: 24
|
2020-05-11 21:24:08 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
source: parent.checked ? "img/walletActive.svg" : "img/wallet.svg"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
TabButton {
|
|
|
|
id: profileBtn
|
|
|
|
width: 40
|
|
|
|
height: 40
|
|
|
|
text: ""
|
|
|
|
anchors.topMargin: 50
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2020-08-14 17:26:36 +00:00
|
|
|
anchors.top: walletBtn.top
|
2020-05-11 21:24:08 +00:00
|
|
|
background: Rectangle {
|
2020-07-13 18:45:54 +00:00
|
|
|
color: Style.current.secondaryBackground
|
2020-05-11 21:24:08 +00:00
|
|
|
opacity: parent.checked ? 1 : 0
|
|
|
|
radius: 50
|
|
|
|
}
|
|
|
|
|
2020-06-23 18:59:16 +00:00
|
|
|
SVGImage {
|
2020-05-11 21:24:08 +00:00
|
|
|
id: image3
|
2020-06-23 18:59:16 +00:00
|
|
|
height: 24
|
|
|
|
width: 24
|
2020-05-11 21:24:08 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
source: parent.checked ? "img/profileActive.svg" : "img/profile.svg"
|
|
|
|
}
|
|
|
|
}
|
2020-05-15 21:10:00 +00:00
|
|
|
|
|
|
|
TabButton {
|
|
|
|
id: nodeBtn
|
2020-06-26 14:08:08 +00:00
|
|
|
enabled: isExperimental === "1"
|
2020-06-18 12:03:11 +00:00
|
|
|
visible: this.enabled
|
2020-05-15 21:10:00 +00:00
|
|
|
width: 40
|
2020-06-18 12:03:11 +00:00
|
|
|
height: this.enabled ? 40 : 0
|
2020-05-15 21:10:00 +00:00
|
|
|
text: ""
|
2020-06-18 12:03:11 +00:00
|
|
|
anchors.topMargin: this.enabled ? 50 : 0
|
2020-05-15 21:10:00 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: profileBtn.top
|
|
|
|
background: Rectangle {
|
2020-07-13 18:45:54 +00:00
|
|
|
color: Style.current.secondaryBackground
|
2020-05-15 21:10:00 +00:00
|
|
|
opacity: parent.checked ? 1 : 0
|
|
|
|
radius: 50
|
|
|
|
}
|
|
|
|
|
2020-06-23 18:59:16 +00:00
|
|
|
SVGImage {
|
2020-05-15 21:10:00 +00:00
|
|
|
id: image4
|
2020-06-23 18:59:16 +00:00
|
|
|
height: 24
|
|
|
|
width: 24
|
2020-05-15 21:10:00 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
2020-06-23 18:59:16 +00:00
|
|
|
source: parent.checked ? "img/nodeActive.svg" : "img/node.svg"
|
2020-05-15 21:10:00 +00:00
|
|
|
}
|
|
|
|
}
|
2020-08-25 09:00:03 +00:00
|
|
|
|
|
|
|
TabButton {
|
|
|
|
id: uiComponentBtn
|
|
|
|
enabled: isExperimental === "1"
|
|
|
|
visible: this.enabled
|
|
|
|
width: 40
|
|
|
|
height: this.enabled ? 40 : 0
|
|
|
|
text: ""
|
|
|
|
anchors.topMargin: this.enabled ? 50 : 0
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: nodeBtn.top
|
|
|
|
background: Rectangle {
|
|
|
|
color: Style.current.secondaryBackground
|
|
|
|
opacity: parent.checked ? 1 : 0
|
|
|
|
radius: 50
|
|
|
|
}
|
|
|
|
|
|
|
|
SVGImage {
|
|
|
|
id: image5
|
|
|
|
height: 24
|
|
|
|
width: 24
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
source: parent.checked ? "img/nodeActive.svg" : "img/node.svg"
|
|
|
|
}
|
|
|
|
}
|
2020-05-11 21:24:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StackLayout {
|
2020-05-13 14:40:51 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
2020-05-11 21:24:08 +00:00
|
|
|
currentIndex: tabBar.currentIndex
|
2020-09-23 07:28:20 +00:00
|
|
|
onCurrentIndexChanged: {
|
|
|
|
if (typeof this.children[currentIndex].onActivated === "function") {
|
|
|
|
this.children[currentIndex].onActivated()
|
|
|
|
}
|
|
|
|
}
|
2020-05-11 21:24:08 +00:00
|
|
|
|
2020-05-13 17:27:06 +00:00
|
|
|
ChatLayout {
|
|
|
|
id: chatLayoutContainer
|
2020-05-11 21:24:08 +00:00
|
|
|
Layout.fillWidth: true
|
2020-05-13 17:27:06 +00:00
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
2020-05-11 21:24:08 +00:00
|
|
|
}
|
2020-05-13 18:17:18 +00:00
|
|
|
|
|
|
|
WalletLayout {
|
|
|
|
id: walletLayoutContainer
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
2020-05-15 21:10:00 +00:00
|
|
|
|
2020-05-19 19:44:45 +00:00
|
|
|
ProfileLayout {
|
|
|
|
id: profileLayoutContainer
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
2020-05-15 21:10:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
NodeLayout {
|
|
|
|
id: nodeLayoutContainer
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
2020-08-25 09:00:03 +00:00
|
|
|
|
|
|
|
UIComponents {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
2020-05-11 21:24:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
2020-05-13 17:27:06 +00:00
|
|
|
D{i:0;formeditorZoom:0.33000001311302185;height:770;width:1232}
|
2020-05-11 21:24:08 +00:00
|
|
|
}
|
|
|
|
##^##*/
|