feat(storybook): extend communities portal cards with tags

This commit is contained in:
Patryk Osmaczko 2022-10-15 19:54:30 +02:00 committed by osmaczko
parent 3aae2603f4
commit a2b88d7b77
3 changed files with 213 additions and 115 deletions

File diff suppressed because one or more lines are too long

View File

@ -25,7 +25,11 @@ SplitView {
readonly property string locale: ""
readonly property int unreadNotificationsCount: 42
readonly property string communityTags:
JSON.stringify({"Activism":"✊","Art":"🎨","Blockchain":"🔗","Books & blogs":"📚","Career":"💼"})
JSON.stringify({"Activism":"✊","Art":"🎨","Blockchain":"🔗","Books & blogs":"📚","Career":"💼","Collaboration":"🤝","Commerce":"🛒","Culture":"🎎","DAO":"🚀","DIY":"🔨","DeFi":"📈",
"Design":"🧩","Education":"🎒","Entertainment":"🍿","Environment":"🌿","Ethereum":"Ξ","Event":"🗓","Fantasy":"🧙‍♂️","Fashion":"🧦","Food":"🌶","Gaming":"🎮","Global":"🌍",
"Health":"🧠","Hobby":"📐","Innovation":"🧪","Language":"📜","Lifestyle":"✨","Local":"📍","Love":"❤️","Markets":"💎","Movies & TV":"🎞","Music":"🎶","NFT":"🖼","NSFW":"🍆",
"News":"🗞","Non-profit":"🙏","Org":"🏢","Pets":"🐶","Play":"🎲","Podcast":"🎙️","Politics":"🗳️","Privacy":"👻","Product":"🍱","Psyche":"🍁","Security":"🔒","Social":"☕",
"Software dev":"👩‍💻","Sports":"⚽️","Tech":"📱","Travel":"🗺","Vehicles":"🚕","Web3":"🌐"})
readonly property var curatedCommunitiesModel: SortFilterProxyModel {
sourceModel: CommunitiesPortalDummyModel { id: mockedModel }

View File

@ -4,6 +4,7 @@ import QtQuick.Layouts 1.13
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Utils 0.1
import utils 1.0
@ -54,6 +55,13 @@ StatusScrollView {
id: communityCardDelegate
StatusCommunityCard {
readonly property string tags: model.tags
JSONListModel {
id: tagsJson
json: tags
}
locale: root.locale
communityId: model.communityId
loaded: model.available
@ -63,7 +71,7 @@ StatusScrollView {
description: model.description
members: model.members
popularity: model.popularity
// <out of scope> categories: model.categories
categories: tagsJson.model
onClicked: root.cardClicked(communityId)
}