Cleanup advanced pages

This commit is contained in:
dsc
2019-02-01 22:20:38 +01:00
parent c7f3deb5cc
commit a3128c9103
4 changed files with 230 additions and 264 deletions

View File

@@ -31,7 +31,7 @@ import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.1
import "../components"
import "../components" as MoneroComponents
import moneroComponents.Clipboard 1.0
import "../js/TxUtils.js" as TxUtils
@@ -57,62 +57,60 @@ Rectangle {
id: soloBox
spacing: 20 * scaleRatio
Label {
MoneroComponents.Label {
id: soloTitleLabel
fontSize: 24 * scaleRatio
text: qsTr("Prove Transaction") + translationManager.emptyString
}
Text {
Layout.fillWidth: true
text: qsTr("Generate a proof of your incoming/outgoing payment by supplying the transaction ID, the recipient address and an optional message. \n" +
"For the case of outgoing payments, you can get a 'Spend Proof' that proves the authorship of a transaction. In this case, you don't need to specify the recipient address.") + translationManager.emptyString
wrapMode: Text.Wrap
Layout.fillWidth: true
font.family: Style.fontRegular.name
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor
color: MoneroComponents.Style.defaultFontColor
}
RowLayout {
LineEdit {
labelText: qsTr("Transaction ID") + translationManager.emptyString
id: getProofTxIdLine
fontSize: 16 * scaleRatio
placeholderText: qsTr("Paste tx ID") + translationManager.emptyString
readOnly: false
Layout.fillWidth: true
copyButton: true
}
MoneroComponents.LineEdit {
id: getProofTxIdLine
Layout.fillWidth: true
labelFontSize: 14 * scaleRatio
labelText: qsTr("Transaction ID") + translationManager.emptyString
fontSize: 16 * scaleRatio
placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Paste tx ID") + translationManager.emptyString
readOnly: false
copyButton: true
}
RowLayout {
LineEdit {
id: getProofAddressLine
labelText: qsTr("Address") + translationManager.emptyString
fontSize: 16 * scaleRatio
placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString;
readOnly: false
Layout.fillWidth: true
copyButton: true
}
MoneroComponents.LineEdit {
id: getProofAddressLine
Layout.fillWidth: true
labelFontSize: 14 * scaleRatio
labelText: qsTr("Address") + translationManager.emptyString
fontSize: 16 * scaleRatio
placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString;
readOnly: false
copyButton: true
}
RowLayout {
LineEdit {
id: getProofMessageLine
fontSize: 16 * scaleRatio
labelText: qsTr("Message") + translationManager.emptyString
placeholderText: qsTr("Optional message against which the signature is signed") + translationManager.emptyString;
readOnly: false
width: mainLayout.editWidth
Layout.fillWidth: true
copyButton: true
}
MoneroComponents.LineEdit {
id: getProofMessageLine
Layout.fillWidth: true
fontSize: 16 * scaleRatio
labelFontSize: 14 * scaleRatio
labelText: qsTr("Message") + translationManager.emptyString
placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Optional message against which the signature is signed") + translationManager.emptyString;
readOnly: false
copyButton: true
}
StandardButton {
Layout.topMargin: 17 * scaleRatio
width: 60 * scaleRatio
MoneroComponents.StandardButton {
Layout.topMargin: 16 * scaleRatio
small: true
text: qsTr("Generate") + translationManager.emptyString
enabled: TxUtils.checkTxID(getProofTxIdLine.text) && (getProofAddressLine.text.length == 0 || TxUtils.checkAddress(getProofAddressLine.text, appWindow.persistentSettings.nettype))
@@ -131,7 +129,7 @@ Rectangle {
anchors.bottomMargin: 3 * scaleRatio
}
Label {
MoneroComponents.Label {
id: soloTitleLabel2
fontSize: 24 * scaleRatio
text: qsTr("Check Transaction") + translationManager.emptyString
@@ -142,66 +140,61 @@ Rectangle {
"For the case with Spend Proof, you don't need to specify the recipient address.") + translationManager.emptyString
wrapMode: Text.Wrap
Layout.fillWidth: true
font.family: Style.fontRegular.name
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor
color: MoneroComponents.Style.defaultFontColor
}
RowLayout {
LineEdit {
id: checkProofTxIdLine
labelText: qsTr("Transaction ID") + translationManager.emptyString
fontSize: 16 * scaleRatio
placeholderText: qsTr("Paste tx ID") + translationManager.emptyString
readOnly: false
width: mainLayout.editWidth
Layout.fillWidth: true
copyButton: true
}
MoneroComponents.LineEdit {
id: checkProofTxIdLine
Layout.fillWidth: true
labelFontSize: 14 * scaleRatio
labelText: qsTr("Transaction ID") + translationManager.emptyString
fontSize: 16 * scaleRatio
placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Paste tx ID") + translationManager.emptyString
readOnly: false
copyButton: true
}
RowLayout {
LineEdit {
id: checkProofAddressLine
labelText: qsTr("Address") + translationManager.emptyString
fontSize: 16 * scaleRatio
placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString;
readOnly: false
width: mainLayout.editWidth
Layout.fillWidth: true
copyButton: true
}
MoneroComponents.LineEdit {
id: checkProofAddressLine
Layout.fillWidth: true
labelFontSize: 14 * scaleRatio
labelText: qsTr("Address") + translationManager.emptyString
fontSize: 16 * scaleRatio
placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString;
readOnly: false
copyButton: true
}
RowLayout {
LineEdit {
id: checkProofMessageLine
fontSize: 16 * scaleRatio
labelText: qsTr("Message") + translationManager.emptyString
placeholderText: qsTr("Optional message against which the signature is signed") + translationManager.emptyString;
readOnly: false
width: mainLayout.editWidth
Layout.fillWidth: true
copyButton: true
}
MoneroComponents.LineEdit {
id: checkProofMessageLine
Layout.fillWidth: true
fontSize: 16 * scaleRatio
labelFontSize: 14 * scaleRatio
labelText: qsTr("Message") + translationManager.emptyString
placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Optional message against which the signature is signed") + translationManager.emptyString;
readOnly: false
copyButton: true
}
RowLayout {
LineEdit {
id: checkProofSignatureLine
fontSize: 16 * scaleRatio
labelText: qsTr("Signature") + translationManager.emptyString
placeholderText: qsTr("Paste tx proof") + translationManager.emptyString;
readOnly: false
width: mainLayout.editWidth
Layout.fillWidth: true
copyButton: true
}
MoneroComponents.LineEdit {
id: checkProofSignatureLine
Layout.fillWidth: true
fontSize: 16 * scaleRatio
labelFontSize: 14 * scaleRatio
labelText: qsTr("Signature") + translationManager.emptyString
placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Paste tx proof") + translationManager.emptyString;
readOnly: false
copyButton: true
}
StandardButton {
Layout.topMargin: 17 * scaleRatio
width: 60
MoneroComponents.StandardButton {
Layout.topMargin: 16 * scaleRatio
small: true
text: qsTr("Check") + translationManager.emptyString
enabled: TxUtils.checkTxID(checkProofTxIdLine.text) && TxUtils.checkSignature(checkProofSignatureLine.text) && ((checkProofSignatureLine.text.indexOf("SpendProofV") === 0 && checkProofAddressLine.text.length == 0) || (checkProofSignatureLine.text.indexOf("SpendProofV") !== 0 && TxUtils.checkAddress(checkProofAddressLine.text, appWindow.persistentSettings.nettype)))
@@ -225,9 +218,9 @@ Rectangle {
text: qsTr("If a payment had several transactions then each must be checked and the results combined.") + translationManager.emptyString
wrapMode: Text.Wrap
Layout.fillWidth: true
font.family: Style.fontRegular.name
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor
color: MoneroComponents.Style.defaultFontColor
}
}
}