feat(ShowcaseDelegate): Added community badge
- Added community badge in `ShowcaseDelegate`. - Added `storybook` support. Closes #13336
This commit is contained in:
parent
9d4f1f6aa7
commit
463cce03ac
|
@ -13,6 +13,8 @@ import utils 1.0
|
||||||
import Storybook 1.0
|
import Storybook 1.0
|
||||||
import Models 1.0
|
import Models 1.0
|
||||||
|
|
||||||
|
import StatusQ 0.1
|
||||||
|
|
||||||
SplitView {
|
SplitView {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
@ -36,7 +38,8 @@ SplitView {
|
||||||
collectionName: "Super Nitro Toluen (with pink bg)",
|
collectionName: "Super Nitro Toluen (with pink bg)",
|
||||||
backgroundColor: "pink",
|
backgroundColor: "pink",
|
||||||
imageUrl: ModelsData.collectibles.custom,
|
imageUrl: ModelsData.collectibles.custom,
|
||||||
isLoading: false
|
isLoading: false,
|
||||||
|
communityId: "ddls"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uid: "34545656768",
|
uid: "34545656768",
|
||||||
|
@ -52,7 +55,8 @@ SplitView {
|
||||||
collectionName: "",
|
collectionName: "",
|
||||||
backgroundColor: "",
|
backgroundColor: "",
|
||||||
imageUrl: ModelsData.collectibles.kitty2Big,
|
imageUrl: ModelsData.collectibles.kitty2Big,
|
||||||
isLoading: false
|
isLoading: false,
|
||||||
|
communityId: "sox"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uid: "12345645459537432",
|
uid: "12345645459537432",
|
||||||
|
@ -60,7 +64,8 @@ SplitView {
|
||||||
collectionName: "Super Kitties",
|
collectionName: "Super Kitties",
|
||||||
backgroundColor: "oink",
|
backgroundColor: "oink",
|
||||||
imageUrl: ModelsData.collectibles.kitty3Big,
|
imageUrl: ModelsData.collectibles.kitty3Big,
|
||||||
isLoading: false
|
isLoading: false,
|
||||||
|
communityId: "ast"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uid: "691",
|
uid: "691",
|
||||||
|
@ -83,6 +88,38 @@ SplitView {
|
||||||
Component.onCompleted: append(data)
|
Component.onCompleted: append(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: communityModel
|
||||||
|
|
||||||
|
readonly property var data: [
|
||||||
|
{
|
||||||
|
communityId: "ddls",
|
||||||
|
communityName: "Doodles",
|
||||||
|
communityImage: ModelsData.collectibles.doodles
|
||||||
|
},
|
||||||
|
{
|
||||||
|
communityId: "sox",
|
||||||
|
communityName: "Socks",
|
||||||
|
communityImage: ModelsData.icons.socks
|
||||||
|
},
|
||||||
|
{
|
||||||
|
communityId: "ast",
|
||||||
|
communityName: "Astafarians",
|
||||||
|
communityImage: ModelsData.icons.dribble
|
||||||
|
}
|
||||||
|
]
|
||||||
|
Component.onCompleted: append(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
LeftJoinModel {
|
||||||
|
id: leftJoinModel
|
||||||
|
|
||||||
|
leftModel: collectiblesModel
|
||||||
|
rightModel: communityModel
|
||||||
|
|
||||||
|
joinRole: "communityId"
|
||||||
|
}
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
id: inShowcaseCollectiblesModel
|
id: inShowcaseCollectiblesModel
|
||||||
|
|
||||||
|
@ -124,7 +161,7 @@ SplitView {
|
||||||
ProfileShowcaseCollectiblesPanel {
|
ProfileShowcaseCollectiblesPanel {
|
||||||
id: showcasePanel
|
id: showcasePanel
|
||||||
width: 500
|
width: 500
|
||||||
baseModel: collectiblesModel
|
baseModel: leftJoinModel
|
||||||
showcaseModel: inShowcaseCollectiblesModel
|
showcaseModel: inShowcaseCollectiblesModel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@ import StatusQ.Popups 0.1
|
||||||
import StatusQ.Core 0.1
|
import StatusQ.Core 0.1
|
||||||
import StatusQ.Core.Theme 0.1
|
import StatusQ.Core.Theme 0.1
|
||||||
|
|
||||||
|
import AppLayouts.Wallet.controls 1.0
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
|
||||||
StatusDraggableListItem {
|
StatusDraggableListItem {
|
||||||
|
@ -31,6 +33,12 @@ StatusDraggableListItem {
|
||||||
dragAxis: Drag.XAndYAxis
|
dragAxis: Drag.XAndYAxis
|
||||||
|
|
||||||
actions: [
|
actions: [
|
||||||
|
ManageTokensCommunityTag {
|
||||||
|
Layout.maximumWidth: root.width *.4
|
||||||
|
visible: showcaseObj && !!showcaseObj.communityId
|
||||||
|
text: showcaseObj && !! showcaseObj.communityName ? showcaseObj.communityName : ""
|
||||||
|
asset.name: showcaseObj && !!showcaseObj.communityImage ? showcaseObj.communityImage : ""
|
||||||
|
},
|
||||||
StatusRoundButton {
|
StatusRoundButton {
|
||||||
icon.name: ProfileUtils.visibilityIcon(root.showcaseVisibility)
|
icon.name: ProfileUtils.visibilityIcon(root.showcaseVisibility)
|
||||||
Layout.preferredWidth: 58
|
Layout.preferredWidth: 58
|
||||||
|
|
Loading…
Reference in New Issue