2023-07-10 14:12:25 +00:00
|
|
|
|
import QtQuick 2.15
|
2024-10-15 19:26:12 +00:00
|
|
|
|
import QtQuick.Layouts 1.15
|
2023-07-10 14:12:25 +00:00
|
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
|
|
import AppLayouts.Communities.panels 1.0
|
2023-07-18 12:39:38 +00:00
|
|
|
|
import AppLayouts.Communities.helpers 1.0
|
2023-07-10 14:12:25 +00:00
|
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
|
|
StatusScrollView {
|
|
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
property int viewWidth: 560 // by design
|
|
|
|
|
|
|
|
|
|
required property string communityLogo
|
|
|
|
|
required property color communityColor
|
|
|
|
|
required property string communityName
|
|
|
|
|
|
|
|
|
|
signal nextClicked
|
|
|
|
|
|
|
|
|
|
padding: 0
|
|
|
|
|
contentWidth: mainLayout.width
|
|
|
|
|
contentHeight: mainLayout.height
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
id: mainLayout
|
|
|
|
|
|
|
|
|
|
width: root.viewWidth
|
|
|
|
|
spacing: 20
|
|
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
|
id: introPanel
|
|
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
|
lineHeight: 1.2
|
2024-10-15 19:26:12 +00:00
|
|
|
|
font.pixelSize: Theme.primaryTextFontSize
|
2023-07-10 14:12:25 +00:00
|
|
|
|
text: qsTr("Your <b>Owner token</b> will give you permissions to access the token management features for your community. This token is very important - only one will ever exist, and if this token gets lost then access to the permissions it enables for your community will be lost forever as well.<br><br>
|
|
|
|
|
Minting your Owner token also automatically mints your community’s <b>TokenMaster token</b>. You can airdrop your community’s TokenMaster token to anybody you wish to grant both Admin permissions and permission to access your community’s token management functions to.<br><br>
|
|
|
|
|
Only the hodler of the Owner token can airdrop TokenMaster tokens. TokenMaster tokens are soulbound (meaning they can’t be transferred), and you (the hodler of the Owner token) can remotely destruct a TokenMaster token at any time, to revoke TokenMaster permissions from any individual.")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
InfoPanel {
|
|
|
|
|
isOwner: true
|
|
|
|
|
checkersModel: [
|
|
|
|
|
qsTr("Only 1 will ever exist"),
|
|
|
|
|
qsTr("Hodler is the owner of the Community"),
|
|
|
|
|
qsTr("Ability to airdrop / destroy TokenMaster token"),
|
|
|
|
|
qsTr("Ability to mint and airdrop Community tokens")
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
InfoPanel {
|
|
|
|
|
isOwner: false
|
|
|
|
|
showTag: true
|
|
|
|
|
checkersModel: [
|
|
|
|
|
qsTr("Unlimited supply"),
|
|
|
|
|
qsTr("Grants full Community admin rights"),
|
|
|
|
|
qsTr("Ability to mint and airdrop Community tokens"),
|
|
|
|
|
qsTr("Non-transferrable"),
|
|
|
|
|
qsTr("Remotely destructible by the Owner token hodler")
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
component InfoPanel : Rectangle {
|
|
|
|
|
id: panel
|
|
|
|
|
|
|
|
|
|
property bool isOwner
|
|
|
|
|
property bool showTag
|
|
|
|
|
property alias checkersModel: checkersItems.model
|
2024-10-15 19:26:12 +00:00
|
|
|
|
readonly property int margins: Theme.bigPadding
|
2023-07-10 14:12:25 +00:00
|
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.preferredHeight: panelRow.implicitHeight
|
|
|
|
|
|
|
|
|
|
color: "transparent"
|
|
|
|
|
radius: 8
|
|
|
|
|
border.color: Theme.palette.baseColor2
|
|
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
|
id: panelRow
|
|
|
|
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
spacing: panel.margins
|
|
|
|
|
|
|
|
|
|
PrivilegedTokenArtworkPanel {
|
|
|
|
|
Layout.alignment: Qt.AlignTop
|
|
|
|
|
Layout.topMargin: panel.margins
|
|
|
|
|
Layout.leftMargin: Layout.topMargin
|
|
|
|
|
|
|
|
|
|
isOwner: panel.isOwner
|
|
|
|
|
artwork: root.communityLogo
|
|
|
|
|
color: root.communityColor
|
|
|
|
|
showTag: panel.showTag
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
id: col
|
|
|
|
|
|
|
|
|
|
Layout.alignment: Qt.AlignTop
|
|
|
|
|
Layout.topMargin: panel.margins
|
|
|
|
|
Layout.bottomMargin: panel.margins
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
id: panelTextHeader
|
|
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.preferredHeight: headerRow.implicitHeight
|
|
|
|
|
Layout.rightMargin: panel.margins
|
|
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
|
id: headerRow
|
|
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
|
spacing: Theme.halfPadding
|
2023-07-10 14:12:25 +00:00
|
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
|
Layout.alignment: Qt.AlignBottom
|
|
|
|
|
Layout.maximumWidth: panelTextHeader.width - symbol.width
|
|
|
|
|
|
|
|
|
|
text: panel.isOwner ? qsTr("%1 Owner token").arg(root.communityName) :
|
|
|
|
|
qsTr("%1 TokenMaster token").arg(root.communityName)
|
|
|
|
|
font.bold: true
|
|
|
|
|
font.pixelSize: 17
|
|
|
|
|
elide: Text.ElideMiddle
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
|
id: symbol
|
|
|
|
|
|
|
|
|
|
Layout.alignment: Qt.AlignBottom
|
|
|
|
|
|
2023-07-18 17:34:57 +00:00
|
|
|
|
text: PermissionsHelpers.communityNameToSymbol(panel.isOwner, root.communityName)
|
2024-10-15 19:26:12 +00:00
|
|
|
|
font.pixelSize: Theme.primaryTextFontSize
|
2023-07-10 14:12:25 +00:00
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
id: checkersColumn
|
|
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.alignment: Qt.AlignTop
|
|
|
|
|
Layout.topMargin: 6
|
|
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
|
id: checkersItems
|
|
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
|
StatusIcon {
|
|
|
|
|
icon: "tiny/checkmark"
|
|
|
|
|
color: Theme.palette.successColor1
|
|
|
|
|
width: 20
|
|
|
|
|
height: width
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.rightMargin: panel.margins
|
|
|
|
|
|
|
|
|
|
text: modelData
|
|
|
|
|
lineHeight: 1.2
|
2024-10-15 19:26:12 +00:00
|
|
|
|
font.pixelSize: Theme.additionalTextSize
|
2023-07-10 14:12:25 +00:00
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
2024-10-15 19:26:12 +00:00
|
|
|
|
Layout.bottomMargin: Theme.bigPadding
|
2023-07-10 14:12:25 +00:00
|
|
|
|
|
|
|
|
|
text: qsTr("Next")
|
|
|
|
|
|
|
|
|
|
onClicked: root.nextClicked()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|