-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(community): add option to see community rules
Fixes #16826 Adds the option to see the community rules in the community context menu on the left. Also adapts a few things according to designs
- Loading branch information
1 parent
751f274
commit 04a9a3b
Showing
4 changed files
with
78 additions
and
2 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
ui/app/AppLayouts/Communities/popups/CommunityRulesPopup.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import QtQuick 2.15 | ||
import QtQuick.Layouts 1.15 | ||
|
||
import StatusQ 0.1 | ||
import StatusQ.Core 0.1 | ||
import StatusQ.Components 0.1 | ||
import StatusQ.Controls 0.1 | ||
import StatusQ.Popups 0.1 | ||
|
||
import utils 1.0 | ||
|
||
import AppLayouts.Communities.panels 1.0 | ||
|
||
StatusModal { | ||
id: root | ||
|
||
property var community | ||
|
||
headerSettings.title: qsTr("%1 community rules").arg(community.name) | ||
|
||
contentItem: StatusScrollView { | ||
id: scrollView | ||
contentWidth: availableWidth | ||
|
||
ColumnLayout { | ||
width: scrollView.availableWidth | ||
spacing: 24 | ||
|
||
StatusSmartIdenticon { | ||
Layout.alignment: Qt.AlignHCenter | ||
name: asset.isImage ? "" : community.name | ||
asset.isImage: community.image !== "" | ||
asset.name: community.image | ||
asset.isLetterIdenticon: !asset.isImage | ||
asset.color: community.color | ||
asset.charactersLen: 1 | ||
asset.useAcronymForLetterIdenticon: false | ||
asset.width: 64 | ||
asset.height: 64 | ||
} | ||
|
||
StatusBaseText { | ||
text: community.introMessage | ||
Layout.fillWidth: true | ||
Layout.fillHeight: true | ||
wrapMode: Text.WordWrap | ||
} | ||
} | ||
} | ||
|
||
rightButtons: [ | ||
StatusButton { | ||
text: qsTr("Done") | ||
onClicked: root.close() | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters