2021-05-31 12:55:01 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Components 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
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
appView: Loader {
|
|
|
|
id: appView
|
|
|
|
anchors.fill: parent
|
|
|
|
sourceComponent: statusAppChatView
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: statusAppChatView
|
|
|
|
|
|
|
|
StatusAppTwoPanelLayout {
|
|
|
|
|
2021-06-17 12:58:19 +00:00
|
|
|
leftPanel: Item {
|
2021-05-31 12:55:01 +00:00
|
|
|
anchors.fill: parent
|
2021-06-17 12:58:19 +00:00
|
|
|
|
|
|
|
StatusNavigationPanelHeadline {
|
|
|
|
id: headline
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 16
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
text: "Chat"
|
|
|
|
}
|
|
|
|
|
2021-07-26 12:59:26 +00:00
|
|
|
Item {
|
|
|
|
id: searchInputWrapper
|
2021-06-17 12:58:19 +00:00
|
|
|
anchors.top: headline.bottom
|
|
|
|
anchors.topMargin: 16
|
2021-06-23 12:57:29 +00:00
|
|
|
width: parent.width
|
2021-07-26 12:59:26 +00:00
|
|
|
height: searchInput.height
|
|
|
|
|
|
|
|
StatusBaseInput {
|
|
|
|
id: searchInput
|
|
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: actionButton.left
|
|
|
|
anchors.leftMargin: 16
|
|
|
|
anchors.rightMargin: 16
|
|
|
|
|
|
|
|
height: 36
|
|
|
|
topPadding: 8
|
|
|
|
bottomPadding: 0
|
|
|
|
placeholderText: "Search"
|
|
|
|
icon.name: "search"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusRoundButton {
|
|
|
|
id: actionButton
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 8
|
|
|
|
width: 32
|
|
|
|
height: 32
|
|
|
|
|
|
|
|
type: StatusRoundButton.Type.Secondary
|
|
|
|
icon.name: "add"
|
|
|
|
state: "default"
|
|
|
|
|
|
|
|
onClicked: chatContextMenu.popup(actionButton.width-chatContextMenu.width, actionButton.height + 4)
|
|
|
|
states: [
|
|
|
|
State {
|
|
|
|
name: "default"
|
|
|
|
PropertyChanges {
|
|
|
|
target: actionButton
|
|
|
|
icon.rotation: 0
|
|
|
|
highlighted: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: "pressed"
|
|
|
|
PropertyChanges {
|
|
|
|
target: actionButton
|
|
|
|
icon.rotation: 45
|
|
|
|
highlighted: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
transitions: [
|
|
|
|
Transition {
|
|
|
|
from: "default"
|
|
|
|
to: "pressed"
|
|
|
|
|
|
|
|
RotationAnimation {
|
|
|
|
duration: 150
|
|
|
|
direction: RotationAnimation.Clockwise
|
|
|
|
easing.type: Easing.InCubic
|
|
|
|
}
|
|
|
|
},
|
|
|
|
Transition {
|
|
|
|
from: "pressed"
|
|
|
|
to: "default"
|
|
|
|
RotationAnimation {
|
|
|
|
duration: 150
|
|
|
|
direction: RotationAnimation.Counterclockwise
|
|
|
|
easing.type: Easing.OutCubic
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
StatusPopupMenu {
|
|
|
|
id: chatContextMenu
|
|
|
|
|
|
|
|
onOpened: {
|
|
|
|
actionButton.state = "pressed"
|
|
|
|
}
|
|
|
|
|
|
|
|
onClosed: {
|
|
|
|
actionButton.state = "default"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Start new chat"
|
|
|
|
icon.name: "private-chat"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Start group chat"
|
|
|
|
icon.name: "group-chat"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Join public chat"
|
|
|
|
icon.name: "public-chat"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Communities"
|
|
|
|
icon.name: "communities"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Column {
|
|
|
|
anchors.top: searchInputWrapper.bottom
|
|
|
|
anchors.topMargin: 16
|
|
|
|
width: parent.width
|
2021-06-23 12:57:29 +00:00
|
|
|
spacing: 8
|
2021-06-17 12:58:19 +00:00
|
|
|
|
2021-06-23 12:57:29 +00:00
|
|
|
StatusContactRequestsIndicatorListItem {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
title: "Contact requests"
|
|
|
|
requestsCount: 3
|
|
|
|
sensor.onClicked: demoContactRequestsModal.open()
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusChatList {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-06-23 10:04:19 +00:00
|
|
|
|
2021-07-23 16:28:16 +00:00
|
|
|
chatListItems.model: models.demoChatListItems
|
2021-06-23 12:57:29 +00:00
|
|
|
selectedChatId: "0"
|
|
|
|
onChatItemSelected: selectedChatId = id
|
|
|
|
onChatItemUnmuted: {
|
2021-07-23 16:28:16 +00:00
|
|
|
for (var i = 0; i < models.demoChatListItems.count; i++) {
|
|
|
|
let item = models.demoChatListItems.get(i);
|
2021-06-23 12:57:29 +00:00
|
|
|
if (item.chatId === id) {
|
2021-07-23 16:28:16 +00:00
|
|
|
models.demoChatListItems.setProperty(i, "muted", false)
|
2021-06-23 12:57:29 +00:00
|
|
|
}
|
2021-06-17 12:58:19 +00:00
|
|
|
}
|
2021-06-07 09:16:18 +00:00
|
|
|
}
|
2021-06-23 10:04:19 +00:00
|
|
|
|
2021-06-23 12:57:29 +00:00
|
|
|
popupMenu: StatusPopupMenu {
|
2021-06-23 10:04:19 +00:00
|
|
|
|
2021-06-23 12:57:29 +00:00
|
|
|
property string chatId
|
2021-06-23 10:04:19 +00:00
|
|
|
|
2021-06-25 10:26:29 +00:00
|
|
|
openHandler: function (id) {
|
|
|
|
chatId = id
|
|
|
|
}
|
|
|
|
|
2021-06-23 12:57:29 +00:00
|
|
|
StatusMenuItem {
|
|
|
|
text: "View Profile"
|
|
|
|
icon.name: "group-chat"
|
|
|
|
}
|
2021-06-23 10:04:19 +00:00
|
|
|
|
2021-06-23 12:57:29 +00:00
|
|
|
StatusMenuSeparator {}
|
2021-06-23 10:04:19 +00:00
|
|
|
|
2021-06-23 12:57:29 +00:00
|
|
|
StatusMenuItem {
|
|
|
|
text: "Mute chat"
|
|
|
|
icon.name: "notification"
|
|
|
|
}
|
2021-06-23 10:04:19 +00:00
|
|
|
|
2021-06-23 12:57:29 +00:00
|
|
|
StatusMenuItem {
|
|
|
|
text: "Mark as Read"
|
|
|
|
icon.name: "checkmark-circle"
|
|
|
|
}
|
2021-06-23 10:04:19 +00:00
|
|
|
|
2021-06-23 12:57:29 +00:00
|
|
|
StatusMenuItem {
|
|
|
|
text: "Clear history"
|
|
|
|
icon.name: "close-circle"
|
|
|
|
}
|
2021-06-23 10:04:19 +00:00
|
|
|
|
2021-06-23 12:57:29 +00:00
|
|
|
StatusMenuSeparator {}
|
2021-06-23 10:04:19 +00:00
|
|
|
|
2021-06-23 12:57:29 +00:00
|
|
|
StatusMenuItem {
|
|
|
|
text: "Delete chat"
|
|
|
|
icon.name: "delete"
|
|
|
|
type: StatusMenuItem.Type.Danger
|
|
|
|
}
|
2021-06-23 10:04:19 +00:00
|
|
|
}
|
|
|
|
}
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
rightPanel: Item {
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
StatusChatToolBar {
|
|
|
|
anchors.top: parent.top
|
|
|
|
width: parent.width
|
|
|
|
|
2021-07-22 14:41:29 +00:00
|
|
|
chatInfoButton.title: "Amazing Funny Squirrel"
|
2021-05-31 12:55:01 +00:00
|
|
|
chatInfoButton.subTitle: "Contact"
|
|
|
|
chatInfoButton.icon.color: Theme.palette.miscColor7
|
|
|
|
chatInfoButton.type: StatusChatInfoButton.Type.OneToOneChat
|
|
|
|
chatInfoButton.pinnedMessagesCount: 1
|
|
|
|
|
2021-07-09 11:59:40 +00:00
|
|
|
searchButton.visible: false
|
|
|
|
membersButton.visible: false
|
2021-05-31 12:55:01 +00:00
|
|
|
notificationCount: 1
|
|
|
|
|
|
|
|
onNotificationButtonClicked: notificationCount = 0
|
2021-06-02 10:41:31 +00:00
|
|
|
|
2021-06-08 13:45:27 +00:00
|
|
|
popupMenu: StatusPopupMenu {
|
2021-06-02 10:41:31 +00:00
|
|
|
id: contextMenu
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Mute Chat"
|
|
|
|
icon.name: "notification"
|
|
|
|
}
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Mark as Read"
|
|
|
|
icon.name: "checkmark-circle"
|
|
|
|
}
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Clear History"
|
|
|
|
icon.name: "close-circle"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuSeparator {}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Leave Chat"
|
|
|
|
icon.name: "arrow-right"
|
|
|
|
icon.width: 14
|
|
|
|
iconRotation: 180
|
|
|
|
type: StatusMenuItem.Type.Danger
|
|
|
|
}
|
|
|
|
}
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: statusAppCommunityView
|
|
|
|
|
2021-07-22 14:41:29 +00:00
|
|
|
StatusAppThreePanelLayout {
|
|
|
|
id: root
|
2021-07-26 14:39:35 +00:00
|
|
|
|
|
|
|
handle: Rectangle {
|
|
|
|
implicitWidth: 5
|
|
|
|
color: SplitHandle.pressed ? Theme.palette.baseColor2
|
2021-07-23 16:28:16 +00:00
|
|
|
: (SplitHandle.hovered ? Qt.darker(Theme.palette.baseColor5, 1.1) : "transparent")
|
2021-07-26 14:39:35 +00:00
|
|
|
}
|
2021-05-31 12:55:01 +00:00
|
|
|
leftPanel: Item {
|
2021-06-22 08:37:59 +00:00
|
|
|
id: leftPanel
|
2021-05-31 12:55:01 +00:00
|
|
|
|
2021-06-14 11:30:42 +00:00
|
|
|
StatusChatInfoToolBar {
|
2021-06-15 14:27:39 +00:00
|
|
|
id: statusChatInfoToolBar
|
2021-06-14 12:10:36 +00:00
|
|
|
|
2021-06-15 14:27:39 +00:00
|
|
|
anchors.top: parent.top
|
2021-06-14 12:10:36 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-06-15 14:27:39 +00:00
|
|
|
|
2021-06-22 08:37:59 +00:00
|
|
|
chatInfoButton.title: "CryptoKitties"
|
2021-06-14 11:30:42 +00:00
|
|
|
chatInfoButton.subTitle: "128 Members"
|
|
|
|
chatInfoButton.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
|
|
|
|
chatInfoButton.icon.color: Theme.palette.miscColor6
|
2021-06-14 12:10:36 +00:00
|
|
|
chatInfoButton.onClicked: demoCommunityDetailModal.open()
|
2021-06-14 11:30:42 +00:00
|
|
|
|
|
|
|
popupMenu: StatusPopupMenu {
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Create channel"
|
|
|
|
icon.name: "channel"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Create category"
|
|
|
|
icon.name: "channel-category"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuSeparator {}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Invite people"
|
|
|
|
icon.name: "share-ios"
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-22 08:37:59 +00:00
|
|
|
ScrollView {
|
|
|
|
id: scrollView
|
|
|
|
|
2021-06-15 14:27:39 +00:00
|
|
|
anchors.top: statusChatInfoToolBar.bottom
|
|
|
|
anchors.topMargin: 8
|
|
|
|
anchors.bottom: parent.bottom
|
2021-06-22 08:37:59 +00:00
|
|
|
width: leftPanel.width
|
2021-06-08 11:28:06 +00:00
|
|
|
|
2021-06-22 08:37:59 +00:00
|
|
|
contentHeight: communityCategories.height
|
|
|
|
clip: true
|
2021-06-08 11:28:06 +00:00
|
|
|
|
2021-06-22 08:37:59 +00:00
|
|
|
StatusChatListAndCategories {
|
|
|
|
id: communityCategories
|
|
|
|
width: leftPanel.width
|
2021-07-22 14:41:29 +00:00
|
|
|
height: implicitHeight > (leftPanel.height - 64) ? implicitHeight + 8 : leftPanel.height - 64
|
2021-06-08 11:28:06 +00:00
|
|
|
|
2021-07-28 11:08:56 +00:00
|
|
|
draggableItems: true
|
2021-08-26 19:33:45 +00:00
|
|
|
draggableCategories: false
|
2021-07-23 16:28:16 +00:00
|
|
|
chatList.model: models.demoCommunityChatListItems
|
|
|
|
categoryList.model: models.demoCommunityCategoryItems
|
2021-06-08 11:28:06 +00:00
|
|
|
|
2021-06-22 08:37:59 +00:00
|
|
|
showCategoryActionButtons: true
|
|
|
|
onChatItemSelected: selectedChatId = id
|
2021-06-08 11:28:06 +00:00
|
|
|
|
2021-06-22 08:37:59 +00:00
|
|
|
categoryPopupMenu: StatusPopupMenu {
|
2021-06-08 11:28:06 +00:00
|
|
|
|
2021-06-22 08:37:59 +00:00
|
|
|
property string categoryId
|
2021-06-08 11:28:06 +00:00
|
|
|
|
2021-06-25 10:26:29 +00:00
|
|
|
openHandler: function (id) {
|
|
|
|
categoryId = id
|
|
|
|
}
|
|
|
|
|
2021-06-22 08:37:59 +00:00
|
|
|
StatusMenuItem {
|
|
|
|
text: "Mute Category"
|
|
|
|
icon.name: "notification"
|
|
|
|
}
|
2021-06-08 11:28:06 +00:00
|
|
|
|
2021-07-22 14:41:29 +00:00
|
|
|
StatusMenuItem {
|
2021-06-22 08:37:59 +00:00
|
|
|
text: "Mark as Read"
|
|
|
|
icon.name: "checkmark-circle"
|
|
|
|
}
|
2021-06-08 11:28:06 +00:00
|
|
|
|
2021-07-22 14:41:29 +00:00
|
|
|
StatusMenuItem {
|
2021-06-22 08:37:59 +00:00
|
|
|
text: "Edit Category"
|
|
|
|
icon.name: "edit"
|
|
|
|
}
|
2021-06-15 14:27:39 +00:00
|
|
|
|
2021-06-22 08:37:59 +00:00
|
|
|
StatusMenuSeparator {}
|
2021-06-15 14:27:39 +00:00
|
|
|
|
2021-06-22 08:37:59 +00:00
|
|
|
StatusMenuItem {
|
|
|
|
text: "Delete Category"
|
|
|
|
icon.name: "delete"
|
|
|
|
type: StatusMenuItem.Type.Danger
|
|
|
|
}
|
2021-06-15 14:27:39 +00:00
|
|
|
}
|
|
|
|
|
2021-06-23 10:04:19 +00:00
|
|
|
chatListPopupMenu: StatusPopupMenu {
|
|
|
|
|
|
|
|
property string chatId
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Mute chat"
|
|
|
|
icon.name: "notification"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Mark as Read"
|
|
|
|
icon.name: "checkmark-circle"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Clear history"
|
|
|
|
icon.name: "close-circle"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuSeparator {}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Delete chat"
|
|
|
|
icon.name: "delete"
|
|
|
|
type: StatusMenuItem.Type.Danger
|
|
|
|
}
|
|
|
|
}
|
2021-06-15 14:27:39 +00:00
|
|
|
|
2021-06-22 08:37:59 +00:00
|
|
|
popupMenu: StatusPopupMenu {
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Create channel"
|
|
|
|
icon.name: "channel"
|
|
|
|
}
|
2021-06-15 14:27:39 +00:00
|
|
|
|
2021-06-22 08:37:59 +00:00
|
|
|
StatusMenuItem {
|
|
|
|
text: "Create category"
|
|
|
|
icon.name: "channel-category"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuSeparator {}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Invite people"
|
|
|
|
icon.name: "share-ios"
|
|
|
|
}
|
2021-06-15 14:27:39 +00:00
|
|
|
}
|
|
|
|
}
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|
|
|
|
}
|
2021-06-15 14:27:39 +00:00
|
|
|
|
2021-07-22 14:41:29 +00:00
|
|
|
centerPanel: Item {
|
2021-05-31 12:55:01 +00:00
|
|
|
StatusChatToolBar {
|
2021-07-23 16:28:16 +00:00
|
|
|
id: statusChatToolBar
|
2021-05-31 12:55:01 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
width: parent.width
|
|
|
|
|
2021-07-22 14:41:29 +00:00
|
|
|
chatInfoButton.title: "general"
|
2021-05-31 12:55:01 +00:00
|
|
|
chatInfoButton.subTitle: "Community Chat"
|
|
|
|
chatInfoButton.icon.color: Theme.palette.miscColor6
|
|
|
|
chatInfoButton.type: StatusChatInfoButton.Type.CommunityChat
|
2021-07-23 16:28:16 +00:00
|
|
|
onSearchButtonClicked: {
|
|
|
|
searchButton.highlighted = !searchButton.highlighted;
|
2021-08-16 12:06:51 +00:00
|
|
|
searchPopup.setSearchSelection(demoCommunityDetailModal.header.title,
|
|
|
|
"",
|
|
|
|
demoCommunityDetailModal.header.image.source);
|
2021-07-23 16:28:16 +00:00
|
|
|
searchPopup.open();
|
|
|
|
}
|
2021-07-13 15:05:31 +00:00
|
|
|
membersButton.onClicked: membersButton.highlighted = !membersButton.highlighted
|
2021-07-22 14:41:29 +00:00
|
|
|
onMembersButtonClicked: {
|
|
|
|
root.showRightPanel = !root.showRightPanel;
|
|
|
|
}
|
|
|
|
}
|
2021-07-23 16:28:16 +00:00
|
|
|
|
|
|
|
StatusSearchPopup {
|
|
|
|
id: searchPopup
|
|
|
|
searchOptionsPopupMenu: searchPopupMenu
|
|
|
|
onAboutToHide: {
|
|
|
|
if (searchPopupMenu.visible) {
|
|
|
|
searchPopupMenu.close();
|
|
|
|
}
|
|
|
|
//clear menu
|
|
|
|
for (var i = 2; i < searchPopupMenu.count; i++) {
|
|
|
|
searchPopupMenu.removeItem(searchPopupMenu.takeItem(i));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onClosed: {
|
|
|
|
statusChatToolBar.searchButton.highlighted = false
|
|
|
|
searchPopupMenu.dismiss();
|
|
|
|
}
|
|
|
|
onSearchTextChanged: {
|
|
|
|
if (searchPopup.searchText !== "") {
|
|
|
|
searchPopup.loading = true;
|
|
|
|
searchModelSimTimer.start();
|
|
|
|
} else {
|
|
|
|
searchPopup.searchResults = [];
|
|
|
|
searchModelSimTimer.stop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Timer {
|
|
|
|
id: searchModelSimTimer
|
|
|
|
interval: 500
|
|
|
|
onTriggered: {
|
|
|
|
if (searchPopup.searchText.startsWith("c")) {
|
|
|
|
searchPopup.searchResults = models.searchResultsA;
|
|
|
|
} else {
|
|
|
|
searchPopup.searchResults = models.searchResultsB;
|
|
|
|
}
|
|
|
|
searchPopup.loading = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
StatusSearchLocationMenu {
|
|
|
|
id: searchPopupMenu
|
|
|
|
searchPopup: searchPopup
|
2021-08-16 12:02:45 +00:00
|
|
|
locationModel: models.optionsModel
|
2021-07-23 16:28:16 +00:00
|
|
|
}
|
2021-07-22 14:41:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
rightPanel: Item {
|
2021-07-26 14:39:35 +00:00
|
|
|
id: rightPanel
|
2021-07-22 14:41:29 +00:00
|
|
|
StatusBaseText {
|
|
|
|
id: titleText
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin:16
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 16
|
2021-07-26 14:39:35 +00:00
|
|
|
opacity: (rightPanel.width > 50) ? 1.0 : 0.0
|
|
|
|
visible: (opacity > 0.1)
|
2021-07-22 14:41:29 +00:00
|
|
|
font.pixelSize: 15
|
|
|
|
text: qsTr("Members")
|
|
|
|
}
|
|
|
|
|
|
|
|
ListView {
|
|
|
|
anchors.top: titleText.bottom
|
|
|
|
anchors.topMargin: 16
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 8
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 8
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: 16
|
|
|
|
boundsBehavior: Flickable.StopAtBounds
|
|
|
|
model: ["John", "Nick", "Maria", "Mike"]
|
|
|
|
delegate: Row {
|
|
|
|
width: parent.width
|
|
|
|
height: 30
|
|
|
|
spacing: 8
|
|
|
|
Rectangle {
|
|
|
|
width: 24
|
|
|
|
height: 24
|
|
|
|
radius: width/2
|
|
|
|
color: Qt.rgba(Math.random(), Math.random(), Math.random(), 255)
|
|
|
|
}
|
|
|
|
StatusBaseText {
|
|
|
|
height: parent.height
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
2021-07-26 14:39:35 +00:00
|
|
|
opacity: (rightPanel.width > 50) ? 1.0 : 0.0
|
|
|
|
visible: (opacity > 0.1)
|
2021-07-22 14:41:29 +00:00
|
|
|
font.pixelSize: 15
|
2021-07-26 12:59:26 +00:00
|
|
|
color: Theme.palette.directColor1
|
2021-07-22 14:41:29 +00:00
|
|
|
text: modelData
|
|
|
|
}
|
|
|
|
}
|
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
|
|
|
|
|
|
|
|
StatusAppTwoPanelLayout {
|
|
|
|
|
|
|
|
leftPanel: Item {
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
StatusNavigationPanelHeadline {
|
|
|
|
id: profileHeadline
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 16
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
text: "Profile"
|
|
|
|
}
|
|
|
|
|
|
|
|
ScrollView {
|
|
|
|
anchors.top: profileHeadline.bottom
|
|
|
|
anchors.topMargin: 16
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
width: parent.width
|
|
|
|
|
|
|
|
contentHeight: profileMenuItems.height + 8
|
|
|
|
contentWidth: parent.width
|
|
|
|
clip: true
|
|
|
|
|
|
|
|
Column {
|
|
|
|
id: profileMenuItems
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
spacing: 4
|
|
|
|
|
|
|
|
Repeater {
|
2021-07-23 16:28:16 +00:00
|
|
|
model: models.demoProfileGeneralMenuItems
|
2021-06-17 13:10:55 +00:00
|
|
|
delegate: StatusNavigationListItem {
|
|
|
|
title: model.title
|
|
|
|
icon.name: model.icon
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusListSectionHeadline { text: "Settings" }
|
|
|
|
|
|
|
|
Repeater {
|
2021-07-23 16:28:16 +00:00
|
|
|
model: models.demoProfileSettingsMenuItems
|
2021-06-17 13:10:55 +00:00
|
|
|
delegate: StatusNavigationListItem {
|
|
|
|
title: model.title
|
|
|
|
icon.name: model.icon
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-22 14:41:29 +00:00
|
|
|
Item {
|
2021-06-17 13:10:55 +00:00
|
|
|
id: invisibleSeparator
|
|
|
|
height: 16
|
|
|
|
width: parent.width
|
|
|
|
}
|
|
|
|
|
|
|
|
Repeater {
|
2021-07-23 16:28:16 +00:00
|
|
|
model: models.demoProfileOtherMenuItems
|
2021-06-17 13:10:55 +00:00
|
|
|
delegate: StatusNavigationListItem {
|
|
|
|
title: model.title
|
|
|
|
icon.name: model.icon
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
rightPanel: Item {
|
|
|
|
anchors.fill: parent
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-23 12:57:29 +00:00
|
|
|
StatusModal {
|
|
|
|
id: demoContactRequestsModal
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
|
|
header.title: "Contact Requests"
|
|
|
|
headerActionButton: StatusFlatRoundButton {
|
|
|
|
type: StatusFlatRoundButton.Type.Secondary
|
|
|
|
width: 32
|
|
|
|
height: 32
|
|
|
|
|
|
|
|
icon.width: 20
|
|
|
|
icon.height: 20
|
|
|
|
icon.name: "notification"
|
|
|
|
}
|
|
|
|
|
|
|
|
content: StatusBaseText {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
text: "Contact request will be shown here"
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
text: "Decline all"
|
|
|
|
type: StatusBaseButton.Type.Danger
|
|
|
|
onClicked: demoContactRequestsModal.close()
|
|
|
|
},
|
|
|
|
StatusButton {
|
|
|
|
text: "Accept all"
|
|
|
|
onClicked: demoContactRequestsModal.close()
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2021-06-14 12:10:36 +00:00
|
|
|
StatusModal {
|
|
|
|
id: demoCommunityDetailModal
|
|
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
2021-07-22 14:41:29 +00:00
|
|
|
header.title: "Cryptokitties"
|
2021-06-14 12:10:36 +00:00
|
|
|
header.subTitle: "Public Community"
|
|
|
|
header.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
|
|
|
|
|
|
|
|
content: Column {
|
|
|
|
width: demoCommunityDetailModal.width
|
|
|
|
|
2021-07-22 14:41:29 +00:00
|
|
|
StatusModalDivider {
|
|
|
|
bottomPadding: 8
|
2021-06-14 12:10:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
text: "A community of cat lovers, meow!"
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
font.pixelSize: 15
|
|
|
|
height: 46
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.leftMargin: 16
|
|
|
|
anchors.rightMargin: 16
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusModalDivider {
|
|
|
|
topPadding: 8
|
|
|
|
bottomPadding: 8
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusDescriptionListItem {
|
|
|
|
title: "Share community"
|
|
|
|
subTitle: "https://join.status.im/u/0x04...45f19"
|
|
|
|
tooltip.text: "Copy to clipboard"
|
|
|
|
icon.name: "copy"
|
|
|
|
iconButton.onClicked: tooltip.visible = !tooltip.visible
|
|
|
|
width: parent.width
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusModalDivider {
|
|
|
|
topPadding: 8
|
|
|
|
bottomPadding: 8
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusListItem {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
statusListItemTitle.font.pixelSize: 17
|
|
|
|
title: "Members"
|
|
|
|
icon.name: "group-chat"
|
|
|
|
label: "184"
|
|
|
|
components: [
|
|
|
|
StatusIcon {
|
|
|
|
icon: "chevron-down"
|
|
|
|
rotation: 270
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusListItem {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
statusListItemTitle.font.pixelSize: 17
|
|
|
|
title: "Notifications"
|
|
|
|
icon.name: "notification"
|
|
|
|
components: [
|
|
|
|
StatusSwitch {}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusModalDivider {
|
|
|
|
topPadding: 8
|
|
|
|
bottomPadding: 8
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusListItem {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
statusListItemTitle.font.pixelSize: 17
|
|
|
|
title: "Edit community"
|
|
|
|
icon.name: "edit"
|
|
|
|
type: StatusListItem.Type.Secondary
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusListItem {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
statusListItemTitle.font.pixelSize: 17
|
|
|
|
title: "Transfer ownership"
|
|
|
|
icon.name: "exchange"
|
|
|
|
type: StatusListItem.Type.Secondary
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusListItem {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
statusListItemTitle.font.pixelSize: 17
|
|
|
|
title: "Leave community"
|
|
|
|
icon.name: "arrow-right"
|
|
|
|
icon.rotation: 180
|
|
|
|
type: StatusListItem.Type.Secondary
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-23 16:28:16 +00:00
|
|
|
Models {
|
|
|
|
id: models
|
2021-06-17 13:10:55 +00:00
|
|
|
}
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|