forked from Public/monero-gui
Merge pull request #1904
b758c79 AddressBook: hide 'Add' form when invoked from 'Send' tab (xiphon)
This commit is contained in:
@@ -32,18 +32,17 @@ import "../components"
|
||||
import moneroComponents.AddressBook 1.0
|
||||
import moneroComponents.AddressBookModel 1.0
|
||||
|
||||
Rectangle {
|
||||
ColumnLayout {
|
||||
id: root
|
||||
color: "transparent"
|
||||
property var model
|
||||
property bool selectAndSend: false
|
||||
|
||||
ColumnLayout {
|
||||
id: columnLayout
|
||||
anchors.margins: (isMobile)? 17 * scaleRatio : 20 * scaleRatio
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
Layout.margins: (isMobile ? 17 : 20) * scaleRatio
|
||||
Layout.topMargin: 40 * scaleRatio
|
||||
Layout.fillWidth: true
|
||||
spacing: 26 * scaleRatio
|
||||
visible: !root.selectAndSend
|
||||
|
||||
RowLayout {
|
||||
StandardButton {
|
||||
@@ -119,13 +118,11 @@ Rectangle {
|
||||
|
||||
Rectangle {
|
||||
id: tableRect
|
||||
anchors.top: columnLayout.bottom
|
||||
anchors.leftMargin: (isMobile)? 17 : 40
|
||||
anchors.rightMargin: (isMobile)? 17 : 40
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: parent.height - addButton.y - addButton.height - 36 * scaleRatio
|
||||
Layout.leftMargin: (isMobile ? 17 : 40) * scaleRatio
|
||||
Layout.rightMargin: (isMobile ? 17 : 40) * scaleRatio
|
||||
Layout.topMargin: (root.selectAndSend ? 40 : 0) * scaleRatio
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
color: "transparent"
|
||||
|
||||
Behavior on height {
|
||||
@@ -149,6 +146,7 @@ Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
onContentYChanged: flickableScroll.flickableContentYChanged()
|
||||
model: root.model
|
||||
selectAndSend: root.selectAndSend
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,6 +166,10 @@ Rectangle {
|
||||
return address_ok && payment_id_ok
|
||||
}
|
||||
|
||||
function onPageClosed() {
|
||||
root.selectAndSend = false;
|
||||
}
|
||||
|
||||
function onPageCompleted() {
|
||||
console.log("adress book");
|
||||
root.model = currentWallet.addressBookModel;
|
||||
|
||||
@@ -213,7 +213,10 @@ Rectangle {
|
||||
placeholderText: "4.. / 8.."
|
||||
wrapMode: Text.WrapAnywhere
|
||||
addressValidation: true
|
||||
onInputLabelLinkActivated: { appWindow.showPageRequest("AddressBook") }
|
||||
onInputLabelLinkActivated: {
|
||||
middlePanel.addressBookView.selectAndSend = true;
|
||||
appWindow.showPageRequest("AddressBook");
|
||||
}
|
||||
pasteButton: true
|
||||
onPaste: function(clipboardText) {
|
||||
const parsed = walletManager.parse_uri_to_object(clipboardText);
|
||||
|
||||
Reference in New Issue
Block a user