2021-05-31 12:55:01 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Layout 0.1
|
2021-06-02 10:41:31 +00:00
|
|
|
import StatusQ.Popups 0.1
|
2021-08-27 13:21:00 +00:00
|
|
|
import StatusQ.Platform 0.1
|
2021-05-31 12:55:01 +00:00
|
|
|
|
2022-01-18 19:54:45 +00:00
|
|
|
import "demoapp"
|
|
|
|
|
2021-05-31 12:55:01 +00:00
|
|
|
Rectangle {
|
|
|
|
id: demoApp
|
|
|
|
height: 602
|
2021-07-26 13:13:04 +00:00
|
|
|
width: 1002
|
2021-05-31 12:55:01 +00:00
|
|
|
border.width: 1
|
|
|
|
border.color: Theme.palette.baseColor2
|
|
|
|
|
2021-08-27 13:21:00 +00:00
|
|
|
property string titleStyle: "osx"
|
2021-05-31 12:55:01 +00:00
|
|
|
|
2021-08-27 13:21:00 +00:00
|
|
|
StatusMacTrafficLights {
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.margins: 13
|
2021-05-31 12:55:01 +00:00
|
|
|
z: statusAppLayout.z + 1
|
2021-08-27 13:21:00 +00:00
|
|
|
visible: titleStyle === "osx"
|
|
|
|
}
|
2021-05-31 12:55:01 +00:00
|
|
|
|
2021-08-27 13:21:00 +00:00
|
|
|
StatusWindowsTitleBar {
|
|
|
|
id: windowsTitle
|
|
|
|
anchors.top: parent.top
|
|
|
|
width: parent.width
|
|
|
|
z: statusAppLayout.z + 1
|
|
|
|
visible: titleStyle === "windows"
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusAppLayout {
|
|
|
|
id: statusAppLayout
|
2021-08-27 13:21:00 +00:00
|
|
|
anchors.top: windowsTitle.visible ? windowsTitle.bottom : demoApp.top
|
2021-05-31 12:55:01 +00:00
|
|
|
anchors.left: demoApp.left
|
|
|
|
anchors.topMargin: demoApp.border.width
|
|
|
|
anchors.leftMargin: demoApp.border.width
|
|
|
|
|
|
|
|
height: demoApp.height - demoApp.border.width * 2
|
|
|
|
width: demoApp.width - demoApp.border.width * 2
|
|
|
|
|
|
|
|
appNavBar: StatusAppNavBar {
|
|
|
|
|
2021-06-11 11:08:12 +00:00
|
|
|
id: navBar
|
|
|
|
|
2021-05-31 12:55:01 +00:00
|
|
|
navBarChatButton: StatusNavBarTabButton {
|
|
|
|
icon.name: "chat"
|
|
|
|
tooltip.text: "Chat"
|
|
|
|
checked: appView.sourceComponent == statusAppChatView
|
|
|
|
onClicked: {
|
|
|
|
appView.sourceComponent = statusAppChatView
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
navBarCommunityTabButtons.model: ListModel {
|
|
|
|
ListElement {
|
|
|
|
name: "Status Community"
|
|
|
|
tooltipText: "Status Community"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
navBarCommunityTabButtons.delegate: StatusNavBarTabButton {
|
2021-06-11 11:08:12 +00:00
|
|
|
id: communityBtn
|
2021-05-31 12:55:01 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
name: model.name
|
|
|
|
tooltip.text: model.tooltipText
|
|
|
|
icon.color: Theme.palette.miscColor6
|
|
|
|
icon.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
|
|
|
|
checked: appView.sourceComponent == statusAppCommunityView
|
|
|
|
onClicked: {
|
|
|
|
appView.sourceComponent = statusAppCommunityView
|
|
|
|
}
|
2021-06-11 11:08:12 +00:00
|
|
|
|
|
|
|
popupMenu: StatusPopupMenu {
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: qsTr("Invite People")
|
|
|
|
icon.name: "share-ios"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: qsTr("View Community")
|
|
|
|
icon.name: "group"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: qsTr("Edit Community")
|
|
|
|
icon.name: "edit"
|
2021-06-11 11:20:26 +00:00
|
|
|
enabled: false
|
2021-06-11 11:08:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuSeparator {}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: qsTr("Leave Community")
|
|
|
|
icon.name: "arrow-right"
|
|
|
|
icon.width: 14
|
|
|
|
iconRotation: 180
|
|
|
|
type: StatusMenuItem.Type.Danger
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
navBarTabButtons: [
|
|
|
|
StatusNavBarTabButton {
|
|
|
|
icon.name: "wallet"
|
|
|
|
tooltip.text: "Wallet"
|
|
|
|
},
|
|
|
|
StatusNavBarTabButton {
|
2021-08-31 09:19:24 +00:00
|
|
|
icon.name: "bigger/browser"
|
2021-05-31 12:55:01 +00:00
|
|
|
tooltip.text: "Browser"
|
|
|
|
},
|
|
|
|
StatusNavBarTabButton {
|
2021-08-31 09:19:24 +00:00
|
|
|
icon.name: "bigger/status-update"
|
2021-05-31 12:55:01 +00:00
|
|
|
tooltip.text: "Timeline"
|
|
|
|
},
|
|
|
|
StatusNavBarTabButton {
|
|
|
|
id: profileNavButton
|
2021-08-31 09:19:24 +00:00
|
|
|
icon.name: "bigger/settings"
|
2021-05-31 12:55:01 +00:00
|
|
|
badge.visible: true
|
|
|
|
badge.anchors.rightMargin: 4
|
|
|
|
badge.anchors.topMargin: 5
|
|
|
|
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusAppNavBar.backgroundColor
|
|
|
|
badge.border.width: 2
|
|
|
|
|
|
|
|
tooltip.text: "Profile"
|
2021-06-17 13:10:55 +00:00
|
|
|
|
|
|
|
checked: appView.sourceComponent == statusAppProfileSettingsView
|
|
|
|
onClicked: {
|
|
|
|
appView.sourceComponent = statusAppProfileSettingsView
|
|
|
|
}
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|
|
|
|
]
|
2021-12-16 10:17:03 +00:00
|
|
|
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
appView: Loader {
|
|
|
|
id: appView
|
|
|
|
anchors.fill: parent
|
|
|
|
sourceComponent: statusAppChatView
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: statusAppChatView
|
2022-01-18 19:54:45 +00:00
|
|
|
StatusAppChatView { }
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: statusAppCommunityView
|
2022-01-18 19:54:45 +00:00
|
|
|
StatusAppCommunityView {
|
|
|
|
communityDetailModalTitle: demoCommunityDetailModal.header.title
|
|
|
|
communityDetailModalImage: demoCommunityDetailModal.header.image.source
|
|
|
|
onChatInfoButtonClicked: {
|
|
|
|
demoCommunityDetailModal.open();
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-06-07 09:16:18 +00:00
|
|
|
|
2021-06-17 13:10:55 +00:00
|
|
|
Component {
|
|
|
|
id: statusAppProfileSettingsView
|
2022-01-18 19:54:45 +00:00
|
|
|
StatusAppProfileSettingsView { }
|
2021-06-17 13:10:55 +00:00
|
|
|
}
|
|
|
|
|
2022-01-18 19:54:45 +00:00
|
|
|
DemoContactRequestsModal {
|
2021-06-23 12:57:29 +00:00
|
|
|
id: demoContactRequestsModal
|
|
|
|
anchors.centerIn: parent
|
|
|
|
}
|
|
|
|
|
2022-01-18 19:54:45 +00:00
|
|
|
DemoCommunityDetailModal {
|
2021-06-14 12:10:36 +00:00
|
|
|
id: demoCommunityDetailModal
|
2021-06-17 13:10:55 +00:00
|
|
|
}
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|