status-desktop/ui/app/AppLayouts/Chat/ContactsColumn.qml

144 lines
3.3 KiB
QML
Raw Normal View History

2020-06-17 19:18:31 +00:00
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import "../../../imports"
import "../../../shared"
import "./components"
import "./ContactsColumn"
2020-12-11 20:38:10 +00:00
import "./CommunityComponents"
Rectangle {
2020-05-28 11:06:17 +00:00
property alias chatGroupsListViewCount: channelList.channelListCount
property alias searchStr: searchBox.text
id: contactsColumn
2020-05-27 18:40:58 +00:00
Layout.fillHeight: true
color: Style.current.secondaryMenuBackground
2020-05-27 18:40:58 +00:00
StyledText {
2020-05-27 18:40:58 +00:00
id: title
//% "Chat"
text: qsTrId("chat")
2020-05-27 18:40:58 +00:00
anchors.top: parent.top
2020-07-15 19:38:03 +00:00
anchors.topMargin: Style.current.padding
2020-05-27 18:40:58 +00:00
anchors.horizontalCenter: parent.horizontalCenter
2020-07-15 19:38:03 +00:00
font.weight: Font.Bold
2020-05-27 18:40:58 +00:00
font.pixelSize: 17
}
2020-12-11 20:29:46 +00:00
Component {
id: publicChatPopupComponent
PublicChatPopup {
onClosed: {
destroy()
}
}
}
2020-12-11 20:29:46 +00:00
Component {
id: groupChatPopupComponent
GroupChatPopup {
onClosed: {
destroy()
}
}
2020-06-17 15:56:48 +00:00
}
2020-12-11 20:29:46 +00:00
Component {
id: privateChatPopupComponent
PrivateChatPopup {
onClosed: {
destroy()
}
}
}
Component {
id: communitiesPopupComponent
CommunitiesPopup {
onClosed: {
destroy()
}
}
}
Component {
id: createCommunitiesPopupComponent
CreateCommunityPopup {
onClosed: {
destroy()
}
}
}
2020-12-18 20:55:33 +00:00
Component {
id: importCommunitiesPopupComponent
2021-02-12 18:19:31 +00:00
AccessExistingCommunityPopup {
2020-12-18 20:55:33 +00:00
onClosed: {
destroy()
}
}
}
2020-12-11 20:29:46 +00:00
Component {
id: communityDetailPopup
CommunityDetailPopup {
onClosed: {
destroy()
}
}
2020-05-28 12:56:43 +00:00
}
2020-05-28 11:19:18 +00:00
SearchBox {
2020-05-27 18:40:58 +00:00
id: searchBox
2020-07-15 19:38:03 +00:00
anchors.top: title.bottom
anchors.topMargin: Style.current.padding
anchors.right: addChat.left
anchors.rightMargin: Style.current.padding
anchors.left: parent.left
anchors.leftMargin: Style.current.padding
2020-05-27 18:40:58 +00:00
}
2020-05-28 11:32:05 +00:00
AddChat {
2020-06-17 19:18:31 +00:00
id: addChat
anchors.right: parent.right
anchors.rightMargin: Style.current.padding
2020-07-15 19:38:03 +00:00
anchors.top: title.bottom
anchors.topMargin: Style.current.padding
}
2020-12-11 20:29:46 +00:00
ScrollView {
id: chatGroupsContainer
anchors.top: searchBox.bottom
anchors.topMargin: Style.current.padding
2020-05-27 18:40:58 +00:00
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
2020-12-11 20:29:46 +00:00
leftPadding: Style.current.halfPadding
rightPadding: Style.current.halfPadding
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
contentHeight: communitiesListLoader.height + channelList.height + 2 * Style.current.padding + emptyViewAndSuggestions.height
2020-12-11 20:29:46 +00:00
clip: true
ChannelList {
id: channelList
2020-12-11 20:38:10 +00:00
searchStr: contactsColumn.searchStr.toLowerCase()
2020-12-11 20:29:46 +00:00
channelModel: chatsModel.chats
}
EmptyView {
id: emptyViewAndSuggestions
width: parent.width
anchors.top: channelList.bottom
anchors.topMargin: Style.current.smallPadding
}
}
}
/*##^##
Designer {
D{i:0;autoSize:true;formeditorColor:"#ffffff";height:480;width:640}
}
##^##*/