From 96f4169be97715e6b6b45663492e3791ba21ae09 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 8 Jun 2020 01:45:24 +0200 Subject: Show presence and set custom status messages --- resources/qml/Avatar.qml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'resources/qml/Avatar.qml') diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml index 465a8e1c..9ac7b562 100644 --- a/resources/qml/Avatar.qml +++ b/resources/qml/Avatar.qml @@ -9,6 +9,7 @@ Rectangle { radius: settings.avatarCircles ? height/2 : 3 property alias url: img.source + property string userid property string displayName Label { @@ -42,6 +43,23 @@ Rectangle { radius: settings.avatarCircles ? height/2 : 3 } } + + } + + Rectangle { + anchors.bottom: avatar.bottom + anchors.right: avatar.right + + height: avatar.height / 6 + width: height + radius: settings.avatarCircles ? height / 2 : height / 4 + color: switch (timelineManager.userPresence(userid)) { + case "online": return "#00cc66" + case "unavailable": return "#ff9933" + case "offline": return "#a82353" + default: "transparent" + } } + color: colors.base } -- cgit 1.5.1