diff --git a/assets/core/negative_heart_24px.svg b/assets/core/negative_heart_24px.svg
new file mode 100644
index 00000000..05f00c83
--- /dev/null
+++ b/assets/core/negative_heart_24px.svg
@@ -0,0 +1,13 @@
+
+
+
diff --git a/i18n/translation_de.qm b/i18n/translation_de.qm
index c442202f..c40eed58 100644
Binary files a/i18n/translation_de.qm and b/i18n/translation_de.qm differ
diff --git a/i18n/translation_de.ts b/i18n/translation_de.ts
index 5e0ea234..f02c4128 100644
--- a/i18n/translation_de.ts
+++ b/i18n/translation_de.ts
@@ -114,22 +114,35 @@
ListOverlay
-
Add a New List Item
- Liste hinzufügen
+ Liste hinzufügen
-
Add a new item to the list
- Neues Listenelement hinzüfgen
+ Neues Listenelement hinzüfgen
-
Todo... placeholder text
- noch zu erledigen
+ noch zu erledigen
+
+
+
+
+ ex: "... paste an address here to add a contact ..."
+
+
+
+
+
+
+
+
+
+
+
diff --git a/i18n/translation_en.qm b/i18n/translation_en.qm
index 295db41b..979ff02e 100644
Binary files a/i18n/translation_en.qm and b/i18n/translation_en.qm differ
diff --git a/i18n/translation_en.ts b/i18n/translation_en.ts
index d075bdc8..e0103c3c 100644
--- a/i18n/translation_en.ts
+++ b/i18n/translation_en.ts
@@ -209,22 +209,20 @@ Right-click to reset.
ListOverlay
-
-
- Add a New List Item
- Add a New List Item
+
+
+ ex: "... paste an address here to add a contact ..."
+ Search List
-
-
- Add a new item to the list
- Add a new item to the list
+
+
+ Peer is Offline. Applications cannot be used right now.
-
-
- Todo... placeholder text
- Todo...
+
+
+ Add Item
diff --git a/i18n/translation_fr.qm b/i18n/translation_fr.qm
index 3026fc59..3b814608 100644
Binary files a/i18n/translation_fr.qm and b/i18n/translation_fr.qm differ
diff --git a/i18n/translation_fr.ts b/i18n/translation_fr.ts
index f80bbf5b..1d9a1971 100644
--- a/i18n/translation_fr.ts
+++ b/i18n/translation_fr.ts
@@ -114,22 +114,35 @@
ListOverlay
-
Add a New List Item
- Ajouter un nouvel élément
+ Ajouter un nouvel élément
-
Add a new item to the list
- Ajouter un nouvel élément à la liste
+ Ajouter un nouvel élément à la liste
-
Todo... placeholder text
- A faire...
+ A faire...
+
+
+
+
+ ex: "... paste an address here to add a contact ..."
+
+
+
+
+
+
+
+
+
+
+
diff --git a/i18n/translation_pt.qm b/i18n/translation_pt.qm
index 39f9c4bd..b6c2805f 100644
Binary files a/i18n/translation_pt.qm and b/i18n/translation_pt.qm differ
diff --git a/i18n/translation_pt.ts b/i18n/translation_pt.ts
index 0f7938bc..77dcfe2d 100644
--- a/i18n/translation_pt.ts
+++ b/i18n/translation_pt.ts
@@ -114,22 +114,35 @@
ListOverlay
-
Add a New List Item
- Adicionar Item à Lista
+ Adicionar Item à Lista
-
Add a new item to the list
- Adicionar novo item à lista
+ Adicionar novo item à lista
-
Todo... placeholder text
- Afazer…
+ Afazer…
+
+
+
+
+ ex: "... paste an address here to add a contact ..."
+
+
+
+
+
+
+
+
+
+
+
diff --git a/qml/overlays/ListOverlay.qml b/qml/overlays/ListOverlay.qml
index 0ed706ce..444f9696 100644
--- a/qml/overlays/ListOverlay.qml
+++ b/qml/overlays/ListOverlay.qml
@@ -10,38 +10,65 @@ import "../opaque/controls" as Awesome
import "../opaque/fonts/Twemoji.js" as T
import "../utils.js" as Utils
import "../opaque/styles"
+import "../opaque/theme"
ColumnLayout {
Layout.fillWidth: true
width:parent.width
+ id: listpanel
+ property bool online: false
Text {
Layout.fillWidth: true
}
- TextField {
+ Opaque.IconTextField {
id: filter
-
- placeholderText: "Search.."
-
- style: CwtchTextFieldStyle{}
-
+ visible:listpanel.online
anchors.left: parent.left
anchors.right: parent.right
-
anchors.margins: 10
+ //: ex: "... paste an address here to add a contact ..."
+ placeholderText: qsTr("search-list")
+ horizontalAlignment: TextInput.AlignHCenter
+ icon: gcd.assetPath + "core/search-24px.svg"
+
+
onTextChanged: {
- bulletinView.filter = text
- if (bulletinView.model.get(bulletinView.currentIndex).title.indexOf(text) == -1) {
- bulletinView.currentIndex = -1
+ listView.filter = text
+ if (listView.model.get(listView.currentIndex).title.indexOf(text) == -1) {
+ listView.currentIndex = -1
}
}
}
+
+
+ Opaque.Icon {
+ visible:!listpanel.online
+ source: gcd.assetPath + "core/negative_heart_24px.svg"
+ iconColor: Theme.mainTextColor
+ backgroundColor: Theme.backgroundPaneColor
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+ height: 150
+ width: 150
+ }
+ Opaque.EllipsisLabel {
+ visible:!listpanel.online
+ color: Theme.mainTextColor
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+ size: 18 * gcd.themeScale
+ text: qsTr("peer-not-online")
+ }
+
+
+
+
Flickable { // THE MESSAGE LIST ITSELF
id: sv
clip: true
+ visible:listpanel.online
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
Layout.fillHeight: true
Layout.fillWidth: true
@@ -87,25 +114,22 @@ ColumnLayout {
})
}
- /*if(msg.c != undefined) {
- jsonModel4.get(msg.c).complete = true
+ if(msg.c != undefined) {
+ jsonModel4.get(msg.c).complete = true
}
-
- if (sv.contentY + sv.height >= sv.contentHeight - colMessages.height && sv.contentHeight > sv.height) {
- sv.contentY = sv.contentHeight - sv.height
- }*/
}
onUpdateContactStatus: function(_handle, _status, _loading) {
if (gcd.selectedConversation == _handle) {
- if (_loading == true) {
- newposttitle.enabled = false
- btnSend.enabled = false
- } else {
- newposttitle.enabled = true
- btnSend.enabled = true
- }
+ // Group is Synced OR p2p is Authenticated
+ if ( (_handle.length == 32 && _status == 4) || (_handle.length == 56 && _status == 3) ) {
+ newlistitem.readOnly = false
+ listpanel.online = true
+ } else {
+ newlistitem.readOnly = true
+ listpanel.online= false
+ }
}
}
}
@@ -115,7 +139,7 @@ ColumnLayout {
}
ListView {
- id: bulletinView
+ id: listView
anchors.left: parent.left
anchors.leftMargin: 10
anchors.topMargin: 10
@@ -130,8 +154,8 @@ ColumnLayout {
Item {
width: parent.width
- height: title.indexOf(bulletinView.filter) >= 0 ? texttitle.height : 0
- visible: title.indexOf(bulletinView.filter) >= 0
+ height: title.indexOf(listView.filter) >= 0 ? texttitle.height : 0
+ visible: title.indexOf(listView.filter) >= 0
Column {
width: parent.width
@@ -141,31 +165,24 @@ ColumnLayout {
checked: complete
onClicked: {
var msg = JSON.stringify({"o":4, "c":index})
- gcd.sendMessage(msg, btnSend.nextMessageID++)
+ gcd.sendMessage(msg, newlistitem.nextMessageID++)
}
}
RowLayout {
Text {
id: texttitle
- text: '' + Utils.htmlEscaped(title) + ' by ' + from + "
" + timestamp
+ text: '' + Utils.htmlEscaped(title) + ' by ' + displayName + "
" + timestamp
leftPadding: 10
topPadding: 5
bottomPadding:5
- color: windowItem.cwtch_dark_color
+ color: Theme.mainTextColor
}
}
}
- Rectangle {
- height: 1
- color: windowItem.cwtch_color
- anchors {
- left: parent.left
- right: parent.right
- }
- }
+ Opaque.HLine{}
}
@@ -179,55 +196,28 @@ ColumnLayout {
}
}
- GroupBox {
- //: Add a New List Item
- title: qsTr("add-list-item")
- Layout.fillWidth: true
+ Opaque.ButtonTextField {
+ id: newlistitem
+ visible:listpanel.online
+ readOnly: false
+ button_text: qsTr("add-list-item-btn")
+ dropShadowColor: Theme.dropShadowPaneColor
+ property int nextMessageID: 1
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.margins: 10
- RowLayout {
- Layout.fillWidth: true
- width: parent.width
- ColumnLayout {
- Layout.fillWidth: true
-
-
- Text {
- //: Add a new item to the list
- text: qsTr("add-new-item")
- }
-
- TextField {
- id: newposttitle
- //: Todo... placeholder text
- placeholderText: qsTr("todo-placeholder")
- Layout.fillWidth: true
- style: CwtchTextFieldStyle{}
- }
-
- Opaque.Button { // SEND MESSAGE BUTTON
- id: btnSend
- icon: "regular/paper-plane"
- text: "add"
- anchors.right: parent.right
- anchors.rightMargin: 2
-
- property int nextMessageID: 1
-
- onClicked: {
- if (newposttitle.text != "") {
- var msg = JSON.stringify({"o":4, "t":newposttitle.text})
- gcd.sendMessage(msg, nextMessageID++)
- }
- newposttitle.text = ""
- }
+ onClicked: {
+ if (newlistitem.text != "") {
+ var msg = JSON.stringify({"o":4, "t":newlistitem.text})
+ gcd.sendMessage(msg, nextMessageID++)
}
+ newlistitem.text = ""
}
- }
}
-
-
+ Opaque.HLine{}