-
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(storybook): Added support to change
tokenModel
and update `dep…
…loyState` property Added support to change `tokenModel` and update `deployState` property
- Loading branch information
Showing
4 changed files
with
119 additions
and
28 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,83 @@ | ||
pragma Singleton | ||
import QtQuick 2.15 | ||
|
||
ListModel { | ||
QtObject { | ||
id: root | ||
|
||
readonly property var data: [ | ||
{ | ||
name: "SuperRare artwork", | ||
image: ModelsData.banners.superRare, | ||
deployState: 1 | ||
}, | ||
{ | ||
name: "Kitty artwork", | ||
image: ModelsData.collectibles.kitty1Big, | ||
deployState: 2 | ||
}, | ||
{ | ||
name: "More artwork", | ||
image: ModelsData.banners.status, | ||
deployState: 2 | ||
}, | ||
{ | ||
name: "Crypto Punks artwork", | ||
image: ModelsData.banners.cryptPunks, | ||
deployState: 1 | ||
function changeMintingState(index, deployState) { | ||
model.get(index).deployState = deployState | ||
} | ||
|
||
function changeAllMintingStates(deployState) { | ||
for(var i = 0; i < model.count; i++) { | ||
changeMintingState(i, deployState) | ||
} | ||
] | ||
} | ||
|
||
readonly property ListModel mintedCollectibleModel: ListModel { | ||
id: model | ||
|
||
Component.onCompleted: append(data) | ||
Component.onCompleted: append([ | ||
{ | ||
name: "SuperRare artwork", | ||
image: ModelsData.banners.superRare, | ||
deployState: 1, | ||
symbol: "SRW", | ||
description: "Desc", | ||
supply: 1, | ||
infiniteSupply: true, | ||
transferable: false, | ||
remoteSelfDestruct: true, | ||
chainId: 1, | ||
chainName: "Testnet", | ||
chainIcon: ModelsData.networks.testnet, | ||
accountName: "Status Account" | ||
}, | ||
{ | ||
name: "Kitty artwork", | ||
image: ModelsData.collectibles.kitty1Big, | ||
deployState: 1, | ||
symbol: "KAT", | ||
description: "Desc", | ||
supply: 10, | ||
infiniteSupply: false, | ||
transferable: false, | ||
remoteSelfDestruct: true, | ||
chainId: 2, | ||
chainName: "Optimism", | ||
chainIcon: ModelsData.networks.optimism, | ||
accountName: "Status New Account" | ||
}, | ||
{ | ||
name: "More artwork", | ||
image: ModelsData.banners.status, | ||
deployState: 1, | ||
symbol: "MMM", | ||
description: "Desc", | ||
supply: 1, | ||
infiniteSupply: true, | ||
transferable: false, | ||
remoteSelfDestruct: true, | ||
chainId: 5, | ||
chainName: "Curstom", | ||
chainIcon: ModelsData.networks.custom, | ||
accountName: "Other Account" | ||
}, | ||
{ | ||
name: "Crypto Punks artwork", | ||
image: ModelsData.banners.cryptPunks, | ||
deployState: 1, | ||
symbol: "CPA", | ||
description: "Desc", | ||
supply: 5000, | ||
infiniteSupply: false, | ||
transferable: false, | ||
remoteSelfDestruct: false, | ||
chainId: 1, | ||
chainName: "Hermez", | ||
chainIcon: ModelsData.networks.hermez, | ||
accountName: "Account" | ||
} | ||
]) | ||
} | ||
} |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
singleton ModelsData 1.0 ModelsData.qml | ||
singleton PermissionsModel 1.0 PermissionsModel.qml | ||
singleton NetworksModel 1.0 NetworksModel.qml | ||
singleton MintedCollectiblesModel 1.0 MintedCollectiblesModel.qml | ||
IconModel 1.0 IconModel.qml | ||
BannerModel 1.0 BannerModel.qml | ||
UsersModel 1.0 UsersModel.qml | ||
AssetsModel 1.0 AssetsModel.qml | ||
CollectiblesModel 1.0 CollectiblesModel.qml | ||
ChannelsModel 1.0 ChannelsModel.qml | ||
AssetsCollectiblesIconsModel 1.0 AssetsCollectiblesIconsModel.qml | ||
MintedCollectiblesModel 1.0 MintedCollectiblesModel.qml | ||
TokenHoldersModel 1.0 TokenHoldersModel.qml | ||
WalletAccountsModel 1.0 WalletAccountsModel.qml |