qml: replace Enter manually option in SendDialog with Invoices, which is removed from main menu
This commit is contained in:
@@ -55,14 +55,12 @@ ElDialog {
|
|||||||
FlatButton {
|
FlatButton {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 1
|
Layout.preferredWidth: 1
|
||||||
icon.source: '../../icons/pen.png'
|
icon.source: '../../icons/tab_receive.png'
|
||||||
text: qsTr('Manual input')
|
text: qsTr('Invoices')
|
||||||
|
enabled: Daemon.currentWallet.invoiceModel.rowCount() // TODO: only count non-expired
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var _mid = manualInputDialog.createObject(mainView)
|
dialog.close()
|
||||||
_mid.accepted.connect(function() {
|
app.stack.push(Qt.resolvedUrl('Invoices.qml'))
|
||||||
dialog.dispatch(_mid.recipient)
|
|
||||||
})
|
|
||||||
_mid.open()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,50 +75,6 @@ ElDialog {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
|
||||||
id: manualInputDialog
|
|
||||||
ElDialog {
|
|
||||||
property alias recipient: recipientTextEdit.text
|
|
||||||
|
|
||||||
iconSource: Qt.resolvedUrl('../../icons/pen.png')
|
|
||||||
|
|
||||||
anchors.centerIn: parent
|
|
||||||
implicitWidth: parent.width * 0.9
|
|
||||||
|
|
||||||
parent: Overlay.overlay
|
|
||||||
modal: true
|
|
||||||
|
|
||||||
Overlay.modal: Rectangle {
|
|
||||||
color: "#aa000000"
|
|
||||||
}
|
|
||||||
|
|
||||||
title: qsTr('Manual Input')
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
width: parent.width
|
|
||||||
|
|
||||||
Label {
|
|
||||||
text: 'Enter a bitcoin address or a Lightning invoice'
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
Layout.maximumWidth: parent.width
|
|
||||||
}
|
|
||||||
|
|
||||||
TextField {
|
|
||||||
id: recipientTextEdit
|
|
||||||
topPadding: constants.paddingXXLarge
|
|
||||||
bottomPadding: constants.paddingXXLarge
|
|
||||||
Layout.preferredWidth: parent.width
|
|
||||||
font.family: FixedFont
|
|
||||||
|
|
||||||
wrapMode: TextInput.WrapAnywhere
|
|
||||||
placeholderText: qsTr('Enter the payment request here')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onClosed: destroy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Bitcoin {
|
Bitcoin {
|
||||||
id: bitcoin
|
id: bitcoin
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,15 +48,6 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
id: menu
|
id: menu
|
||||||
MenuItem {
|
|
||||||
icon.color: 'transparent'
|
|
||||||
action: Action {
|
|
||||||
text: qsTr('Invoices');
|
|
||||||
onTriggered: menu.openPage(Qt.resolvedUrl('Invoices.qml'))
|
|
||||||
enabled: Daemon.currentWallet
|
|
||||||
icon.source: '../../icons/tab_receive.png'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MenuItem {
|
MenuItem {
|
||||||
icon.color: 'transparent'
|
icon.color: 'transparent'
|
||||||
action: Action {
|
action: Action {
|
||||||
|
|||||||
Reference in New Issue
Block a user