From c45fe44ad578ac10b720e28e3bf0a60f55131d65 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 4 May 2021 14:39:36 -0400 Subject: [PATCH] feat(Community): show community description in CommunityColumn Fixes #2400 --- ui/app/AppLayouts/Chat/CommunityColumn.qml | 32 ++++++++++++++++++++-- ui/app/img/community-list.svg | 5 ++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 ui/app/img/community-list.svg diff --git a/ui/app/AppLayouts/Chat/CommunityColumn.qml b/ui/app/AppLayouts/Chat/CommunityColumn.qml index cfc052a7c1..df69c2d0e4 100644 --- a/ui/app/AppLayouts/Chat/CommunityColumn.qml +++ b/ui/app/AppLayouts/Chat/CommunityColumn.qml @@ -98,12 +98,40 @@ Rectangle { } } + Item { + id: descriptionItem + height: childrenRect.height + anchors.left: parent.left + anchors.leftMargin: 18 + anchors.right: parent.right + anchors.rightMargin: Style.current.padding + anchors.top: communityHeader.bottom + anchors.topMargin: Style.current.halfPadding + + SVGImage { + id: listImg + source: "../../img/community-list.svg" + width: 15 + height: 15 + } + + StyledText { + text: chatsModel.communities.activeCommunity.description + color: Style.current.secondaryText + font.pixelSize: 13 + wrapMode: Text.WordWrap + anchors.left: listImg.right + anchors.leftMargin: 4 + anchors.right: parent.right + } + } + Loader { id: membershipRequestsLoader width: parent.width active: chatsModel.communities.activeCommunity.admin - anchors.top: communityHeader.bottom - anchors.topMargin: item && item.visible ? Style.current.halfPadding : 0 + anchors.top: descriptionItem.bottom + anchors.topMargin: active ? Style.current.halfPadding : 0 sourceComponent: Component { MembershipRequestsButton {} diff --git a/ui/app/img/community-list.svg b/ui/app/img/community-list.svg new file mode 100644 index 0000000000..99517ca330 --- /dev/null +++ b/ui/app/img/community-list.svg @@ -0,0 +1,5 @@ + + + + +