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

fix(Avatar): supports presence

parent cf4c4d5c
......@@ -8,6 +8,25 @@
<translation>Search contact or enter SIP address</translation>
</message>
</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>
<name>home</name>
<message>
......@@ -112,23 +131,4 @@
<translation>CANCEL</translation>
</message>
</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>
......@@ -8,6 +8,25 @@
<translation>Rechercher un contact ou entrer une adresse SIP</translation>
</message>
</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>
<name>home</name>
<message>
......@@ -112,23 +131,4 @@
<translation>ANNULER</translation>
</message>
</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>
......@@ -22,9 +22,9 @@
<file>ui/components/select/SelectContact.qml</file>
<!-- UI: Views. -->
<file>ui/views/mainWindow/contacts.qml</file>
<file>ui/views/mainWindow/home.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/newCall.qml</file>
......
......@@ -4,8 +4,9 @@ import QtGraphicalEffects 1.0
// ===================================================================
Item {
property string username
property alias image: imageToFilter.source
property string presence
property string username
Rectangle {
anchors.fill: parent
......@@ -14,6 +15,7 @@ Item {
radius: 20
}
// Initials.
Text {
anchors.centerIn: parent
color: '#FFFFFF'
......@@ -39,9 +41,27 @@ Item {
visible: false
}
// Avatar.
OpacityMask {
anchors.fill: imageToFilter
source: imageToFilter
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 {
Loader {
Layout.fillHeight: 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