From fae4543b4f09735ee36dcd49b1b809e8c7298cbb Mon Sep 17 00:00:00 2001 From: Boris Melnik Date: Wed, 1 Jun 2022 15:00:15 +0300 Subject: [PATCH] feat(StatusMemberListItem): Add admin status (#704) --- ui/StatusQ/sandbox/controls/ListItems.qml | 7 +++++++ .../src/StatusQ/Components/StatusMemberListItem.qml | 13 +++++++++++++ ui/StatusQ/src/assets/img/icons/crown.svg | 6 ++++++ 3 files changed, 26 insertions(+) create mode 100644 ui/StatusQ/src/assets/img/icons/crown.svg diff --git a/ui/StatusQ/sandbox/controls/ListItems.qml b/ui/StatusQ/sandbox/controls/ListItems.qml index cf60105dc6..6c3a62da25 100644 --- a/ui/StatusQ/sandbox/controls/ListItems.qml +++ b/ui/StatusQ/sandbox/controls/ListItems.qml @@ -441,4 +441,11 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC" image.isIdenticon: true } + + StatusMemberListItem { + nickName: "admin.guy" + isOnline: false + isAdmin: true + trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy + } } diff --git a/ui/StatusQ/src/StatusQ/Components/StatusMemberListItem.qml b/ui/StatusQ/src/StatusQ/Components/StatusMemberListItem.qml index db582f4dbb..88cf84dc5b 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusMemberListItem.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusMemberListItem.qml @@ -72,6 +72,11 @@ StatusListItem { This property holds the connectivity status of the member represented. */ property bool isOnline: false + /*! + \qmlproperty string StatusMemberListItem::isAdmin + This property holds the admin status of the member represented. + */ + property bool isAdmin: false QtObject { id: d @@ -124,4 +129,12 @@ StatusListItem { statusListItemIcon.badge.border.width: 2 statusListItemIcon.badge.implicitHeight: 12 // 8 px + 2 px * 2 borders statusListItemIcon.badge.implicitWidth: 12 // 8 px + 2 px * 2 borders + components: [ + StatusIcon { + anchors.verticalCenter: parent.verticalCenter + visible: root.isAdmin + icon: "crown" + color: Theme.palette.directColor1 + } + ] } diff --git a/ui/StatusQ/src/assets/img/icons/crown.svg b/ui/StatusQ/src/assets/img/icons/crown.svg new file mode 100644 index 0000000000..d184a2ee6e --- /dev/null +++ b/ui/StatusQ/src/assets/img/icons/crown.svg @@ -0,0 +1,6 @@ + + + + + +