qml: TxDetails buttons refactor
all buttons have icons now bump fee and cancel tx now below status line in highlightbox
This commit is contained in:
@@ -109,27 +109,6 @@ Pane {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
visible: feebumpButton.visible
|
|
||||||
Layout.preferredWidth: 1 ; Layout.preferredHeight: 1
|
|
||||||
}
|
|
||||||
FlatButton {
|
|
||||||
id: feebumpButton
|
|
||||||
visible: txdetails.canBump || txdetails.canCpfp
|
|
||||||
textUnderIcon: false
|
|
||||||
icon.source: '../../icons/warning.png'
|
|
||||||
icon.color: 'transparent'
|
|
||||||
text: qsTr('Bump fee')
|
|
||||||
onClicked: {
|
|
||||||
if (txdetails.canBump) {
|
|
||||||
var dialog = rbfBumpFeeDialog.createObject(root, { txid: root.txid })
|
|
||||||
} else {
|
|
||||||
var dialog = cpfpBumpFeeDialog.createObject(root, { txid: root.txid })
|
|
||||||
}
|
|
||||||
dialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr('Status')
|
text: qsTr('Status')
|
||||||
@@ -141,6 +120,53 @@ Pane {
|
|||||||
text: txdetails.status
|
text: txdetails.status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextHighlightPane {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
borderColor: constants.colorWarning
|
||||||
|
visible: txdetails.canBump || txdetails.canCpfp || txdetails.canCancel
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
width: parent.width
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr('This transaction is still unconfirmed.') + '\n' +
|
||||||
|
qsTr('You can increase fees to speed up the transaction, or cancel this transaction')
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
FlatButton {
|
||||||
|
id: feebumpButton
|
||||||
|
visible: txdetails.canBump || txdetails.canCpfp
|
||||||
|
textUnderIcon: false
|
||||||
|
icon.source: '../../icons/add.png'
|
||||||
|
text: qsTr('Bump fee')
|
||||||
|
onClicked: {
|
||||||
|
if (txdetails.canBump) {
|
||||||
|
var dialog = rbfBumpFeeDialog.createObject(root, { txid: root.txid })
|
||||||
|
} else {
|
||||||
|
var dialog = cpfpBumpFeeDialog.createObject(root, { txid: root.txid })
|
||||||
|
}
|
||||||
|
dialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FlatButton {
|
||||||
|
id: cancelButton
|
||||||
|
visible: txdetails.canCancel
|
||||||
|
textUnderIcon: false
|
||||||
|
icon.source: '../../icons/closebutton.png'
|
||||||
|
text: qsTr('Cancel Tx')
|
||||||
|
onClicked: {
|
||||||
|
var dialog = rbfCancelDialog.createObject(root, { txid: root.txid })
|
||||||
|
dialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: qsTr('Mempool depth')
|
text: qsTr('Mempool depth')
|
||||||
color: Material.accentColor
|
color: Material.accentColor
|
||||||
@@ -317,30 +343,29 @@ Pane {
|
|||||||
|
|
||||||
ButtonContainer {
|
ButtonContainer {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
visible: txdetails.canSign || txdetails.canBroadcast
|
|
||||||
|
|
||||||
FlatButton {
|
FlatButton {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 1
|
Layout.preferredWidth: 1
|
||||||
|
icon.source: '../../icons/key.png'
|
||||||
text: qsTr('Sign')
|
text: qsTr('Sign')
|
||||||
enabled: txdetails.canSign
|
visible: txdetails.canSign
|
||||||
onClicked: txdetails.sign()
|
onClicked: txdetails.sign()
|
||||||
}
|
}
|
||||||
|
|
||||||
FlatButton {
|
FlatButton {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 1
|
Layout.preferredWidth: 1
|
||||||
|
icon.source: '../../icons/microphone.png'
|
||||||
text: qsTr('Broadcast')
|
text: qsTr('Broadcast')
|
||||||
enabled: txdetails.canBroadcast
|
visible: txdetails.canBroadcast
|
||||||
onClicked: txdetails.broadcast()
|
onClicked: txdetails.broadcast()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ButtonContainer {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
FlatButton {
|
FlatButton {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 1
|
Layout.preferredWidth: 1
|
||||||
|
icon.source: '../../icons/qrcode_white.png'
|
||||||
text: qsTr('Export')
|
text: qsTr('Export')
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var dialog = exportTxDialog.createObject(root, { txdetails: txdetails })
|
var dialog = exportTxDialog.createObject(root, { txdetails: txdetails })
|
||||||
@@ -351,6 +376,7 @@ Pane {
|
|||||||
FlatButton {
|
FlatButton {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 1
|
Layout.preferredWidth: 1
|
||||||
|
icon.source: '../../icons/save.png'
|
||||||
text: qsTr('Save')
|
text: qsTr('Save')
|
||||||
visible: txdetails.canSaveAsLocal
|
visible: txdetails.canSaveAsLocal
|
||||||
onClicked: txdetails.save()
|
onClicked: txdetails.save()
|
||||||
@@ -359,21 +385,12 @@ Pane {
|
|||||||
FlatButton {
|
FlatButton {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 1
|
Layout.preferredWidth: 1
|
||||||
|
icon.source: '../../icons/delete.png'
|
||||||
text: qsTr('Remove')
|
text: qsTr('Remove')
|
||||||
visible: txdetails.canRemove
|
visible: txdetails.canRemove
|
||||||
onClicked: txdetails.removeLocalTx()
|
onClicked: txdetails.removeLocalTx()
|
||||||
}
|
}
|
||||||
|
|
||||||
FlatButton {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredWidth: 1
|
|
||||||
text: qsTr('Cancel Tx')
|
|
||||||
visible: txdetails.canCancel
|
|
||||||
onClicked: {
|
|
||||||
var dialog = rbfCancelDialog.createObject(root, { txid: root.txid })
|
|
||||||
dialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user