Commit 23aa0376 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(Avatar): supports presence

parent cf4c4d5c
...@@ -8,6 +8,25 @@ ...@@ -8,6 +8,25 @@
<translation>Search contact or enter SIP address</translation> <translation>Search contact or enter SIP address</translation>
</message> </message>
</context> </context>
<context>
<name>contacts</name>
<message>
<source>searchContactPlaceholder</source>
<translation>Search contact</translation>
</message>
<message>
<source>selectAllContacts</source>
<translation>All</translation>
</message>
<message>
<source>selectConnectedContacts</source>
<translation>Connected</translation>
</message>
<message>
<source>addContact</source>
<translation>ADD CONTACT</translation>
</message>
</context>
<context> <context>
<name>home</name> <name>home</name>
<message> <message>
...@@ -112,23 +131,4 @@ ...@@ -112,23 +131,4 @@
<translation>CANCEL</translation> <translation>CANCEL</translation>
</message> </message>
</context> </context>
<context>
<name>searchContact</name>
<message>
<source>searchContactPlaceholder</source>
<translation>Search contact</translation>
</message>
<message>
<source>selectAllContacts</source>
<translation>All</translation>
</message>
<message>
<source>selectConnectedContacts</source>
<translation>Connected</translation>
</message>
<message>
<source>addContact</source>
<translation>ADD CONTACT</translation>
</message>
</context>
</TS> </TS>
...@@ -8,6 +8,25 @@ ...@@ -8,6 +8,25 @@
<translation>Rechercher un contact ou entrer une adresse SIP</translation> <translation>Rechercher un contact ou entrer une adresse SIP</translation>
</message> </message>
</context> </context>
<context>
<name>contacts</name>
<message>
<source>searchContactPlaceholder</source>
<translation>Rechercher contact</translation>
</message>
<message>
<source>selectAllContacts</source>
<translation>Tous</translation>
</message>
<message>
<source>selectConnectedContacts</source>
<translation>Connectés</translation>
</message>
<message>
<source>addContact</source>
<translation>AJOUTER CONTACT</translation>
</message>
</context>
<context> <context>
<name>home</name> <name>home</name>
<message> <message>
...@@ -112,23 +131,4 @@ ...@@ -112,23 +131,4 @@
<translation>ANNULER</translation> <translation>ANNULER</translation>
</message> </message>
</context> </context>
<context>
<name>searchContact</name>
<message>
<source>searchContactPlaceholder</source>
<translation>Rechercher contact</translation>
</message>
<message>
<source>selectAllContacts</source>
<translation>Tous</translation>
</message>
<message>
<source>selectConnectedContacts</source>
<translation>Connectés</translation>
</message>
<message>
<source>addContact</source>
<translation>AJOUTER CONTACT</translation>
</message>
</context>
</TS> </TS>
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
<file>ui/components/select/SelectContact.qml</file> <file>ui/components/select/SelectContact.qml</file>
<!-- UI: Views. --> <!-- UI: Views. -->
<file>ui/views/mainWindow/contacts.qml</file>
<file>ui/views/mainWindow/home.qml</file> <file>ui/views/mainWindow/home.qml</file>
<file>ui/views/mainWindow/mainWindow.qml</file> <file>ui/views/mainWindow/mainWindow.qml</file>
<file>ui/views/mainWindow/searchContact.qml</file>
<file>ui/views/manageAccounts.qml</file> <file>ui/views/manageAccounts.qml</file>
<file>ui/views/newCall.qml</file> <file>ui/views/newCall.qml</file>
......
...@@ -4,8 +4,9 @@ import QtGraphicalEffects 1.0 ...@@ -4,8 +4,9 @@ import QtGraphicalEffects 1.0
// =================================================================== // ===================================================================
Item { Item {
property string username
property alias image: imageToFilter.source property alias image: imageToFilter.source
property string presence
property string username
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
...@@ -14,6 +15,7 @@ Item { ...@@ -14,6 +15,7 @@ Item {
radius: 20 radius: 20
} }
// Initials.
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
color: '#FFFFFF' color: '#FFFFFF'
...@@ -39,9 +41,27 @@ Item { ...@@ -39,9 +41,27 @@ Item {
visible: false visible: false
} }
// Avatar.
OpacityMask { OpacityMask {
anchors.fill: imageToFilter anchors.fill: imageToFilter
source: imageToFilter source: imageToFilter
maskSource: avatar maskSource: avatar
} }
// Presence.
Image {
anchors.bottom: parent.bottom
anchors.right: parent.right
fillMode: Image.PreserveAspectFit
height: parent.height/ 3
id: presenceImage
source: (function () {
if (!presence) {
return ''
}
return 'qrc:/imgs/led_' + presence + '.svg'
})()
width: parent.width / 3
}
} }
...@@ -142,7 +142,7 @@ ApplicationWindow { ...@@ -142,7 +142,7 @@ ApplicationWindow {
Loader { Loader {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
source: 'qrc:/ui/views/mainWindow/searchContact.qml' source: 'qrc:/ui/views/mainWindow/contacts.qml'
} }
} }
} }
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