Commit 3484ad6a authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Added message delivery notification

parent 4a495b42
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
<title>chat_delivered</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="chat_delivered">
<g id="Group-2">
<circle id="Oval" fill="#A7A7A7" cx="12" cy="12" r="12"></circle>
<path d="M6.939201,10.9955745 C6.48364091,10.4768681 5.69384187,10.4256779 5.17513548,10.881238 C4.65642909,11.3367981 4.6052389,12.1265972 5.060799,12.6453035 L10.19145,18.4871267 C10.7237015,19.0931548 11.6820676,19.0439283 12.1494245,18.3865553 L19.0187735,8.72429318 C19.4187896,8.16164012 19.2869462,7.3812426 18.7242932,6.98122652 C18.1616401,6.58121045 17.3812426,6.71305377 16.9812265,7.27570682 L11.0273089,15.6503451 L6.939201,10.9955745 Z" id="chat_message_delivered" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</g>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="10px" viewBox="0 0 12 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
<title>chat_error</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="chat_error">
<polygon id="Path-1067" fill="#FF0000" points="6.05012213 3.64153152e-14 0 10 12 10"></polygon>
<path d="M6,6 L6,3.5" id="chat_message_delivered-copy-4" stroke="#FFFFFF" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path>
<ellipse id="Oval-24" fill="#FFFFFF" cx="6.03499979" cy="8.13500017" rx="0.834999979" ry="0.834999979"></ellipse>
<g id="Group-3">
<circle id="Oval" fill="#FF0000" cx="12" cy="12" r="12"></circle>
<g id="Group-2" transform="translate(10.000000, 4.600000)" stroke="#FFFFFF" fill="#FFFFFF">
<polygon id="Path-1067" stroke-width="0.8" stroke-linejoin="round" transform="translate(2.000000, 4.880676) rotate(-180.000000) translate(-2.000000, -4.880676) " points="2 1.77635684e-15 0.5 9.76135254 3.5 9.76135254"></polygon>
<ellipse id="Oval-24" stroke-width="0.5" cx="2.00000036" cy="13.4" rx="1.39999998" ry="1.39999998"></ellipse>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
<title>chat_read</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="chat_read">
<g id="Group-2">
<circle id="Oval" fill="#18A7AF" cx="12" cy="12" r="12"></circle>
<path d="M6.939201,10.9955745 C6.48364091,10.4768681 5.69384187,10.4256779 5.17513548,10.881238 C4.65642909,11.3367981 4.6052389,12.1265972 5.060799,12.6453035 L10.19145,18.4871267 C10.7237015,19.0931548 11.6820676,19.0439283 12.1494245,18.3865553 L19.0187735,8.72429318 C19.4187896,8.16164012 19.2869462,7.3812426 18.7242932,6.98122652 C18.1616401,6.58121045 17.3812426,6.71305377 16.9812265,7.27570682 L11.0273089,15.6503451 L6.939201,10.9955745 Z" id="chat_message_delivered" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</g>
</g>
</svg>
......@@ -809,6 +809,21 @@ your friend&apos;s SIP address or username.</translation>
<translation>Select you active account</translation>
</message>
</context>
<context>
<name>OutgoingMessage</name>
<message>
<source>Error</source>
<translation>Error</translation>
</message>
<message>
<source>Read</source>
<translation>Read</translation>
</message>
<message>
<source>Delivered</source>
<translation>Delivered</translation>
</message>
</context>
<context>
<name>Presence</name>
<message>
......
......@@ -808,6 +808,21 @@ un chat ou ajouter un contact.</translation>
<translation>Sélectionner votre compte principal</translation>
</message>
</context>
<context>
<name>OutgoingMessage</name>
<message>
<source>Error</source>
<translation>Erreur</translation>
</message>
<message>
<source>Read</source>
<translation>Lu</translation>
</message>
<message>
<source>Delivered</source>
<translation>Délivré</translation>
</message>
</context>
<context>
<name>Presence</name>
<message>
......
......@@ -48,10 +48,12 @@
<file>assets/images/camera_on_updating.svg</file>
<file>assets/images/chat_amount.svg</file>
<file>assets/images/chat_count.svg</file>
<file>assets/images/chat_delivered.svg</file>
<file>assets/images/chat_error.svg</file>
<file>assets/images/chat_hovered.svg</file>
<file>assets/images/chat_normal.svg</file>
<file>assets/images/chat_pressed.svg</file>
<file>assets/images/chat_read.svg</file>
<file>assets/images/chat_send.svg</file>
<file>assets/images/collapse.svg</file>
<file>assets/images/contact_add_hovered.svg</file>
......
......@@ -40,4 +40,6 @@ QtObject {
property color z: '#17A81A'
property color error: '#FF0000'
property color read: '#18A7AF'
property color delivered: '#A7A7A7'
}
......@@ -32,20 +32,52 @@ Item {
Component {
id: icon
Icon {
property bool isNotDelivered: Utils.includes([
ChatModel.MessageStatusFileTransferError,
ChatModel.MessageStatusIdle,
ChatModel.MessageStatusInProgress,
ChatModel.MessageStatusNotDelivered
], $chatEntry.status)
icon: isNotDelivered ? 'chat_error' : 'chat_send'
iconSize: ChatStyle.entry.message.outgoing.sendIconSize
MouseArea {
anchors.fill: parent
onClicked: isNotDelivered && proxyModel.resendMessage(index)
RowLayout {
Text {
property bool isNotDelivered: Utils.includes([
ChatModel.MessageStatusFileTransferError,
ChatModel.MessageStatusIdle,
ChatModel.MessageStatusInProgress,
ChatModel.MessageStatusNotDelivered
], $chatEntry.status)
property bool isRead: Utils.includes([
ChatModel.MessageStatusDisplayed
], $chatEntry.status)
text: isNotDelivered ? qsTr("Error") : isRead ? qsTr("Read") : qsTr("Delivered")
color: isNotDelivered ? Colors.error : isRead ? Colors.read : Colors.delivered
font.pointSize: ChatStyle.entry.message.outgoing.fontSize
}
Icon {
property bool isNotDelivered: Utils.includes([
ChatModel.MessageStatusFileTransferError,
ChatModel.MessageStatusIdle,
ChatModel.MessageStatusInProgress,
ChatModel.MessageStatusNotDelivered
], $chatEntry.status)
property bool isRead: Utils.includes([
ChatModel.MessageStatusDisplayed
], $chatEntry.status)
icon: isNotDelivered ? 'chat_error' : isRead ? 'chat_read' : 'chat_delivered'
iconSize: ChatStyle.entry.message.outgoing.sendIconSize
MouseArea {
anchors.fill: parent
onClicked: isNotDelivered && proxyModel.resendMessage(index)
}
}
ActionButton {
height: ChatStyle.entry.lineHeight
icon: 'delete'
iconSize: ChatStyle.entry.deleteIconSize
visible: isHoverEntry()
onClicked: removeEntry()
}
}
}
......@@ -63,15 +95,6 @@ Item {
? indicator
: icon
}
ActionButton {
height: ChatStyle.entry.lineHeight
icon: 'delete'
iconSize: ChatStyle.entry.deleteIconSize
visible: isHoverEntry()
onClicked: removeEntry()
}
}
}
}
......@@ -96,7 +96,8 @@ QtObject {
property QtObject outgoing: QtObject {
property color backgroundColor: Colors.e
property int sendIconSize: 12
property int sendIconSize: 10
property int fontSize: 8
property QtObject text: QtObject {
property color color: Colors.r
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment