feat(Community): show community description in CommunityColumn

Fixes #2400
This commit is contained in:
Jonathan Rainville 2021-05-04 14:39:36 -04:00 committed by Iuri Matias
parent a53a32c5c0
commit c45fe44ad5
2 changed files with 35 additions and 2 deletions

View File

@ -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 {}

View File

@ -0,0 +1,5 @@
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.5 9.53125C2.24112 9.53125 2.03125 9.74112 2.03125 10C2.03125 10.2589 2.24112 10.4688 2.5 10.4688H7.5C7.75888 10.4688 7.96875 10.2589 7.96875 10C7.96875 9.74112 7.75888 9.53125 7.5 9.53125H2.5Z" fill="#939BA1"/>
<path d="M2.03125 7.5C2.03125 7.24112 2.24112 7.03125 2.5 7.03125H10C10.2589 7.03125 10.4688 7.24112 10.4688 7.5C10.4688 7.75888 10.2589 7.96875 10 7.96875H2.5C2.24112 7.96875 2.03125 7.75888 2.03125 7.5Z" fill="#939BA1"/>
<path d="M2.03125 5C2.03125 4.74112 2.24112 4.53125 2.5 4.53125H12.5C12.7589 4.53125 12.9688 4.74112 12.9688 5C12.9688 5.25888 12.7589 5.46875 12.5 5.46875H2.5C2.24112 5.46875 2.03125 5.25888 2.03125 5Z" fill="#939BA1"/>
</svg>

After

Width:  |  Height:  |  Size: 770 B