feat: add view when clicking the X on the EmptyView
This commit is contained in:
parent
fc80e1e1ac
commit
284572898a
|
@ -57,24 +57,35 @@ Item {
|
|||
}
|
||||
|
||||
StackLayout {
|
||||
id: contactsStackView
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 0
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 0
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.top: searchBox.bottom
|
||||
anchors.topMargin: 16
|
||||
anchors.topMargin: Style.current.padding
|
||||
|
||||
currentIndex: channelList.channelListCount > 0 ? 1 : 0
|
||||
function getCurrentIndex() {
|
||||
return channelList.channelListCount > 0 ? 1 : 0
|
||||
}
|
||||
|
||||
EmptyView {}
|
||||
currentIndex: getCurrentIndex()
|
||||
|
||||
EmptyView {
|
||||
onCloseButtonPressed: function () {
|
||||
contactsStackView.currentIndex = 2
|
||||
}
|
||||
}
|
||||
|
||||
ChannelList {
|
||||
id: channelList
|
||||
searchStr: contactsColumn.searchStr
|
||||
onChannelListCountChanged: {
|
||||
contactsStackView.currentIndex = contactsStackView.getCurrentIndex()
|
||||
}
|
||||
}
|
||||
|
||||
ClosedEmptyView {}
|
||||
}
|
||||
}
|
||||
|
||||
/*##^##
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
import QtGraphicalEffects 1.13
|
||||
import "../components"
|
||||
import "../../../../shared"
|
||||
import "../../../../imports"
|
||||
|
||||
Item {
|
||||
id: closedEmptyView
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
StyledText {
|
||||
text: qsTr("Your chats will appear here. To start new chats press the button at the top")
|
||||
anchors.verticalCenterOffset: -80
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.WordWrap
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 56
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 56
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.pixelSize: 15
|
||||
color: Style.current.darkGrey
|
||||
}
|
||||
}
|
||||
|
||||
/*##^##
|
||||
Designer {
|
||||
D{i:0;autoSize:true;formeditorColor:"#ffffff";formeditorZoom:1.25;height:500;width:300}
|
||||
}
|
||||
##^##*/
|
|
@ -7,11 +7,14 @@ import "../../../../shared"
|
|||
import "../../../../imports"
|
||||
|
||||
Item {
|
||||
property var onCloseButtonPressed: function () {}
|
||||
|
||||
id: emptyView
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
Rectangle {
|
||||
id: emptyView
|
||||
id: emptyViewContent
|
||||
border.color: Style.current.grey
|
||||
radius: 16
|
||||
anchors.right: parent.right
|
||||
|
@ -54,8 +57,15 @@ Item {
|
|||
source: closeImg
|
||||
color: Style.current.darkGrey
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: closeImg
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
emptyView.onCloseButtonPressed()
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: chatAndTransactText
|
||||
text: qsTr("Chat and transact privately with your friends")
|
||||
anchors.top: parent.top
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
EmptyView 1.0 EmptyView.qml
|
||||
ClosedEmptyView 1.0 ClosedEmptyView.qml
|
||||
ChannelList 1.0 ChannelList.qml
|
||||
|
|
|
@ -55,6 +55,7 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
|
|||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
DISTFILES += \
|
||||
app/AppLayouts/Chat/ContactsColumn/ClosedEmptyView.qml \
|
||||
app/AppLayouts/Chat/components/EmojiPopup.qml \
|
||||
fonts/InterStatus/InterStatus-Black.otf \
|
||||
fonts/InterStatus/InterStatus-BlackItalic.otf \
|
||||
|
|
Loading…
Reference in New Issue