1
mirror of https://github.com/monero-project/monero-gui synced 2024-11-26 10:21:05 +01:00

Cleanup after rebase

This commit is contained in:
Sander Ferdinand 2018-03-27 02:03:59 +02:00 committed by moneromooo-monero
parent 3d4eb7a5f5
commit 3c24044736
10 changed files with 44 additions and 50 deletions

View File

@ -121,7 +121,7 @@ Rectangle {
Text { Text {
id: testnetLabel id: testnetLabel
visible: persistentSettings.testnet visible: persistentSettings.nettype
text: qsTr("Testnet") + translationManager.emptyString text: qsTr("Testnet") + translationManager.emptyString
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 8 anchors.topMargin: 8

View File

@ -288,7 +288,7 @@ Item {
gridVisible: false gridVisible: false
background: Rectangle { color: "transparent" } background: Rectangle { color: "transparent" }
dayDelegate: Item { dayDelegate: Item {
z: 8 z: parent.z + 1
implicitHeight: implicitWidth implicitHeight: implicitWidth
implicitWidth: calendar.width / 7 implicitWidth: calendar.width / 7

View File

@ -163,30 +163,6 @@ ListView {
color: "#808080" color: "#808080"
} }
// // -- "BlockHeight" value
// TextEdit {
// readOnly: true
// selectByMouse: true
// width: 85
// anchors.bottom: parent.bottom
// //elide: Text.ElideRight
// font.family: "Arial"
// font.pixelSize: 13
// color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454"
// text: {
// if (!isPending)
// if(confirmations < confirmationsRequired)
// return blockHeight + " " + qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired)
// else
// return blockHeight
// if (!isOut)
// return qsTr("UNCONFIRMED") + translationManager.emptyString
// if (isFailed)
// return qsTr("FAILED") + translationManager.emptyString
// return qsTr("PENDING") + translationManager.emptyString
// }
// }
Text { Text {
id: amountLabel id: amountLabel
anchors.left: arrowImage.right anchors.left: arrowImage.right
@ -375,12 +351,20 @@ ListView {
HistoryTableInnerColumn{ HistoryTableInnerColumn{
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 30 * scaleRatio anchors.leftMargin: 30 * scaleRatio
labelHeader: qsTr("Payment ID") labelHeader: qsTr("Blockheight")
labelValue: paymentId !== "" && !paymentId.startsWith("00000000") ? paymentId.substring(0, 32) + "..." : "-" labelValue: {
copyValue: { if (!isPending)
if(paymentId !== "") { return paymentId } if(confirmations < confirmationsRequired)
else { return undefined } return blockHeight + " " + qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired);
else
return blockHeight;
if (!isOut)
return qsTr("UNCONFIRMED") + translationManager.emptyString
if (isFailed)
return qsTr("FAILED") + translationManager.emptyString
return qsTr("PENDING") + translationManager.emptyString
} }
copyValue: labelValue
} }
// right column // right column
@ -433,7 +417,7 @@ ListView {
return; return;
} }
var checked = (TxUtils.checkTxID(hash) && TxUtils.checkAddress(address, appWindow.persistentSettings.testnet)); var checked = (TxUtils.checkTxID(hash) && TxUtils.checkAddress(address, appWindow.persistentSettings.nettype));
if(!checked){ if(!checked){
console.log('getProof: Error checking TxId and/or address'); console.log('getProof: Error checking TxId and/or address');
} }

View File

@ -59,7 +59,7 @@ TextArea {
if(addressValidation){ if(addressValidation){
// js replacement for `RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }` // js replacement for `RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }`
textArea.text = textArea.text.replace(/[^a-z0-9]/gi,''); textArea.text = textArea.text.replace(/[^a-z0-9]/gi,'');
var address_ok = TxUtils.checkAddress(textArea.text, appWindow.persistentSettings.testnet); var address_ok = TxUtils.checkAddress(textArea.text, appWindow.persistentSettings.nettype);
if(!address_ok) error = true; if(!address_ok) error = true;
else error = false; else error = false;
TextArea.cursorPosition = textArea.text.length; TextArea.cursorPosition = textArea.text.length;

View File

@ -79,7 +79,6 @@ Rectangle {
return "../images/lightning-white.png" return "../images/lightning-white.png"
} }
} }
//getConnectionStatusImage(item.connected)
} }
} }

View File

@ -276,6 +276,7 @@ linux {
-lboost_chrono \ -lboost_chrono \
-lboost_program_options \ -lboost_program_options \
-lssl \ -lssl \
-llmdb \
-lcrypto -lcrypto
if(!android) { if(!android) {

View File

@ -784,16 +784,6 @@ Rectangle {
} }
// fires on every page load
function onPageCompleted() {
console.log("Settings page loaded");
initSettings();
if(typeof daemonManager != "undefined")
appWindow.daemonRunning = daemonManager.running(persistentSettings.nettype)
}
// fires only once // fires only once
Component.onCompleted: { Component.onCompleted: {
if(typeof daemonManager != "undefined") if(typeof daemonManager != "undefined")

View File

@ -265,7 +265,7 @@ Rectangle {
if (result) { if (result) {
var parts = result.split("|") var parts = result.split("|")
if (parts.length == 2) { if (parts.length == 2) {
var address_ok = walletManager.addressValid(parts[1], appWindow.persistentSettings.testnet) var address_ok = walletManager.addressValid(parts[1], appWindow.persistentSettings.nettype)
if (parts[0] === "true") { if (parts[0] === "true") {
if (address_ok) { if (address_ok) {
addressLine.text = parts[1] addressLine.text = parts[1]
@ -332,7 +332,7 @@ Rectangle {
rightIcon: "../images/rightIcon.png" rightIcon: "../images/rightIcon.png"
Layout.topMargin: 4 * scaleRatio Layout.topMargin: 4 * scaleRatio
text: qsTr("Send") + translationManager.emptyString text: qsTr("Send") + translationManager.emptyString
enabled : !appWindow.viewOnly && pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.testnet) enabled : !appWindow.viewOnly && pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype)
onClicked: { onClicked: {
console.log("Transfer: paymentClicked") console.log("Transfer: paymentClicked")
var priority = priorityModelV5.get(priorityDropdown.currentIndex).priority var priority = priorityModelV5.get(priorityDropdown.currentIndex).priority

View File

@ -118,7 +118,7 @@ Rectangle {
anchors.topMargin: 17 * scaleRatio anchors.topMargin: 17 * scaleRatio
width: 60 * scaleRatio width: 60 * scaleRatio
text: qsTr("Generate") + translationManager.emptyString text: qsTr("Generate") + translationManager.emptyString
enabled: TxUtils.checkTxID(getProofTxIdLine.text) && (getProofAddressLine.text.length == 0 || TxUtils.checkAddress(getProofAddressLine.text, appWindow.persistentSettings.testnet)) enabled: TxUtils.checkTxID(getProofTxIdLine.text) && (getProofAddressLine.text.length == 0 || TxUtils.checkAddress(getProofAddressLine.text, appWindow.persistentSettings.nettype))
onClicked: { onClicked: {
console.log("getProof: Generate clicked: txid " + getProofTxIdLine.text + ", address " + getProofAddressLine.text + ", message: " + getProofMessageLine.text); console.log("getProof: Generate clicked: txid " + getProofTxIdLine.text + ", address " + getProofAddressLine.text + ", message: " + getProofMessageLine.text);
root.getProofClicked(getProofTxIdLine.text, getProofAddressLine.text, getProofMessageLine.text) root.getProofClicked(getProofTxIdLine.text, getProofAddressLine.text, getProofMessageLine.text)
@ -207,7 +207,7 @@ Rectangle {
anchors.topMargin: 17 * scaleRatio anchors.topMargin: 17 * scaleRatio
width: 60 width: 60
text: qsTr("Check") + translationManager.emptyString 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.testnet))) 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)))
onClicked: { onClicked: {
console.log("checkProof: Check clicked: txid " + checkProofTxIdLine.text + ", address " + checkProofAddressLine.text + ", message " + checkProofMessageLine.text + ", signature " + checkProofSignatureLine.text); console.log("checkProof: Check clicked: txid " + checkProofTxIdLine.text + ", address " + checkProofAddressLine.text + ", message " + checkProofMessageLine.text + ", signature " + checkProofSignatureLine.text);
root.checkProofClicked(checkProofTxIdLine.text, checkProofAddressLine.text, checkProofMessageLine.text, checkProofSignatureLine.text) root.checkProofClicked(checkProofTxIdLine.text, checkProofAddressLine.text, checkProofMessageLine.text, checkProofSignatureLine.text)

View File

@ -245,11 +245,31 @@ ColumnLayout {
CheckBox { CheckBox {
id: testNet id: testNet
text: qsTr("Testnet") + translationManager.emptyString text: qsTr("Testnet") + translationManager.emptyString
checkedIcon: "../images/checkedVioletIcon.png"
background: "#FFFFFF" background: "#FFFFFF"
fontColor: "#4A4646" fontColor: "#4A4646"
fontSize: 16 * scaleRatio fontSize: 16 * scaleRatio
checked: appWindow.persistentSettings.testnet; checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
checked: appWindow.persistentSettings.nettype === NetworkType.TESTNET;
onClicked: {
persistentSettings.nettype = testNet.checked ? NetworkType.TESTNET : NetworkType.MAINNET
stageNet.checked = false;
console.log("Network type set to ", persistentSettings.nettype === NetworkType.TESTNET ? "Testnet" : "Mainnet")
}
}
}
Rectangle {
width: 100 * scaleRatio
CheckBox {
id: stageNet
text: qsTr("Stagenet") + translationManager.emptyString
background: "#FFFFFF"
fontColor: "#4A4646"
fontSize: 16 * scaleRatio
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
checked: appWindow.persistentSettings.nettype === NetworkType.STAGENET;
onClicked: { onClicked: {
persistentSettings.nettype = stageNet.checked ? NetworkType.STAGENET : NetworkType.MAINNET persistentSettings.nettype = stageNet.checked ? NetworkType.STAGENET : NetworkType.MAINNET
testNet.checked = false; testNet.checked = false;