diff --git a/qml/Contact.qml b/qml/Contact.qml
new file mode 100644
index 000000000..4fb5113b6
--- /dev/null
+++ b/qml/Contact.qml
@@ -0,0 +1,20 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import "qrc:/qml/form"
+
+Page {
+ property var contactListModel
+
+ ListForm {
+ id: roomListForm
+ height: parent.height
+ width: 320
+ listModel: roomListModel
+ }
+
+ DetailForm {
+ id: detailForm
+ anchors.fill: parent
+ anchors.leftMargin: roomListForm.width
+ }
+}
diff --git a/qml/Room.qml b/qml/Room.qml
index 2580cc17e..16027572d 100644
--- a/qml/Room.qml
+++ b/qml/Room.qml
@@ -5,7 +5,7 @@ import "qrc:/qml/form"
Page {
property var roomListModel
- RoomListForm {
+ ListForm {
id: roomListForm
height: parent.height
width: 320
diff --git a/qml/component/ImageStatus.qml b/qml/component/ImageStatus.qml
index d38cb5a96..3619d9eb2 100644
--- a/qml/component/ImageStatus.qml
+++ b/qml/component/ImageStatus.qml
@@ -3,6 +3,8 @@ import QtQuick.Controls 2.3
import QtGraphicalEffects 1.0
Image {
+ property bool statusIndicator
+
id: avatar
mipmap: true
@@ -30,5 +32,6 @@ Image {
color: "transparent"
border.color: "#4caf50"
border.width: 4
+ visible: statusIndicator
}
}
diff --git a/qml/form/RoomDetailForm.qml b/qml/form/DetailForm.qml
similarity index 100%
rename from qml/form/RoomDetailForm.qml
rename to qml/form/DetailForm.qml
diff --git a/qml/form/RoomListForm.qml b/qml/form/ListForm.qml
similarity index 100%
rename from qml/form/RoomListForm.qml
rename to qml/form/ListForm.qml
diff --git a/qml/main.qml b/qml/main.qml
index 493c47252..af02e7515 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -51,6 +51,7 @@ ApplicationWindow {
height: parent.width
source: "qrc:/asset/img/avatar.png"
anchors.horizontalCenter: parent.horizontalCenter
+ statusIndicator: true
}
page: Room {
@@ -80,6 +81,21 @@ ApplicationWindow {
}
}
+ ButtonDelegate {
+ contentItem: Text {
+ text: "\ue5d2"
+ font.pointSize: 16
+ font.family: materialFont.name
+ color: "white"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ page: Contact {
+ id: contactPage
+ }
+ }
+
ButtonDelegate {
contentItem: Text {
text: "\ue8b8"
diff --git a/res.qrc b/res.qrc
index cced5d8b3..31019810f 100644
--- a/res.qrc
+++ b/res.qrc
@@ -11,8 +11,9 @@
qml/component/ImageStatus.qml
qml/component/SideNav.qml
qml/form/RoomForm.qml
- qml/form/RoomListForm.qml
qml/Room.qml
- qml/form/RoomDetailForm.qml
+ qml/form/DetailForm.qml
+ qml/form/ListForm.qml
+ qml/Contact.qml