2022-08-30 16:27:00 +00:00
|
|
|
import QtQuick 2.14
|
2022-06-09 15:27:14 +00:00
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
2022-11-25 17:35:30 +00:00
|
|
|
import StatusQ.Core.Utils 0.1
|
2022-06-09 15:27:14 +00:00
|
|
|
|
2022-12-06 11:19:20 +00:00
|
|
|
import AppLayouts.Chat.helpers 1.0
|
|
|
|
|
2022-06-09 15:27:14 +00:00
|
|
|
StatusDropdown {
|
|
|
|
id: root
|
|
|
|
|
2023-02-22 17:51:49 +00:00
|
|
|
property var assetsModel
|
|
|
|
property var collectiblesModel
|
2023-03-13 16:32:14 +00:00
|
|
|
property bool isENSTab: true
|
2023-02-22 17:51:49 +00:00
|
|
|
|
2023-01-24 21:49:07 +00:00
|
|
|
property var usedTokens: []
|
|
|
|
property var usedEnsNames: []
|
2022-08-23 08:46:37 +00:00
|
|
|
|
2023-01-12 13:18:52 +00:00
|
|
|
property string assetKey: ""
|
|
|
|
property real assetAmount: 0
|
2022-09-15 10:12:38 +00:00
|
|
|
|
|
|
|
property string collectibleKey: ""
|
2022-08-23 08:46:37 +00:00
|
|
|
property real collectibleAmount: 1
|
2022-08-30 16:27:00 +00:00
|
|
|
|
2022-08-31 12:35:28 +00:00
|
|
|
property string ensDomainName: ""
|
|
|
|
|
2023-01-12 13:18:52 +00:00
|
|
|
signal addAsset(string key, real amount)
|
2023-01-12 11:31:08 +00:00
|
|
|
signal addCollectible(string key, real amount)
|
2023-01-17 23:03:08 +00:00
|
|
|
signal addEns(string domain)
|
2022-06-09 15:27:14 +00:00
|
|
|
|
2023-01-12 13:18:52 +00:00
|
|
|
signal updateAsset(string key, real amount)
|
2022-09-07 09:40:25 +00:00
|
|
|
signal updateCollectible(string key, real amount)
|
2023-01-17 23:03:08 +00:00
|
|
|
signal updateEns(string domain)
|
2022-09-07 09:40:25 +00:00
|
|
|
|
|
|
|
signal removeClicked
|
2022-06-09 15:27:14 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
enum FlowType {
|
|
|
|
Selected, List_Deep1, List_Deep2
|
|
|
|
}
|
|
|
|
|
|
|
|
function openUpdateFlow() {
|
2023-01-24 21:49:07 +00:00
|
|
|
d.initialHoldingMode = HoldingTypes.Mode.UpdateOrRemove
|
2023-01-18 19:54:14 +00:00
|
|
|
if(d.currentHoldingType !== HoldingTypes.Type.Ens) {
|
|
|
|
if(statesStack.size === 0)
|
|
|
|
statesStack.push(HoldingsDropdown.FlowType.List_Deep1)
|
|
|
|
|
|
|
|
statesStack.push(HoldingsDropdown.FlowType.Selected)
|
|
|
|
}
|
|
|
|
open()
|
|
|
|
}
|
|
|
|
|
|
|
|
function setActiveTab(holdingType) {
|
|
|
|
d.currentHoldingType = holdingType
|
|
|
|
}
|
|
|
|
|
2022-06-09 15:27:14 +00:00
|
|
|
function reset() {
|
2023-01-12 13:18:52 +00:00
|
|
|
d.currentHoldingType = HoldingTypes.Type.Asset
|
2023-01-24 21:49:07 +00:00
|
|
|
d.initialHoldingMode = HoldingTypes.Mode.Add
|
2023-01-18 19:54:14 +00:00
|
|
|
|
2023-01-12 13:18:52 +00:00
|
|
|
root.assetKey = ""
|
2022-09-07 09:40:25 +00:00
|
|
|
root.collectibleKey = ""
|
2022-08-31 12:35:28 +00:00
|
|
|
root.ensDomainName = ""
|
2022-09-07 09:40:25 +00:00
|
|
|
|
2023-01-24 21:49:07 +00:00
|
|
|
d.setDefaultAmounts()
|
2023-01-18 19:54:14 +00:00
|
|
|
d.setInitialFlow()
|
2022-09-07 09:40:25 +00:00
|
|
|
}
|
2022-08-30 16:27:00 +00:00
|
|
|
|
2022-06-09 15:27:14 +00:00
|
|
|
QtObject {
|
|
|
|
id: d
|
|
|
|
|
2022-09-07 09:40:25 +00:00
|
|
|
// Internal management properties and signals:
|
2023-01-18 19:54:14 +00:00
|
|
|
readonly property var holdingTypes: [
|
|
|
|
HoldingTypes.Type.Asset, HoldingTypes.Type.Collectible, HoldingTypes.Type.Ens
|
|
|
|
]
|
2023-03-13 16:32:14 +00:00
|
|
|
readonly property var tabsModel: [qsTr("Assets"), qsTr("Collectibles"), qsTr("ENS")]
|
|
|
|
readonly property var tabsModelNoEns: [qsTr("Assets"), qsTr("Collectibles")]
|
2023-01-12 13:18:52 +00:00
|
|
|
readonly property bool assetsReady: root.assetAmount > 0 && root.assetKey
|
2022-09-07 09:40:25 +00:00
|
|
|
readonly property bool collectiblesReady: root.collectibleAmount > 0 && root.collectibleKey
|
2023-01-17 23:03:08 +00:00
|
|
|
readonly property bool ensReady: d.ensDomainNameValid
|
2022-08-30 16:27:00 +00:00
|
|
|
|
2023-01-12 13:18:52 +00:00
|
|
|
property int extendedDropdownType: ExtendedDropdownContent.Type.Assets
|
|
|
|
property int currentHoldingType: HoldingTypes.Type.Asset
|
2023-01-24 21:49:07 +00:00
|
|
|
|
|
|
|
property bool updateSelected: false
|
|
|
|
|
|
|
|
property int initialHoldingMode: HoldingTypes.Mode.Add
|
|
|
|
property int effectiveHoldingMode: initialHoldingMode === HoldingTypes.Mode.UpdateOrRemove
|
|
|
|
? HoldingTypes.Mode.UpdateOrRemove
|
|
|
|
: (updateSelected ? HoldingTypes.Mode.Update : HoldingTypes.Mode.Add)
|
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
property bool extendedDeepNavigation: false
|
|
|
|
property var currentSubItems
|
|
|
|
property string currentItemKey: ""
|
2022-09-07 09:40:25 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
property string assetAmountText: ""
|
|
|
|
property string collectibleAmountText: "1"
|
2022-09-07 09:40:25 +00:00
|
|
|
property bool ensDomainNameValid: false
|
|
|
|
|
2022-06-09 15:27:14 +00:00
|
|
|
// By design values:
|
2022-08-30 16:27:00 +00:00
|
|
|
readonly property int padding: 8
|
2022-06-09 15:27:14 +00:00
|
|
|
readonly property int defaultWidth: 289
|
2022-09-07 09:40:25 +00:00
|
|
|
readonly property int extendedContentHeight: 380
|
2023-01-18 19:54:14 +00:00
|
|
|
readonly property int tabBarHeigh: 36
|
|
|
|
readonly property int tabBarTextSize: 13
|
2022-09-07 09:40:25 +00:00
|
|
|
readonly property int backButtonWidth: 56
|
|
|
|
readonly property int backButtonHeight: 24
|
|
|
|
readonly property int backButtonToContentSpace: 8
|
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
function setInitialFlow() {
|
|
|
|
statesStack.clear()
|
|
|
|
if(d.currentHoldingType !== HoldingTypes.Type.Ens)
|
|
|
|
statesStack.push(HoldingsDropdown.FlowType.List_Deep1)
|
|
|
|
else
|
|
|
|
statesStack.push(HoldingsDropdown.FlowType.Selected)
|
|
|
|
}
|
2023-01-24 21:49:07 +00:00
|
|
|
|
|
|
|
function setDefaultAmounts() {
|
|
|
|
d.assetAmountText = ""
|
|
|
|
d.collectibleAmountText = ""
|
|
|
|
root.assetAmount = 0
|
|
|
|
root.collectibleAmount = 1
|
|
|
|
}
|
2022-09-07 09:40:25 +00:00
|
|
|
}
|
|
|
|
|
2023-03-09 11:12:49 +00:00
|
|
|
StatesStack {
|
2022-09-07 09:40:25 +00:00
|
|
|
id: statesStack
|
2022-06-09 15:27:14 +00:00
|
|
|
}
|
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
width: d.defaultWidth
|
|
|
|
padding: d.padding
|
|
|
|
margins: 0 // force keeping within the bounds of the enclosing window
|
2022-08-30 16:27:00 +00:00
|
|
|
contentItem: ColumnLayout {
|
|
|
|
id: content
|
|
|
|
|
2022-09-07 09:40:25 +00:00
|
|
|
spacing: d.backButtonToContentSpace
|
2023-03-09 11:12:49 +00:00
|
|
|
state: statesStack.currentState
|
2022-08-30 16:27:00 +00:00
|
|
|
|
|
|
|
StatusIconTextButton {
|
|
|
|
id: backButton
|
|
|
|
|
2022-09-07 09:40:25 +00:00
|
|
|
Layout.preferredWidth: d.backButtonWidth
|
|
|
|
Layout.preferredHeight: d.backButtonHeight
|
|
|
|
visible: statesStack.size > 1
|
2022-08-30 16:27:00 +00:00
|
|
|
spacing: 0
|
2022-09-07 09:40:25 +00:00
|
|
|
leftPadding: 4
|
2022-08-30 16:27:00 +00:00
|
|
|
statusIcon: "next"
|
|
|
|
icon.width: 12
|
|
|
|
icon.height: 12
|
|
|
|
iconRotation: 180
|
|
|
|
text: qsTr("Back")
|
2022-06-09 15:27:14 +00:00
|
|
|
}
|
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
StatusSwitchTabBar {
|
|
|
|
id: tabBar
|
|
|
|
|
|
|
|
visible: !backButton.visible
|
|
|
|
Layout.preferredHeight: d.tabBarHeigh
|
|
|
|
Layout.fillWidth: true
|
|
|
|
currentIndex: d.holdingTypes.indexOf(d.currentHoldingType)
|
|
|
|
state: d.currentHoldingType
|
|
|
|
states: [
|
|
|
|
State {
|
|
|
|
name: HoldingTypes.Type.Asset
|
|
|
|
PropertyChanges {target: loader; sourceComponent: listLayout}
|
|
|
|
PropertyChanges {target: root; height: d.extendedContentHeight}
|
|
|
|
PropertyChanges {target: d; extendedDropdownType: ExtendedDropdownContent.Type.Assets}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: HoldingTypes.Type.Collectible
|
|
|
|
PropertyChanges {target: loader; sourceComponent: listLayout}
|
|
|
|
PropertyChanges {target: root; height: d.extendedContentHeight}
|
|
|
|
PropertyChanges {target: d; extendedDropdownType: ExtendedDropdownContent.Type.Collectibles}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: HoldingTypes.Type.Ens
|
|
|
|
PropertyChanges {target: loader; sourceComponent: ensLayout}
|
|
|
|
PropertyChanges {target: root; height: undefined} // use implicit height
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
onCurrentIndexChanged: {
|
2023-03-13 16:32:14 +00:00
|
|
|
if(currentIndex >= 0) {
|
|
|
|
d.currentHoldingType = d.holdingTypes[currentIndex]
|
|
|
|
d.setInitialFlow()
|
|
|
|
}
|
2023-01-18 19:54:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
id: tabLabelsRepeater
|
2023-03-13 16:32:14 +00:00
|
|
|
model: root.isENSTab ? d.tabsModel : d.tabsModelNoEns
|
2023-01-18 19:54:14 +00:00
|
|
|
|
|
|
|
StatusSwitchTabButton {
|
|
|
|
text: modelData
|
|
|
|
fontPixelSize: d.tabBarTextSize
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-30 16:27:00 +00:00
|
|
|
Loader {
|
|
|
|
id: loader
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
2022-06-09 15:27:14 +00:00
|
|
|
|
2022-08-30 16:27:00 +00:00
|
|
|
states: [
|
|
|
|
State {
|
2023-01-18 19:54:14 +00:00
|
|
|
name: HoldingsDropdown.FlowType.Selected
|
|
|
|
PropertyChanges {target: loader; sourceComponent: (d.currentHoldingType === HoldingTypes.Type.Asset) ? assetLayout :
|
2023-03-13 16:32:14 +00:00
|
|
|
((d.currentHoldingType === HoldingTypes.Type.Collectible) ? collectibleLayout : ensLayout) }
|
2022-09-07 09:40:25 +00:00
|
|
|
PropertyChanges {target: root; height: undefined} // use implicit height
|
|
|
|
},
|
|
|
|
State {
|
2023-01-18 19:54:14 +00:00
|
|
|
name: HoldingsDropdown.FlowType.List_Deep1
|
|
|
|
PropertyChanges {target: loader; sourceComponent: listLayout}
|
|
|
|
PropertyChanges {target: root; height: d.extendedContentHeight}
|
2023-03-13 16:32:14 +00:00
|
|
|
PropertyChanges {target: d; extendedDeepNavigation: false}
|
2022-08-30 16:27:00 +00:00
|
|
|
},
|
|
|
|
State {
|
2023-01-18 19:54:14 +00:00
|
|
|
name: HoldingsDropdown.FlowType.List_Deep2
|
|
|
|
extend: HoldingsDropdown.FlowType.List_Deep1
|
|
|
|
PropertyChanges {target: d; extendedDeepNavigation: true}
|
2022-08-23 08:46:37 +00:00
|
|
|
}
|
2022-08-30 16:27:00 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
onClosed: root.reset()
|
2022-08-30 16:27:00 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
Component {
|
|
|
|
id: listLayout
|
2022-09-07 09:40:25 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
ExtendedDropdownContent {
|
|
|
|
id: listPanel
|
2022-09-07 09:40:25 +00:00
|
|
|
|
2023-02-22 17:51:49 +00:00
|
|
|
assetsModel: root.assetsModel
|
|
|
|
collectiblesModel: root.collectiblesModel
|
|
|
|
|
2023-01-24 21:49:07 +00:00
|
|
|
checkedKeys: root.usedTokens.map(entry => entry.key)
|
2023-01-18 19:54:14 +00:00
|
|
|
type: d.extendedDropdownType
|
2022-09-07 09:40:25 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
onItemClicked: {
|
2023-01-24 21:49:07 +00:00
|
|
|
d.assetAmountText = ""
|
|
|
|
d.collectibleAmountText = ""
|
|
|
|
|
|
|
|
if (checkedKeys.includes(key)) {
|
|
|
|
const amount = root.usedTokens.find(entry => entry.key === key).amount
|
|
|
|
|
|
|
|
if(d.extendedDropdownType === ExtendedDropdownContent.Type.Assets)
|
|
|
|
root.assetAmount = amount
|
|
|
|
else
|
|
|
|
root.collectibleAmount = amount
|
|
|
|
|
|
|
|
d.updateSelected = true
|
|
|
|
} else {
|
|
|
|
d.setDefaultAmounts()
|
|
|
|
d.updateSelected = false
|
|
|
|
}
|
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
if(d.extendedDropdownType === ExtendedDropdownContent.Type.Assets)
|
|
|
|
root.assetKey = key
|
|
|
|
else
|
|
|
|
root.collectibleKey = key
|
2022-08-30 16:27:00 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
statesStack.push(HoldingsDropdown.FlowType.Selected)
|
|
|
|
}
|
2022-08-30 16:27:00 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
onNavigateDeep: {
|
|
|
|
d.currentSubItems = subItems
|
|
|
|
d.currentItemKey = key
|
|
|
|
statesStack.push(HoldingsDropdown.FlowType.List_Deep2)
|
|
|
|
}
|
2022-08-30 16:27:00 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
Component.onCompleted: {
|
|
|
|
if(d.extendedDeepNavigation)
|
|
|
|
listPanel.goForward(d.currentItemKey,
|
2023-02-22 17:51:49 +00:00
|
|
|
CommunityPermissionsHelpers.getTokenNameByKey(root.collectiblesModel, d.currentItemKey),
|
|
|
|
CommunityPermissionsHelpers.getTokenIconByKey(root.collectiblesModel, d.currentItemKey),
|
2023-01-18 19:54:14 +00:00
|
|
|
d.currentSubItems)
|
|
|
|
}
|
2022-08-30 16:27:00 +00:00
|
|
|
|
|
|
|
Connections {
|
|
|
|
target: backButton
|
|
|
|
|
|
|
|
function onClicked() {
|
2023-01-18 19:54:14 +00:00
|
|
|
if (listPanel.canGoBack)
|
|
|
|
listPanel.goBack()
|
2022-09-07 09:40:25 +00:00
|
|
|
statesStack.pop()
|
2022-06-09 15:27:14 +00:00
|
|
|
}
|
|
|
|
}
|
2023-01-18 19:54:14 +00:00
|
|
|
|
|
|
|
Connections {
|
|
|
|
target: root
|
|
|
|
|
|
|
|
function onClosed() { listPanel.goBack() }
|
|
|
|
}
|
2022-06-09 15:27:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
2023-01-18 19:54:14 +00:00
|
|
|
id: assetLayout
|
2022-08-23 08:46:37 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
TokenPanel {
|
|
|
|
id: assetPanel
|
2022-09-15 10:12:38 +00:00
|
|
|
|
|
|
|
readonly property real effectiveAmount: amountValid ? amount : 0
|
2022-08-30 16:27:00 +00:00
|
|
|
|
2023-02-22 17:51:49 +00:00
|
|
|
tokenName: CommunityPermissionsHelpers.getTokenNameByKey(root.assetsModel, root.assetKey)
|
|
|
|
tokenShortName: CommunityPermissionsHelpers.getTokenShortNameByKey(root.assetsModel, root.assetKey)
|
|
|
|
tokenImage: CommunityPermissionsHelpers.getTokenIconByKey(root.assetsModel, root.assetKey)
|
2023-01-18 19:54:14 +00:00
|
|
|
amountText: d.assetAmountText
|
|
|
|
tokenCategoryText: qsTr("Asset")
|
|
|
|
addOrUpdateButtonEnabled: d.assetsReady
|
2023-01-24 21:49:07 +00:00
|
|
|
mode: d.effectiveHoldingMode
|
2022-09-07 09:40:25 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
onEffectiveAmountChanged: root.assetAmount = effectiveAmount
|
|
|
|
onAmountTextChanged: d.assetAmountText = amountText
|
|
|
|
onAddClicked: root.addAsset(root.assetKey, root.assetAmount)
|
|
|
|
onUpdateClicked: root.updateAsset(root.assetKey, root.assetAmount)
|
|
|
|
onRemoveClicked: root.removeClicked()
|
2022-09-15 10:12:38 +00:00
|
|
|
|
|
|
|
Component.onCompleted: {
|
2023-01-12 13:18:52 +00:00
|
|
|
if (d.assetAmountText.length === 0 && root.assetAmount)
|
2023-01-18 19:54:14 +00:00
|
|
|
assetPanel.setAmount(root.assetAmount)
|
2022-09-15 10:12:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Connections {
|
2023-01-18 19:54:14 +00:00
|
|
|
target: backButton
|
2022-09-15 10:12:38 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
function onClicked() { statesStack.pop() }
|
2022-09-15 10:12:38 +00:00
|
|
|
}
|
2022-08-30 16:27:00 +00:00
|
|
|
}
|
|
|
|
}
|
2022-08-23 08:46:37 +00:00
|
|
|
|
2022-08-30 16:27:00 +00:00
|
|
|
Component {
|
2023-01-18 19:54:14 +00:00
|
|
|
id: collectibleLayout
|
2022-09-07 09:40:25 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
TokenPanel {
|
|
|
|
id: collectiblePanel
|
2022-09-07 09:40:25 +00:00
|
|
|
|
2022-09-15 10:12:38 +00:00
|
|
|
readonly property real effectiveAmount: amountValid ? amount : 0
|
2022-08-30 16:27:00 +00:00
|
|
|
|
2023-02-22 17:51:49 +00:00
|
|
|
tokenName: CommunityPermissionsHelpers.getTokenNameByKey(root.collectiblesModel, root.collectibleKey)
|
2023-01-18 19:54:14 +00:00
|
|
|
tokenShortName: ""
|
2023-02-22 17:51:49 +00:00
|
|
|
tokenImage: CommunityPermissionsHelpers.getTokenIconByKey(root.collectiblesModel, root.collectibleKey)
|
2023-01-18 19:54:14 +00:00
|
|
|
amountText: d.collectibleAmountText
|
|
|
|
tokenCategoryText: qsTr("Collectible")
|
|
|
|
addOrUpdateButtonEnabled: d.collectiblesReady
|
|
|
|
allowDecimals: false
|
2023-01-24 21:49:07 +00:00
|
|
|
mode: d.effectiveHoldingMode
|
2022-08-30 16:27:00 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
onEffectiveAmountChanged: root.collectibleAmount = effectiveAmount
|
|
|
|
onAmountTextChanged: d.collectibleAmountText = amountText
|
|
|
|
onAddClicked: root.addCollectible(root.collectibleKey, root.collectibleAmount)
|
|
|
|
onUpdateClicked: root.updateCollectible(root.collectibleKey, root.collectibleAmount)
|
|
|
|
onRemoveClicked: root.removeClicked()
|
2022-08-23 08:46:37 +00:00
|
|
|
|
2022-09-15 10:12:38 +00:00
|
|
|
Component.onCompleted: {
|
2023-03-13 16:32:14 +00:00
|
|
|
if (d.collectibleAmountText.length === 0 && root.collectibleAmount)
|
|
|
|
collectiblePanel.setAmount(root.collectibleAmount)
|
2022-09-15 10:12:38 +00:00
|
|
|
}
|
|
|
|
|
2022-08-30 16:27:00 +00:00
|
|
|
Connections {
|
2023-01-18 19:54:14 +00:00
|
|
|
target: backButton
|
2022-09-07 09:40:25 +00:00
|
|
|
|
2023-01-18 19:54:14 +00:00
|
|
|
function onClicked() { statesStack.pop() }
|
2022-06-09 15:27:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
2022-08-23 08:46:37 +00:00
|
|
|
id: ensLayout
|
2022-08-31 12:35:28 +00:00
|
|
|
|
|
|
|
EnsPanel {
|
2023-01-18 19:54:14 +00:00
|
|
|
addButtonEnabled: d.ensReady
|
2022-08-31 12:35:28 +00:00
|
|
|
domainName: root.ensDomainName
|
2023-01-24 21:49:07 +00:00
|
|
|
mode: d.initialHoldingMode
|
|
|
|
reservedNames: root.usedEnsNames
|
2023-01-18 19:54:14 +00:00
|
|
|
|
2022-08-31 12:35:28 +00:00
|
|
|
onDomainNameChanged: root.ensDomainName = domainName
|
2022-09-07 09:40:25 +00:00
|
|
|
onDomainNameValidChanged: d.ensDomainNameValid = domainNameValid
|
2023-01-18 19:54:14 +00:00
|
|
|
onAddClicked: root.addEns(root.ensDomainName)
|
|
|
|
onUpdateClicked: root.updateEns(root.ensDomainName)
|
|
|
|
onRemoveClicked: root.removeClicked()
|
2022-06-09 15:27:14 +00:00
|
|
|
}
|
2022-09-15 10:12:38 +00:00
|
|
|
}
|
2022-06-09 15:27:14 +00:00
|
|
|
}
|