Ricardo Guilherme Schmidt 21f6d818a7
feat(amm-ui): complete new position liquidity flow
Implement one create-pool and add-liquidity workflow. Add searchable token resolution, direct opening-price and deposit editing, optimistic pool activation, and base58 transaction IDs.

Isolate network, wallet, AMM client, and runtime boundaries. Stabilize quote, submission, refresh, and pool-probe state while consolidating liquidity tests and removing obsolete liquidity paths.
2026-07-15 15:07:36 -03:00

64 lines
1.8 KiB
QML

import QtQuick 2.15
import QtQuick.Layouts 1.15
Item {
id: root
property string label: ""
property string value: ""
property bool valueWrapAnywhere: false
property bool estimated: false
property string estimateHelp: qsTr("This value is derived from your LP token balance, total LP supply, and current pool reserves.")
implicitHeight: Math.max(18, Math.max(labelText.implicitHeight, valueGroup.implicitHeight))
RowLayout {
anchors.fill: parent
spacing: 8
Text {
id: labelText
color: "#A9A098"
elide: Text.ElideRight
font.pixelSize: 12
text: root.label
verticalAlignment: Text.AlignVCenter
Layout.fillWidth: true
}
RowLayout {
id: valueGroup
spacing: 4
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
Text {
color: "#E7E1D8"
elide: root.valueWrapAnywhere ? Text.ElideNone : Text.ElideRight
font.bold: true
font.pixelSize: 12
horizontalAlignment: Text.AlignRight
text: root.value
verticalAlignment: Text.AlignVCenter
wrapMode: root.valueWrapAnywhere ? Text.WrapAtWordBoundaryOrAnywhere : Text.NoWrap
Layout.maximumWidth: Math.max(178, root.width * 0.55)
Layout.preferredWidth: Math.min(implicitWidth, Math.max(178, root.width * 0.55))
}
EstimateInfoButton {
enabled: root.estimated
helpText: root.estimateHelp
opacity: root.estimated ? 1 : 0
visible: root.estimated
Layout.preferredHeight: 18
Layout.preferredWidth: root.estimated ? 18 : 0
}
}
}
}