feat(OwnerToken): Admin view of Tokens home - pre-Owner token minting
- New `Get started` panel for admins in `Tokens` section added. - Added support in `storybook`. Part of #11472
This commit is contained in:
parent
a468635ddc
commit
c973605831
|
@ -80,7 +80,7 @@ SplitView {
|
|||
id: logsAndControlsPanel
|
||||
|
||||
SplitView.minimumHeight: 100
|
||||
SplitView.preferredHeight: 200
|
||||
SplitView.preferredHeight: 250
|
||||
|
||||
logsView.logText: logs.logText
|
||||
|
||||
|
@ -102,28 +102,28 @@ SplitView {
|
|||
id: ownerChecked
|
||||
checked: true
|
||||
|
||||
text: "Is owner?"
|
||||
text: "Is Owner? [Owner will be able to create an OWNER and TOKEN MASTER token]"
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
id: masterTokenOwnerChecked
|
||||
checked: true
|
||||
|
||||
text: "Is TMaster token owner?"
|
||||
text: "Is TMaster token owner? [TMaster token owner will be able to mint / airdrop tokens once the TMaster is already created]"
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
id: adminChecked
|
||||
checked: true
|
||||
|
||||
text: "Is admin?"
|
||||
text: "Is admin? [Admis will be able to see token views, but NOT manage them, like creating new artwork or asset]"
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
id: editorModelChecked
|
||||
checked: true
|
||||
|
||||
text: "Empty model"
|
||||
text: "No tokens minted yet"
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
|
|
@ -13,6 +13,7 @@ Control {
|
|||
property alias title: titleComponent.text
|
||||
property alias text: textComponent.text
|
||||
property alias buttonText: button.text
|
||||
property alias buttonVisible: button.visible
|
||||
|
||||
signal clicked
|
||||
|
||||
|
@ -59,6 +60,8 @@ Control {
|
|||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
visible: true
|
||||
|
||||
onClicked: root.clicked()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,13 +100,13 @@ StackView {
|
|||
title: qsTr("Tokens")
|
||||
|
||||
buttons: DisabledTooltipButton {
|
||||
property bool onlyAdmin: root.isAdmin && !root.isOwner
|
||||
property bool buttonEnabled: (root.isOwner || root.isTokenMasterOwner) && d.isTokenOwnerDeployed
|
||||
readonly property bool isAdminOnly: root.isAdmin && !root.isOwner && !root.isTokenMasterOwner
|
||||
readonly property bool buttonEnabled: (root.isOwner || root.isTokenMasterOwner) && d.isTokenOwnerDeployed
|
||||
|
||||
buttonType: DisabledTooltipButton.Normal
|
||||
aliasedObjectName: "addNewItemButton"
|
||||
text: qsTr("Mint token")
|
||||
enabled: onlyAdmin || buttonEnabled
|
||||
enabled: isAdminOnly || buttonEnabled
|
||||
interactive: buttonEnabled
|
||||
onClicked: root.push(newTokenViewComponent, StackView.Immediate)
|
||||
tooltipText: qsTr("In order to mint, you must hodl the TokenMaster token for %1").arg(root.communityName)
|
||||
|
@ -115,6 +115,7 @@ StackView {
|
|||
contentItem: MintedTokensView {
|
||||
model: root.tokensModel
|
||||
isOwner: root.isOwner
|
||||
isAdmin: root.isAdmin
|
||||
|
||||
onItemClicked: root.push(tokenViewComponent, { tokenKey }, StackView.Immediate)
|
||||
onMintOwnerTokenClicked: root.push(ownerTokenViewComponent, StackView.Immediate)
|
||||
|
|
|
@ -16,6 +16,7 @@ StatusScrollView {
|
|||
id: root
|
||||
|
||||
required property bool isOwner
|
||||
required property bool isAdmin
|
||||
|
||||
property int viewWidth: 560 // by design
|
||||
property var model
|
||||
|
@ -99,13 +100,17 @@ StatusScrollView {
|
|||
}
|
||||
|
||||
StatusInfoBoxPanel {
|
||||
|
||||
readonly property bool isAdminOnly: root.isAdmin && !root.isOwner
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 20
|
||||
|
||||
visible: root.isOwner
|
||||
title: qsTr("Get started")
|
||||
text: qsTr("In order to Mint, Import and Airdrop community tokens, you first need to mint your Owner token which will give you permissions to access the token management features for your community.")
|
||||
text: isAdminOnly ? qsTr("Token minting can only be performed by admins that hodl the Community’s TokenMaster token. If you would like this permission, contact the Community founder (they will need to mint the Community Owner token before they can airdrop this to you)."):
|
||||
qsTr("In order to Mint, Import and Airdrop community tokens, you first need to mint your Owner token which will give you permissions to access the token management features for your community.")
|
||||
buttonText: qsTr("Mint Owner token")
|
||||
buttonVisible: root.isOwner
|
||||
horizontalPadding: 16
|
||||
verticalPadding: 20
|
||||
|
||||
|
|
Loading…
Reference in New Issue