extract contacts EmptyView into its own file

This commit is contained in:
Iuri Matias 2020-05-27 20:21:02 -04:00
parent 3fb595dcc4
commit 839afd6356
3 changed files with 77 additions and 69 deletions

View File

@ -7,6 +7,7 @@ import QtGraphicalEffects 1.12
import "../../../imports" import "../../../imports"
import "../../../shared" import "../../../shared"
import "./components" import "./components"
import "./ContactsColumn"
Item { Item {
property alias chatGroupsListViewCount: chatGroupsListView.count property alias chatGroupsListViewCount: chatGroupsListView.count
@ -188,75 +189,7 @@ Item {
currentIndex: chatGroupsListView.count > 0 ? 1 : 0 currentIndex: chatGroupsListView.count > 0 ? 1 : 0
Item { EmptyView {}
id: suggestionsContainer
Layout.fillHeight: true
Layout.fillWidth: true
Row {
id: description
anchors.right: parent.right
anchors.rightMargin: 20
anchors.left: parent.left
anchors.leftMargin: 20
Text {
width: parent.width
text: qsTr("Follow your interests in one of the many Public Chats.")
font.pointSize: 15
wrapMode: Text.WordWrap
verticalAlignment: Text.AlignTop
horizontalAlignment: Text.AlignHCenter
fontSizeMode: Text.FixedSize
renderType: Text.QtRendering
onLinkActivated: console.log(link)
}
}
RowLayout {
id: row
anchors.right: parent.right
anchors.rightMargin: 20
anchors.left: parent.left
anchors.leftMargin: 20
anchors.top: description.bottom
anchors.topMargin: 20
Flow {
Layout.fillHeight: false
Layout.fillWidth: true
spacing: 6
SuggestedChannel {
channel: "introductions"
}
SuggestedChannel {
channel: "chitchat"
}
SuggestedChannel {
channel: "status"
}
SuggestedChannel {
channel: "crypto"
}
SuggestedChannel {
channel: "tech"
}
SuggestedChannel {
channel: "music"
}
SuggestedChannel {
channel: "movies"
}
SuggestedChannel {
channel: "test"
}
SuggestedChannel {
channel: "test2"
}
}
}
}
Item { Item {
id: chatGroupsContainer id: chatGroupsContainer

View File

@ -0,0 +1,74 @@
import QtQuick 2.12
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import "../components"
Item {
id: suggestionsContainer
Layout.fillHeight: true
Layout.fillWidth: true
Row {
id: description
anchors.right: parent.right
anchors.rightMargin: 20
anchors.left: parent.left
anchors.leftMargin: 20
Text {
width: parent.width
text: qsTr("Follow your interests in one of the many Public Chats.")
font.pointSize: 15
wrapMode: Text.WordWrap
verticalAlignment: Text.AlignTop
horizontalAlignment: Text.AlignHCenter
fontSizeMode: Text.FixedSize
renderType: Text.QtRendering
onLinkActivated: console.log(link)
}
}
RowLayout {
id: row
anchors.right: parent.right
anchors.rightMargin: 20
anchors.left: parent.left
anchors.leftMargin: 20
anchors.top: description.bottom
anchors.topMargin: 20
Flow {
Layout.fillHeight: false
Layout.fillWidth: true
spacing: 6
SuggestedChannel {
channel: "introductions"
}
SuggestedChannel {
channel: "chitchat"
}
SuggestedChannel {
channel: "status"
}
SuggestedChannel {
channel: "crypto"
}
SuggestedChannel {
channel: "tech"
}
SuggestedChannel {
channel: "music"
}
SuggestedChannel {
channel: "movies"
}
SuggestedChannel {
channel: "test"
}
SuggestedChannel {
channel: "test2"
}
}
}
}

View File

@ -0,0 +1 @@
EmptyView 1.0 EmptyView.qml