Compare commits
114 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f7a39292c | ||
|
|
2e1e227b4c | ||
|
|
ee68bcb6e9 | ||
|
|
025a638082 | ||
|
|
33babc5d85 | ||
|
|
a4c17ac82b | ||
|
|
06ba205320 | ||
|
|
5df14abed2 | ||
|
|
cdad85c0ef | ||
|
|
40e2d2045b | ||
|
|
290582d428 | ||
|
|
582267a923 | ||
|
|
fe3c06c36b | ||
|
|
95d7826163 | ||
|
|
5e2099ad47 | ||
|
|
44280d1e52 | ||
|
|
897d879dad | ||
|
|
631a1c49c8 | ||
|
|
d3b20d2c04 | ||
|
|
c60c9ee69a | ||
|
|
965081c554 | ||
|
|
e6458b58ef | ||
|
|
9207462676 | ||
|
|
ab020358e7 | ||
|
|
135cfbac68 | ||
|
|
3dbf09e7ad | ||
|
|
32257c8fab | ||
|
|
5ecca50977 | ||
|
|
ae2fdc7ab3 | ||
|
|
f72ed257ce | ||
|
|
947e265a1a | ||
|
|
77ff362b58 | ||
|
|
9d40baa3ef | ||
|
|
d3b81cb6f8 | ||
|
|
c87ebf1f31 | ||
|
|
4905341999 | ||
|
|
047dee4eb4 | ||
|
|
dd1046b31f | ||
|
|
2b82a472ae | ||
|
|
8d5ef035d2 | ||
|
|
a3d41a80bf | ||
|
|
413507bba9 | ||
|
|
2ca76ff13c | ||
|
|
a6cd010695 | ||
|
|
411505bff5 | ||
|
|
4f4e879f8d | ||
|
|
448727f4b5 | ||
|
|
ca8138bb46 | ||
|
|
10764b8a68 | ||
|
|
b91afaf5c7 | ||
|
|
31501316c9 | ||
|
|
120a62257f | ||
|
|
a1e416ee83 | ||
|
|
3cf2dc0c04 | ||
|
|
6df9e584b3 | ||
|
|
0d247a9b8a | ||
|
|
bc22de47f9 | ||
|
|
a5b2d5e727 | ||
|
|
2c78f77eb2 | ||
|
|
738e802f3c | ||
|
|
8dab0755d3 | ||
|
|
5f81b573c0 | ||
|
|
a267712d10 | ||
|
|
0abaae073d | ||
|
|
a6791561d6 | ||
|
|
3ca2473239 | ||
|
|
779cc3e24d | ||
|
|
cfd2139310 | ||
|
|
4c05bff21e | ||
|
|
5392dd7ed0 | ||
|
|
cb9cb6eb09 | ||
|
|
3a33ddeecd | ||
|
|
a83910d7de | ||
|
|
336ed9d6e5 | ||
|
|
346e942e93 | ||
|
|
13a5be7306 | ||
|
|
bdceff6380 | ||
|
|
17c61f897a | ||
|
|
9a58e88ec6 | ||
|
|
355cccaa64 | ||
|
|
29580de2c7 | ||
|
|
67e08da918 | ||
|
|
e660b2d169 | ||
|
|
40bdf692d1 | ||
|
|
562c46660a | ||
|
|
0724dd0043 | ||
|
|
c0932a1bd5 | ||
|
|
d7a65fafad | ||
|
|
239e27c1b5 | ||
|
|
1ca10373a3 | ||
|
|
ac6687f6ff | ||
|
|
b616e1c8f6 | ||
|
|
1ec22b3d0c | ||
|
|
a01ffc6e1a | ||
|
|
e1bbc1e525 | ||
|
|
049cef9ce3 | ||
|
|
18f7a6a694 | ||
|
|
30a3abedbe | ||
|
|
2f5c926c82 | ||
|
|
55b4425c5d | ||
|
|
dc49d7af38 | ||
|
|
e01c2e903a | ||
|
|
886be81af2 | ||
|
|
671ddf5bef | ||
|
|
5f8cb04fee | ||
|
|
3f06560c51 | ||
|
|
f666e6f42e | ||
|
|
e546ce83b4 | ||
|
|
059a2d754e | ||
|
|
1e64ebe17a | ||
|
|
8abf8f844f | ||
|
|
01740a253d | ||
|
|
2d72f55e57 | ||
|
|
ab47b4a783 |
360
LeftPanel.qml
@@ -40,17 +40,17 @@ import "components/effects/" as MoneroEffects
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
id: panel
|
id: panel
|
||||||
|
|
||||||
property alias unlockedBalanceText: unlockedBalanceText.text
|
property int currentAccountIndex: 0
|
||||||
property alias unlockedBalanceVisible: unlockedBalanceText.visible
|
property string currentAccountLabel: "Primary account"
|
||||||
property alias unlockedBalanceLabelVisible: unlockedBalanceLabel.visible
|
property string balanceString: "?.??"
|
||||||
property alias balanceLabelText: balanceLabel.text
|
property string balanceUnlockedString: "?.??"
|
||||||
property alias balanceText: balanceText.text
|
property string balanceFiatString: "?.??"
|
||||||
property alias balanceTextFiat: balanceTextFiat.text
|
property string minutesToUnlock: ""
|
||||||
property alias unlockedBalanceTextFiat: unlockedBalanceTextFiat.text
|
property bool isSyncing: false
|
||||||
property alias networkStatus : networkStatus
|
property alias networkStatus : networkStatus
|
||||||
property alias progressBar : progressBar
|
property alias progressBar : progressBar
|
||||||
property alias daemonProgressBar : daemonProgressBar
|
property alias daemonProgressBar : daemonProgressBar
|
||||||
property alias minutesToUnlockTxt: unlockedBalanceLabel.text
|
|
||||||
property int titleBarHeight: 50
|
property int titleBarHeight: 50
|
||||||
property string copyValue: ""
|
property string copyValue: ""
|
||||||
Clipboard { id: clipboard }
|
Clipboard { id: clipboard }
|
||||||
@@ -84,7 +84,7 @@ Rectangle {
|
|||||||
menuColumn.previousButton.checked = true
|
menuColumn.previousButton.checked = true
|
||||||
}
|
}
|
||||||
|
|
||||||
width: (isMobile)? appWindow.width : 300
|
width: 300
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
@@ -108,7 +108,7 @@ Rectangle {
|
|||||||
visible: true
|
visible: true
|
||||||
z: 2
|
z: 2
|
||||||
id: column1
|
id: column1
|
||||||
height: 210
|
height: 175
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
@@ -127,9 +127,9 @@ Rectangle {
|
|||||||
id: card
|
id: card
|
||||||
visible: !isOpenGL || MoneroComponents.Style.blackTheme
|
visible: !isOpenGL || MoneroComponents.Style.blackTheme
|
||||||
width: 260
|
width: 260
|
||||||
height: 170
|
height: 135
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: "qrc:///images/card-background.png"
|
source: MoneroComponents.Style.blackTheme ? "qrc:///images/card-background-black.png" : "qrc:///images/card-background-white.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
DropShadow {
|
DropShadow {
|
||||||
@@ -171,57 +171,6 @@ Rectangle {
|
|||||||
color: "#ff9323"
|
color: "#ff9323"
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
height: (logoutImage.height + 8)
|
|
||||||
width: (logoutImage.width + 8)
|
|
||||||
color: "transparent"
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 8
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: 25
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: logoutImage
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
height: 16
|
|
||||||
width: 13
|
|
||||||
source: "qrc:///images/logout.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea{
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: {
|
|
||||||
middlePanel.addressBookView.clearFields();
|
|
||||||
middlePanel.transferView.clearFields();
|
|
||||||
middlePanel.receiveView.clearFields();
|
|
||||||
appWindow.showWizard();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MoneroComponents.Label {
|
|
||||||
fontSize: 20
|
|
||||||
text: "¥"
|
|
||||||
color: "white"
|
|
||||||
visible: persistentSettings.fiatPriceEnabled
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 45
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: 28
|
|
||||||
themeTransition: false
|
|
||||||
|
|
||||||
MouseArea{
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: {
|
|
||||||
persistentSettings.fiatPriceToggle = !persistentSettings.fiatPriceToggle
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -232,177 +181,152 @@ Rectangle {
|
|||||||
height: 490
|
height: 490
|
||||||
width: 50
|
width: 50
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.Label {
|
||||||
visible: !(persistentSettings.fiatPriceToggle && persistentSettings.fiatPriceEnabled)
|
fontSize: 12
|
||||||
id: balanceText
|
id: accountIndex
|
||||||
themeTransition: false
|
text: qsTr("Account") + " #" + currentAccountIndex
|
||||||
|
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 20
|
anchors.leftMargin: 60
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 76
|
anchors.topMargin: 23
|
||||||
font.family: "Arial"
|
|
||||||
color: "#FFFFFF"
|
|
||||||
text: "N/A"
|
|
||||||
// dynamically adjust text size
|
|
||||||
font.pixelSize: {
|
|
||||||
if (persistentSettings.hideBalance) {
|
|
||||||
return 20;
|
|
||||||
}
|
|
||||||
var digits = text.split('.')[0].length
|
|
||||||
var defaultSize = 22;
|
|
||||||
if(digits > 2) {
|
|
||||||
return defaultSize - 1.1*digits
|
|
||||||
}
|
|
||||||
return defaultSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
hoverEnabled: true
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onEntered: {
|
|
||||||
parent.color = MoneroComponents.Style.orange
|
|
||||||
}
|
|
||||||
onExited: {
|
|
||||||
parent.color = MoneroComponents.Style.white
|
|
||||||
}
|
|
||||||
onClicked: {
|
|
||||||
console.log("Copied to clipboard");
|
|
||||||
clipboard.setText(parent.text);
|
|
||||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
|
||||||
visible: !balanceText.visible
|
|
||||||
id: balanceTextFiat
|
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 20
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: 76
|
|
||||||
font.family: "Arial"
|
|
||||||
color: "#FFFFFF"
|
|
||||||
text: "N/A"
|
|
||||||
font.pixelSize: balanceText.font.pixelSize
|
|
||||||
MouseArea {
|
|
||||||
hoverEnabled: true
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onEntered: {
|
|
||||||
parent.color = MoneroComponents.Style.orange
|
|
||||||
}
|
|
||||||
onExited: {
|
|
||||||
parent.color = MoneroComponents.Style.white
|
|
||||||
}
|
|
||||||
onClicked: {
|
|
||||||
console.log("Copied to clipboard");
|
|
||||||
clipboard.setText(parent.text);
|
|
||||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MouseArea{
|
||||||
id: unlockedBalanceText
|
|
||||||
visible: !(persistentSettings.fiatPriceToggle && persistentSettings.fiatPriceEnabled)
|
|
||||||
themeTransition: false
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 20
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: 126
|
|
||||||
font.family: "Arial"
|
|
||||||
color: "#FFFFFF"
|
|
||||||
text: "N/A"
|
|
||||||
// dynamically adjust text size
|
|
||||||
font.pixelSize: {
|
|
||||||
if (persistentSettings.hideBalance) {
|
|
||||||
return 20;
|
|
||||||
}
|
|
||||||
var digits = text.split('.')[0].length
|
|
||||||
var defaultSize = 20;
|
|
||||||
if(digits > 3) {
|
|
||||||
return defaultSize - 0.6*digits
|
|
||||||
}
|
|
||||||
return defaultSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
hoverEnabled: true
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onEntered: {
|
|
||||||
parent.color = MoneroComponents.Style.orange
|
|
||||||
}
|
|
||||||
onExited: {
|
|
||||||
parent.color = MoneroComponents.Style.white
|
|
||||||
}
|
|
||||||
onClicked: {
|
|
||||||
console.log("Copied to clipboard");
|
|
||||||
clipboard.setText(parent.text);
|
|
||||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
|
||||||
id: unlockedBalanceTextFiat
|
|
||||||
themeTransition: false
|
|
||||||
visible: !unlockedBalanceText.visible
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 20
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: 126
|
|
||||||
font.family: "Arial"
|
|
||||||
color: "#FFFFFF"
|
|
||||||
text: "N/A"
|
|
||||||
font.pixelSize: unlockedBalanceText.font.pixelSize
|
|
||||||
MouseArea {
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onEntered: {
|
onClicked: appWindow.showPageRequest("Account")
|
||||||
parent.color = MoneroComponents.Style.orange
|
|
||||||
}
|
|
||||||
onExited: {
|
|
||||||
parent.color = MoneroComponents.Style.white
|
|
||||||
}
|
|
||||||
onClicked: {
|
|
||||||
console.log("Copied to clipboard");
|
|
||||||
clipboard.setText(parent.text);
|
|
||||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.Label {
|
MoneroComponents.Label {
|
||||||
id: unlockedBalanceLabel
|
fontSize: 16
|
||||||
visible: true
|
id: accountLabel
|
||||||
text: qsTr("Unlocked balance") + translationManager.emptyString
|
textWidth: 170
|
||||||
color: "white"
|
text: currentAccountLabel
|
||||||
fontSize: 14
|
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 20
|
anchors.leftMargin: 60
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 110
|
anchors.topMargin: 36
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.Label {
|
|
||||||
visible: !isMobile
|
|
||||||
id: balanceLabel
|
|
||||||
text: qsTr("Balance") + translationManager.emptyString
|
|
||||||
color: "white"
|
|
||||||
fontSize: 14
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 20
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: 60
|
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
textWidth: 238
|
|
||||||
|
MouseArea {
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: appWindow.showPageRequest("Account")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
fontSize: 16
|
||||||
|
visible: isSyncing
|
||||||
|
text: qsTr("Syncing...")
|
||||||
|
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 20
|
||||||
|
anchors.bottom: currencyLabel.top
|
||||||
|
anchors.bottomMargin: 15
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
id: currencyLabel
|
||||||
|
font.pixelSize: 16
|
||||||
|
text: {
|
||||||
|
if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) {
|
||||||
|
return persistentSettings.fiatPriceCurrency == "xmrusd" ? "USD" : "EUR"
|
||||||
|
} else {
|
||||||
|
return "XMR"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 20
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 100
|
||||||
|
themeTransition: false
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
visible: persistentSettings.fiatPriceEnabled
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: persistentSettings.fiatPriceToggle = !persistentSettings.fiatPriceToggle
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
id: balancePart1
|
||||||
|
themeTransition: false
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 58
|
||||||
|
anchors.baseline: currencyLabel.baseline
|
||||||
|
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||||
|
text: {
|
||||||
|
if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) {
|
||||||
|
return balanceFiatString.split('.')[0] + "."
|
||||||
|
} else {
|
||||||
|
return balanceString.split('.')[0] + "."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
font.pixelSize: {
|
||||||
|
var defaultSize = 29;
|
||||||
|
var digits = (balancePart1.text.length - 1)
|
||||||
|
if (digits > 2 && !(persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle)) {
|
||||||
|
return defaultSize - 1.1 * digits
|
||||||
|
} else {
|
||||||
|
return defaultSize
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MouseArea {
|
||||||
|
id: balancePart1MouseArea
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: {
|
||||||
|
balancePart1.color = MoneroComponents.Style.orange
|
||||||
|
balancePart2.color = MoneroComponents.Style.orange
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
balancePart1.color = Qt.binding(function() { return MoneroComponents.Style.blackTheme ? "white" : "black" })
|
||||||
|
balancePart2.color = Qt.binding(function() { return MoneroComponents.Style.blackTheme ? "white" : "black" })
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
console.log("Copied to clipboard");
|
||||||
|
clipboard.setText(balancePart1.text + balancePart2.text);
|
||||||
|
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
id: balancePart2
|
||||||
|
themeTransition: false
|
||||||
|
anchors.left: balancePart1.right
|
||||||
|
anchors.leftMargin: 2
|
||||||
|
anchors.baseline: currencyLabel.baseline
|
||||||
|
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||||
|
text: {
|
||||||
|
if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) {
|
||||||
|
return balanceFiatString.split('.')[1]
|
||||||
|
} else {
|
||||||
|
return balanceString.split('.')[1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
font.pixelSize: 16
|
||||||
|
MouseArea {
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: balancePart1MouseArea.entered()
|
||||||
|
onExited: balancePart1MouseArea.exited()
|
||||||
|
onClicked: balancePart1MouseArea.clicked(mouse)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Item { //separator
|
Item { //separator
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
@@ -418,7 +342,7 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.top: (isMobile)? parent.top : column1.bottom
|
anchors.top: column1.bottom
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
Flickable {
|
Flickable {
|
||||||
|
|||||||
@@ -46,11 +46,6 @@ Rectangle {
|
|||||||
|
|
||||||
property Item currentView
|
property Item currentView
|
||||||
property Item previousView
|
property Item previousView
|
||||||
property bool basicMode : isMobile
|
|
||||||
property string balanceLabelText: qsTr("Balance") + translationManager.emptyString
|
|
||||||
property string balanceText
|
|
||||||
property string unlockedBalanceLabelText: qsTr("Unlocked Balance") + translationManager.emptyString
|
|
||||||
property string unlockedBalanceText
|
|
||||||
property int minHeight: (appWindow.height > 800) ? appWindow.height : 800
|
property int minHeight: (appWindow.height > 800) ? appWindow.height : 800
|
||||||
property alias contentHeight: mainFlickable.contentHeight
|
property alias contentHeight: mainFlickable.contentHeight
|
||||||
property alias flickable: mainFlickable
|
property alias flickable: mainFlickable
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Copyright (c) 2014-2019, The Monero Project
|
|||||||
- Mail: [dev@getmonero.org](mailto:dev@getmonero.org)
|
- Mail: [dev@getmonero.org](mailto:dev@getmonero.org)
|
||||||
- Github: [https://github.com/monero-project/monero-gui](https://github.com/monero-project/monero-gui)
|
- Github: [https://github.com/monero-project/monero-gui](https://github.com/monero-project/monero-gui)
|
||||||
- IRC: [#monero-dev on Freenode](irc://chat.freenode.net/#monero-dev)
|
- IRC: [#monero-dev on Freenode](irc://chat.freenode.net/#monero-dev)
|
||||||
- Translation platform (Pootle): [translate.getmonero.org](https://translate.getmonero.org)
|
- Translation platform (Weblate): [translate.getmonero.org](https://translate.getmonero.org)
|
||||||
|
|
||||||
## Vulnerability response
|
## Vulnerability response
|
||||||
|
|
||||||
@@ -75,6 +75,8 @@ Packaging for your favorite distribution would be a welcome contribution!
|
|||||||
|
|
||||||
## Compiling the Monero GUI from source
|
## Compiling the Monero GUI from source
|
||||||
|
|
||||||
|
*Note*: Qt 5.9.7 is the minimum version required to build the GUI.
|
||||||
|
|
||||||
### On Linux:
|
### On Linux:
|
||||||
|
|
||||||
(Tested on Ubuntu 17.10 x64, Ubuntu 18.04 x64 and Gentoo x64)
|
(Tested on Ubuntu 17.10 x64, Ubuntu 18.04 x64 and Gentoo x64)
|
||||||
@@ -83,7 +85,7 @@ Packaging for your favorite distribution would be a welcome contribution!
|
|||||||
|
|
||||||
- For Debian distributions (Debian, Ubuntu, Mint, Tails...)
|
- For Debian distributions (Debian, Ubuntu, Mint, Tails...)
|
||||||
|
|
||||||
`sudo apt install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev`
|
`sudo apt install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev`
|
||||||
|
|
||||||
- For Gentoo
|
- For Gentoo
|
||||||
|
|
||||||
@@ -95,7 +97,7 @@ Packaging for your favorite distribution would be a welcome contribution!
|
|||||||
|
|
||||||
2. Install Qt:
|
2. Install Qt:
|
||||||
|
|
||||||
*Note*: Qt 5.9.7 is the minimum version required to build the GUI. This makes **some** distributions (mostly based on debian, like Ubuntu 16.x or Linux Mint 18.x) obsolete due to their repositories containing an older Qt version.
|
*Note*: The Qt 5.9.7 or newer requirement makes **some** distributions (mostly based on debian, like Ubuntu 16.x or Linux Mint 18.x) obsolete due to their repositories containing an older Qt version.
|
||||||
|
|
||||||
The recommended way is to install 5.9.7 from the [official Qt installer](https://www.qt.io/download-qt-installer) or [compiling it yourself](https://wiki.qt.io/Install_Qt_5_on_Ubuntu). This ensures you have the correct version. Higher versions *can* work but as it differs from our production build target, slight differences may occur.
|
The recommended way is to install 5.9.7 from the [official Qt installer](https://www.qt.io/download-qt-installer) or [compiling it yourself](https://wiki.qt.io/Install_Qt_5_on_Ubuntu). This ensures you have the correct version. Higher versions *can* work but as it differs from our production build target, slight differences may occur.
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ Item {
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
id: checkBoxLayout
|
id: checkBoxLayout
|
||||||
layoutDirection: iconOnTheLeft ? Qt.LeftToRight : Qt.RightToLeft
|
layoutDirection: iconOnTheLeft ? Qt.LeftToRight : Qt.RightToLeft
|
||||||
spacing: (!isMobile ? 10 : 8)
|
spacing: 10
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: checkMark
|
id: checkMark
|
||||||
|
|||||||
@@ -178,7 +178,11 @@ Window {
|
|||||||
onAccepted: {
|
onAccepted: {
|
||||||
if(text.length > 0) {
|
if(text.length > 0) {
|
||||||
textArea.logCommand(">>> " + text)
|
textArea.logCommand(">>> " + text)
|
||||||
daemonManager.sendCommand(text, currentWallet.nettype);
|
daemonManager.sendCommandAsync(text.split(" "), currentWallet.nettype, function(result) {
|
||||||
|
if (!result) {
|
||||||
|
appWindow.showStatusMessage(qsTr("Failed to send command"), 3);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
text = ""
|
text = ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ Item {
|
|||||||
property alias horizontalAlignment: label.horizontalAlignment
|
property alias horizontalAlignment: label.horizontalAlignment
|
||||||
property alias elide: label.elide
|
property alias elide: label.elide
|
||||||
property alias textWidth: label.width
|
property alias textWidth: label.width
|
||||||
|
property alias styleName: label.font.styleName
|
||||||
property alias themeTransition: label.themeTransition
|
property alias themeTransition: label.themeTransition
|
||||||
signal linkActivated()
|
signal linkActivated()
|
||||||
height: label.height
|
height: label.height
|
||||||
|
|||||||
@@ -1,118 +0,0 @@
|
|||||||
import QtQuick 2.9
|
|
||||||
import QtGraphicalEffects 1.0
|
|
||||||
import QtQuick.Layouts 1.1
|
|
||||||
|
|
||||||
import moneroComponents.Wallet 1.0
|
|
||||||
import "../components" as MoneroComponents
|
|
||||||
|
|
||||||
// BasicPanel header
|
|
||||||
Rectangle {
|
|
||||||
id: header
|
|
||||||
anchors.leftMargin: 1
|
|
||||||
anchors.rightMargin: 1
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: 64
|
|
||||||
color: "#FFFFFF"
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: logo
|
|
||||||
visible: appWindow.width > 460
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.verticalCenterOffset: -5
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 50
|
|
||||||
source: "qrc:///images/moneroLogo2.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: icon
|
|
||||||
visible: !logo.visible
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 40
|
|
||||||
source: "qrc:///images/moneroIcon.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
Grid {
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.topMargin: 10
|
|
||||||
width: 256
|
|
||||||
columns: 3
|
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
|
||||||
id: balanceLabel
|
|
||||||
width: 116
|
|
||||||
height: 20
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 12
|
|
||||||
font.letterSpacing: -1
|
|
||||||
elide: Text.ElideRight
|
|
||||||
horizontalAlignment: Text.AlignLeft
|
|
||||||
verticalAlignment: Text.AlignBottom
|
|
||||||
color: "#535353"
|
|
||||||
text: leftPanel.balanceLabelText + ":"
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
|
||||||
id: balanceText
|
|
||||||
width: 110
|
|
||||||
height: 20
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 18
|
|
||||||
font.letterSpacing: -1
|
|
||||||
elide: Text.ElideRight
|
|
||||||
horizontalAlignment: Text.AlignLeft
|
|
||||||
verticalAlignment: Text.AlignBottom
|
|
||||||
color: "#000000"
|
|
||||||
text: leftPanel.balanceText
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
height: 20
|
|
||||||
width: 20
|
|
||||||
|
|
||||||
Image {
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.left: parent.left
|
|
||||||
source: "qrc:///images/lockIcon.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
|
||||||
width: 116
|
|
||||||
height: 20
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 12
|
|
||||||
font.letterSpacing: -1
|
|
||||||
elide: Text.ElideRight
|
|
||||||
horizontalAlignment: Text.AlignLeft
|
|
||||||
verticalAlignment: Text.AlignBottom
|
|
||||||
color: "#535353"
|
|
||||||
text: qsTr("Unlocked Balance:")
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
|
||||||
id: availableBalanceText
|
|
||||||
width: 110
|
|
||||||
height: 20
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 14
|
|
||||||
font.letterSpacing: -1
|
|
||||||
elide: Text.ElideRight
|
|
||||||
horizontalAlignment: Text.AlignLeft
|
|
||||||
verticalAlignment: Text.AlignBottom
|
|
||||||
color: "#000000"
|
|
||||||
text: leftPanel.unlockedBalanceText
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
height: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
|
import FontAwesome 1.0
|
||||||
import moneroComponents.Wallet 1.0
|
import moneroComponents.Wallet 1.0
|
||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
|
|
||||||
@@ -146,6 +147,50 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
anchors.left: statusTextVal.right
|
||||||
|
anchors.leftMargin: 16
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
color: refreshMouseArea.containsMouse ? MoneroComponents.Style.dimmedFontColor : MoneroComponents.Style.defaultFontColor
|
||||||
|
font.family: FontAwesome.fontFamilySolid
|
||||||
|
font.pixelSize: 24
|
||||||
|
font.styleName: "Solid"
|
||||||
|
opacity: iconItem.opacity * (refreshMouseArea.visible ? 1 : 0.5)
|
||||||
|
text: FontAwesome.random
|
||||||
|
visible: (
|
||||||
|
item.connected != Wallet.ConnectionStatus_Disconnected &&
|
||||||
|
!persistentSettings.useRemoteNode &&
|
||||||
|
persistentSettings.bootstrapNodeAddress == "auto"
|
||||||
|
)
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: refreshMouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
visible: true
|
||||||
|
onClicked: {
|
||||||
|
const callback = function(result) {
|
||||||
|
refreshMouseArea.visible = true;
|
||||||
|
if (result) {
|
||||||
|
appWindow.showStatusMessage(qsTr("Successfully switched to another public node"), 3);
|
||||||
|
appWindow.currentWallet.refreshHeightAsync();
|
||||||
|
} else {
|
||||||
|
appWindow.showStatusMessage(qsTr("Failed to switch public node"), 3);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
daemonManager.sendCommandAsync(
|
||||||
|
["set_bootstrap_daemon", "auto"],
|
||||||
|
appWindow.currentWallet.nettype,
|
||||||
|
callback);
|
||||||
|
|
||||||
|
refreshMouseArea.visible = false;
|
||||||
|
appWindow.showStatusMessage(qsTr("Switching to another public node"), 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ Item {
|
|||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: label
|
id: label
|
||||||
Layout.leftMargin: (!isMobile ? 10 : 8)
|
Layout.leftMargin: 10
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
font.pixelSize: radioButton.fontSize
|
font.pixelSize: radioButton.fontSize
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import "../js/Utils.js" as Utils
|
|||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: (isMobile) ? 1 : 2
|
columns: 2
|
||||||
columnSpacing: 32
|
columnSpacing: 32
|
||||||
id: root
|
id: root
|
||||||
property alias daemonAddrText: daemonAddr.text
|
property alias daemonAddrText: daemonAddr.text
|
||||||
|
|||||||
@@ -82,10 +82,8 @@ Rectangle {
|
|||||||
|
|
||||||
function open() {
|
function open() {
|
||||||
// Center
|
// Center
|
||||||
if(!isMobile) {
|
root.x = parent.width/2 - root.width/2
|
||||||
root.x = parent.width/2 - root.width/2
|
root.y = 100
|
||||||
root.y = 100
|
|
||||||
}
|
|
||||||
root.z = 11
|
root.z = 11
|
||||||
root.visible = true;
|
root.visible = true;
|
||||||
}
|
}
|
||||||
@@ -96,14 +94,14 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: implement without hardcoding sizes
|
// TODO: implement without hardcoding sizes
|
||||||
width: isMobile ? screenWidth : 520
|
width: 520
|
||||||
height: isMobile ? screenHeight : 380
|
height: 380
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
spacing: 10
|
spacing: 10
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: (isMobile? 17 : 20)
|
anchors.margins: 20
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: column
|
id: column
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ QtObject {
|
|||||||
property string titleBarBackgroundBorderColor: blackTheme ? _b_titleBarBackgroundBorderColor : _w_titleBarBackgroundBorderColor
|
property string titleBarBackgroundBorderColor: blackTheme ? _b_titleBarBackgroundBorderColor : _w_titleBarBackgroundBorderColor
|
||||||
property string titleBarLogoSource: blackTheme ? _b_titleBarLogoSource : _w_titleBarLogoSource
|
property string titleBarLogoSource: blackTheme ? _b_titleBarLogoSource : _w_titleBarLogoSource
|
||||||
property string titleBarMinimizeSource: blackTheme ? _b_titleBarMinimizeSource : _w_titleBarMinimizeSource
|
property string titleBarMinimizeSource: blackTheme ? _b_titleBarMinimizeSource : _w_titleBarMinimizeSource
|
||||||
property string titleBarExpandSource: blackTheme ? _b_titleBarExpandSource : _w_titleBarExpandSource
|
|
||||||
property string titleBarFullscreenSource: blackTheme ? _b_titleBarFullscreenSource : _w_titleBarFullscreenSource
|
property string titleBarFullscreenSource: blackTheme ? _b_titleBarFullscreenSource : _w_titleBarFullscreenSource
|
||||||
property string titleBarCloseSource: blackTheme ? _b_titleBarCloseSource : _w_titleBarCloseSource
|
property string titleBarCloseSource: blackTheme ? _b_titleBarCloseSource : _w_titleBarCloseSource
|
||||||
property string titleBarButtonHoverColor: blackTheme ? _b_titleBarButtonHoverColor : _w_titleBarButtonHoverColor
|
property string titleBarButtonHoverColor: blackTheme ? _b_titleBarButtonHoverColor : _w_titleBarButtonHoverColor
|
||||||
@@ -108,7 +107,6 @@ QtObject {
|
|||||||
property string _b_titleBarBackgroundBorderColor: "#2f2f2f"
|
property string _b_titleBarBackgroundBorderColor: "#2f2f2f"
|
||||||
property string _b_titleBarLogoSource: "qrc:///images/titlebarLogo.png"
|
property string _b_titleBarLogoSource: "qrc:///images/titlebarLogo.png"
|
||||||
property string _b_titleBarMinimizeSource: "qrc:///images/minimize.svg"
|
property string _b_titleBarMinimizeSource: "qrc:///images/minimize.svg"
|
||||||
property string _b_titleBarExpandSource: "qrc:///images/sidebar.svg"
|
|
||||||
property string _b_titleBarFullscreenSource: "qrc:///images/fullscreen.svg"
|
property string _b_titleBarFullscreenSource: "qrc:///images/fullscreen.svg"
|
||||||
property string _b_titleBarCloseSource: "qrc:///images/close.svg"
|
property string _b_titleBarCloseSource: "qrc:///images/close.svg"
|
||||||
property string _b_titleBarButtonHoverColor: "#10FFFFFF"
|
property string _b_titleBarButtonHoverColor: "#10FFFFFF"
|
||||||
@@ -165,7 +163,6 @@ QtObject {
|
|||||||
property string _w_titleBarBackgroundBorderColor: "#DEDEDE"
|
property string _w_titleBarBackgroundBorderColor: "#DEDEDE"
|
||||||
property string _w_titleBarLogoSource: "qrc:///images/themes/white/titlebarLogo.png"
|
property string _w_titleBarLogoSource: "qrc:///images/themes/white/titlebarLogo.png"
|
||||||
property string _w_titleBarMinimizeSource: "qrc:///images/themes/white/minimize.svg"
|
property string _w_titleBarMinimizeSource: "qrc:///images/themes/white/minimize.svg"
|
||||||
property string _w_titleBarExpandSource: "qrc:///images/themes/white/expand.svg"
|
|
||||||
property string _w_titleBarFullscreenSource: "qrc:///images/themes/white/fullscreen.svg"
|
property string _w_titleBarFullscreenSource: "qrc:///images/themes/white/fullscreen.svg"
|
||||||
property string _w_titleBarCloseSource: "qrc:///images/themes/white/close.svg"
|
property string _w_titleBarCloseSource: "qrc:///images/themes/white/close.svg"
|
||||||
property string _w_titleBarButtonHoverColor: "#11000000"
|
property string _w_titleBarButtonHoverColor: "#11000000"
|
||||||
|
|||||||
@@ -38,14 +38,14 @@ import "effects/" as MoneroEffects
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
property int mouseX: 0
|
property int mouseX: 0
|
||||||
property bool basicButtonVisible: false
|
|
||||||
property bool customDecorations: persistentSettings.customDecorations
|
property bool customDecorations: persistentSettings.customDecorations
|
||||||
property bool showMinimizeButton: true
|
property bool showMinimizeButton: true
|
||||||
property bool showMaximizeButton: true
|
property bool showMaximizeButton: true
|
||||||
property bool showCloseButton: true
|
property bool showCloseButton: true
|
||||||
|
property string walletName: ""
|
||||||
|
|
||||||
height: {
|
height: {
|
||||||
if(!persistentSettings.customDecorations || isMobile) return 0;
|
if(!persistentSettings.customDecorations) return 0;
|
||||||
return 50;
|
return 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,18 +56,18 @@ Rectangle {
|
|||||||
signal maximizeClicked
|
signal maximizeClicked
|
||||||
signal minimizeClicked
|
signal minimizeClicked
|
||||||
signal languageClicked
|
signal languageClicked
|
||||||
signal goToBasicVersion(bool yes)
|
signal closeWalletClicked
|
||||||
|
|
||||||
state: "default"
|
state: "default"
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "default";
|
name: "default";
|
||||||
PropertyChanges { target: btnSidebarCollapse; visible: true}
|
PropertyChanges { target: btnCloseWallet; visible: true}
|
||||||
PropertyChanges { target: btnLanguageToggle; visible: true}
|
PropertyChanges { target: btnLanguageToggle; visible: true}
|
||||||
}, State {
|
}, State {
|
||||||
// show only theme switcher and window controls
|
// show only theme switcher and window controls
|
||||||
name: "essentials";
|
name: "essentials";
|
||||||
PropertyChanges { target: btnSidebarCollapse; visible: false}
|
PropertyChanges { target: btnCloseWallet; visible: false}
|
||||||
PropertyChanges { target: btnLanguageToggle; visible: false}
|
PropertyChanges { target: btnLanguageToggle; visible: false}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -93,22 +93,20 @@ Rectangle {
|
|||||||
|
|
||||||
// collapse sidebar
|
// collapse sidebar
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: btnSidebarCollapse
|
id: btnCloseWallet
|
||||||
visible: root.basicButtonVisible
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
Layout.preferredWidth: parent.height
|
Layout.preferredWidth: parent.height
|
||||||
Layout.preferredHeight: parent.height
|
Layout.preferredHeight: parent.height
|
||||||
|
|
||||||
MoneroEffects.ImageMask {
|
|
||||||
|
Text {
|
||||||
|
text: FontAwesome.signOutAlt
|
||||||
|
font.family: FontAwesome.fontFamilySolid
|
||||||
|
font.pixelSize: 16
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
font.styleName: "Solid"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
height: 14
|
|
||||||
width: 14
|
|
||||||
image: MoneroComponents.Style.titleBarExpandSource
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
|
||||||
fontAwesomeFallbackIcon: FontAwesome.cube
|
|
||||||
fontAwesomeFallbackSize: 14
|
|
||||||
fontAwesomeFallbackOpacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.9
|
|
||||||
opacity: 0.75
|
opacity: 0.75
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +116,7 @@ Rectangle {
|
|||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
|
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
|
||||||
onExited: parent.color = "transparent"
|
onExited: parent.color = "transparent"
|
||||||
onClicked: root.goToBasicVersion(leftPanel.visible)
|
onClicked: root.closeWalletClicked(leftPanel.visible)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,9 +129,10 @@ Rectangle {
|
|||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: FontAwesome.globe
|
text: FontAwesome.globe
|
||||||
font.family: FontAwesome.fontFamily
|
font.family: FontAwesome.fontFamilySolid
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
font.styleName: "Solid"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
opacity: 0.75
|
opacity: 0.75
|
||||||
@@ -156,9 +155,10 @@ Rectangle {
|
|||||||
Layout.preferredHeight: parent.height
|
Layout.preferredHeight: parent.height
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: MoneroComponents.Style.blackTheme ? FontAwesome.lightbulbO : FontAwesome.moonO
|
text: FontAwesome.moonO
|
||||||
font.family: FontAwesome.fontFamily
|
font.family: MoneroComponents.Style.blackTheme ? FontAwesome.fontFamilySolid : FontAwesome.fontFamily
|
||||||
font.pixelSize: 16
|
font.styleName: MoneroComponents.Style.blackTheme ? "Solid" : "Regular"
|
||||||
|
font.pixelSize: 15
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -189,6 +189,7 @@ Rectangle {
|
|||||||
|
|
||||||
// monero logo
|
// monero logo
|
||||||
Item {
|
Item {
|
||||||
|
visible: walletName.length === 0
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: parent.height
|
Layout.preferredHeight: parent.height
|
||||||
|
|
||||||
@@ -216,6 +217,22 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
visible: walletName.length > 0
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: parent.height
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
font.pixelSize: 20
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
elide: Text.ElideRight
|
||||||
|
text: walletName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// minimize
|
// minimize
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ Item {
|
|||||||
property string color: ""
|
property string color: ""
|
||||||
property bool fontAwesomeFallbackEnabled: true
|
property bool fontAwesomeFallbackEnabled: true
|
||||||
property var fontAwesomeFallbackIcon: ""
|
property var fontAwesomeFallbackIcon: ""
|
||||||
|
property string fontAwesomeFallbackFont: FontAwesome.fontFamilySolid
|
||||||
|
property string fontAwesomeFallbackStyle: "Solid"
|
||||||
property int fontAwesomeFallbackSize: 16
|
property int fontAwesomeFallbackSize: 16
|
||||||
property double fontAwesomeFallbackOpacity: 0.8
|
property double fontAwesomeFallbackOpacity: 0.8
|
||||||
property string fontAwesomeFallbackColor: MoneroComponents.Style.defaultFontColor
|
property string fontAwesomeFallbackColor: MoneroComponents.Style.defaultFontColor
|
||||||
@@ -74,8 +76,9 @@ Item {
|
|||||||
id: fontAwesomeFallback
|
id: fontAwesomeFallback
|
||||||
visible: !isOpenGL && root.fontAwesomeFallback
|
visible: !isOpenGL && root.fontAwesomeFallback
|
||||||
text: !isOpenGL ? root.fontAwesomeFallbackIcon : ""
|
text: !isOpenGL ? root.fontAwesomeFallbackIcon : ""
|
||||||
font.family: FontAwesome.fontFamily
|
font.family: root.fontAwesomeFallbackFont
|
||||||
font.pixelSize: root.fontAwesomeFallbackSize
|
font.pixelSize: root.fontAwesomeFallbackSize
|
||||||
|
font.styleName: root.fontAwesomeFallbackStyle
|
||||||
color: root.fontAwesomeFallbackColor
|
color: root.fontAwesomeFallbackColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|||||||
@@ -4,10 +4,23 @@ import QtQuick 2.9
|
|||||||
Object {
|
Object {
|
||||||
|
|
||||||
FontLoader {
|
FontLoader {
|
||||||
source: "./fontawesome-webfont.ttf"
|
id: regular
|
||||||
|
source: "./fa-regular-400.ttf"
|
||||||
}
|
}
|
||||||
|
|
||||||
property string fontFamily: "FontAwesome"
|
FontLoader {
|
||||||
|
id: brands
|
||||||
|
source: "./fa-brands-400.ttf"
|
||||||
|
}
|
||||||
|
|
||||||
|
FontLoader {
|
||||||
|
id: solid
|
||||||
|
source: "./fa-solid-900.ttf"
|
||||||
|
}
|
||||||
|
|
||||||
|
property string fontFamily: regular.name
|
||||||
|
property string fontFamilyBrands: brands.name
|
||||||
|
property string fontFamilySolid: solid.name
|
||||||
|
|
||||||
// Icons
|
// Icons
|
||||||
property string addressBook : "\uf2b9"
|
property string addressBook : "\uf2b9"
|
||||||
@@ -594,6 +607,7 @@ Object {
|
|||||||
property string shower : "\uf2cc"
|
property string shower : "\uf2cc"
|
||||||
property string signIn : "\uf090"
|
property string signIn : "\uf090"
|
||||||
property string signLanguage : "\uf2a7"
|
property string signLanguage : "\uf2a7"
|
||||||
|
property string signOutAlt : "\uf2f5"
|
||||||
property string signOut : "\uf08b"
|
property string signOut : "\uf08b"
|
||||||
property string signal : "\uf012"
|
property string signal : "\uf012"
|
||||||
property string signing : "\uf2a7"
|
property string signing : "\uf2a7"
|
||||||
|
|||||||
BIN
fonts/FontAwesome/fa-brands-400.ttf
Normal file
BIN
fonts/FontAwesome/fa-regular-400.ttf
Normal file
BIN
fonts/FontAwesome/fa-solid-900.ttf
Normal file
@@ -17,7 +17,7 @@ if [ ! -d $MONERO_DIR/src ]; then
|
|||||||
fi
|
fi
|
||||||
git submodule update --remote
|
git submodule update --remote
|
||||||
git -C $MONERO_DIR fetch
|
git -C $MONERO_DIR fetch
|
||||||
git -C $MONERO_DIR checkout v0.14.1.2
|
git -C $MONERO_DIR checkout v0.15.0.0
|
||||||
|
|
||||||
# get monero core tag
|
# get monero core tag
|
||||||
pushd $MONERO_DIR
|
pushd $MONERO_DIR
|
||||||
@@ -253,4 +253,7 @@ if [ -d $MONERO_DIR/build/$BUILD_TYPE/external/unbound ]; then
|
|||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# install randomx
|
||||||
|
eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/randomx all install
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|||||||
BIN
images/card-background-black.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
images/card-background-black@2x.png
Executable file
|
After Width: | Height: | Size: 68 KiB |
BIN
images/card-background-white.png
Executable file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
images/card-background-white@2x.png
Executable file
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 419 B |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 436 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 612 B |
@@ -1,6 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="27" height="27" viewBox="0 0 27 27">
|
|
||||||
<g fill="none" fill-rule="evenodd" stroke="#FFF" stroke-linecap="round" stroke-width="1.25">
|
|
||||||
<path d="M1.595 2.19h5.357v5.358"/>
|
|
||||||
<path d="M6.682 3.021A12.49 12.49 0 0 0 1 13.5C1 20.404 6.596 26 13.5 26S26 20.404 26 13.5 20.404 1 13.5 1"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 359 B |
@@ -1,7 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="27" viewBox="0 0 22 27">
|
|
||||||
<g fill="none" fill-rule="evenodd" stroke="#FFF" stroke-linecap="round" stroke-width="1.071">
|
|
||||||
<path d="M20.412 7.818h-6.47v-6.25"/>
|
|
||||||
<path d="M21 26H1V1h12.941L21 7.818z"/>
|
|
||||||
<path d="M7.154 15.404l3.333-3.333 3.334 3.334M10.487 20.286v-7.548"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 371 B |
@@ -1,6 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
|
|
||||||
<g fill="none" fill-rule="evenodd" stroke="#FFF" stroke-width="1.636" opacity="1">
|
|
||||||
<rect width="16.364" height="16.364" x=".818" y=".818" rx="1.636"/>
|
|
||||||
<path fill="#FFF" d="M6.182 17.182V.818H1.64a.822.822 0 0 0-.822.822v14.72c0 .454.368.822.822.822h4.542z"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 379 B |
@@ -1,6 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
|
|
||||||
<g fill="none" fill-rule="evenodd" opacity="1">
|
|
||||||
<path fill="none" d="M-11-11h36v36h-36z" opacity="1"/>
|
|
||||||
<path stroke="#000" stroke-linecap="round" stroke-width="1.556" d="M13 13L1.686 1.686M1 7.222V1h6.222"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 328 B |
@@ -1,4 +1,4 @@
|
|||||||
; Monero Boron Butterfly GUI Wallet Installer for Windows
|
; Monero Carbon Chamaeleon GUI Wallet Installer for Windows
|
||||||
; Copyright (c) 2017-2019, The Monero Project
|
; Copyright (c) 2017-2019, The Monero Project
|
||||||
; See LICENSE
|
; See LICENSE
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ AppName=Monero GUI Wallet
|
|||||||
; Thus it's important to keep this stable over releases
|
; Thus it's important to keep this stable over releases
|
||||||
; With a different "AppName" InnoSetup would treat a mere update as a completely new application and thus mess up
|
; With a different "AppName" InnoSetup would treat a mere update as a completely new application and thus mess up
|
||||||
|
|
||||||
AppVersion=0.14.1.2
|
AppVersion=0.15.0.0
|
||||||
DefaultDirName={pf}\Monero GUI Wallet
|
DefaultDirName={pf}\Monero GUI Wallet
|
||||||
DefaultGroupName=Monero GUI Wallet
|
DefaultGroupName=Monero GUI Wallet
|
||||||
UninstallDisplayIcon={app}\monero-wallet-gui.exe
|
UninstallDisplayIcon={app}\monero-wallet-gui.exe
|
||||||
@@ -58,7 +58,7 @@ Name: "en"; MessagesFile: "compiler:Default.isl"
|
|||||||
; .exe/.dll file possibly with version info).
|
; .exe/.dll file possibly with version info).
|
||||||
;
|
;
|
||||||
; This is far more robust than relying on version info or on file dates (flag "comparetimestamp").
|
; This is far more robust than relying on version info or on file dates (flag "comparetimestamp").
|
||||||
; As of version 0.14.1.0, the Monero .exe files do not carry version info anyway in their .exe headers.
|
; As of version 0.15.0.0, the Monero .exe files do not carry version info anyway in their .exe headers.
|
||||||
; The only small drawback seems to be somewhat longer update times because each and every file is
|
; The only small drawback seems to be somewhat longer update times because each and every file is
|
||||||
; copied again, even if already present with correct file date and identical content.
|
; copied again, even if already present with correct file date and identical content.
|
||||||
;
|
;
|
||||||
@@ -197,7 +197,7 @@ begin
|
|||||||
// Additional wizard page for entering a special blockchain location
|
// Additional wizard page for entering a special blockchain location
|
||||||
blockChainDefaultDir := ExpandConstant('{commonappdata}\bitmonero');
|
blockChainDefaultDir := ExpandConstant('{commonappdata}\bitmonero');
|
||||||
s := 'The default folder to store the Monero blockchain is ' + blockChainDefaultDir;
|
s := 'The default folder to store the Monero blockchain is ' + blockChainDefaultDir;
|
||||||
s := s + '. As this will need more than 70 GB of free space, you may want to use a folder on a different drive.';
|
s := s + '. As this will need more than 74 GB of free space, you may want to use a folder on a different drive.';
|
||||||
s := s + ' If yes, specify that folder here.';
|
s := s + ' If yes, specify that folder here.';
|
||||||
|
|
||||||
BlockChainDirPage := CreateInputDirPage(wpSelectDir,
|
BlockChainDirPage := CreateInputDirPage(wpSelectDir,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Copyright (c) 2017-2019, The Monero Project
|
|||||||
|
|
||||||
This is a *Inno Setup* script `Monero.iss` plus some related files
|
This is a *Inno Setup* script `Monero.iss` plus some related files
|
||||||
that allows you to build a standalone Windows installer (.exe) for
|
that allows you to build a standalone Windows installer (.exe) for
|
||||||
the GUI wallet that comes with the Boron Butterfly release of Monero.
|
the GUI wallet that comes with the Carbon Chamaeleon release of Monero.
|
||||||
|
|
||||||
This turns the GUI wallet into a more or less standard Windows program,
|
This turns the GUI wallet into a more or less standard Windows program,
|
||||||
by default installed into a subdirectory of `C:\Program Files`, a
|
by default installed into a subdirectory of `C:\Program Files`, a
|
||||||
@@ -18,7 +18,7 @@ Monero.
|
|||||||
As the setup script in file [Monero.iss](Monero.iss) has to list many
|
As the setup script in file [Monero.iss](Monero.iss) has to list many
|
||||||
files and directories of the GUI wallet package to install by name,
|
files and directories of the GUI wallet package to install by name,
|
||||||
this version of the script only works with exactly the GUI wallet
|
this version of the script only works with exactly the GUI wallet
|
||||||
for Monero release *Boron Butterfly* that you find on
|
for Monero release *Carbon Chamaeleon* that you find on
|
||||||
[the official download page](https://getmonero.org/downloads/).
|
[the official download page](https://getmonero.org/downloads/).
|
||||||
|
|
||||||
It should however be easy to modify the script for future
|
It should however be easy to modify the script for future
|
||||||
@@ -32,15 +32,15 @@ See [LICENSE](LICENSE).
|
|||||||
|
|
||||||
You can only build on Windows, and the result is always a
|
You can only build on Windows, and the result is always a
|
||||||
Windows .exe file that can act as a standalone installer for the
|
Windows .exe file that can act as a standalone installer for the
|
||||||
Boron Butterfly GUI wallet.
|
Carbon Chamaeleon GUI wallet.
|
||||||
|
|
||||||
Note that the installer build process is now reproducible / deterministic. For details check the file [Deterministic.md](Deterministic.md).
|
Note that the installer build process is now reproducible / deterministic. For details check the file [Deterministic.md](Deterministic.md).
|
||||||
|
|
||||||
The build steps in detail:
|
The build steps in detail:
|
||||||
|
|
||||||
1. Install *Inno Setup*. You can get it from [here](http://www.jrsoftware.org/isdl.php)
|
1. Install *Inno Setup*. You can get it from [here](http://www.jrsoftware.org/isdl.php)
|
||||||
2. Get the Inno Setup script plus related files by cloning the whole [monero-gui GitHub repository](https://github.com/monero-project/monero-gui); you will only need the files in the installer directory `installers\windows` however. Depending on development state, additionally you may have to checkout a specific branch, like `release-v0.14`.
|
2. Get the Inno Setup script plus related files by cloning the whole [monero-gui GitHub repository](https://github.com/monero-project/monero-gui); you will only need the files in the installer directory `installers\windows` however. Depending on development state, additionally instead of simply using `master` you may have to checkout a specific branch, like `release-v0.15`.
|
||||||
3. The setup script is written to take the GUI wallet files from a subdirectory named `bin`; so create `installers\windows\bin`, get the zip file of the GUI wallet from [here](https://getmonero.org/downloads/), unpack it somewhere, and copy all the files and subdirectories in the single subdirectory there (currently named `monero-gui-0.14.1.2`) to this `bin` subdirectory
|
3. The setup script is written to take the GUI wallet files from a subdirectory named `bin`; so create `installers\windows\bin`, get the zip file of the GUI wallet from [here](https://getmonero.org/downloads/), unpack it somewhere, and copy all the files and subdirectories in the single subdirectory there (currently named `monero-gui-0.15.0.0`) to this `bin` subdirectory
|
||||||
4. Start Inno Setup, load `Monero.iss` and compile it
|
4. Start Inno Setup, load `Monero.iss` and compile it
|
||||||
5. The result i.e. the finished installer will be the file `mysetup.exe` in the `installers\windows\Output` subdirectory
|
5. The result i.e. the finished installer will be the file `mysetup.exe` in the `installers\windows\Output` subdirectory
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Monero Boron Butterfly GUI Wallet</title>
|
<title>Monero Carbon Chamaeleon GUI Wallet</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="font-family: Arial, Helvetica, sans-serif">
|
<body style="font-family: Arial, Helvetica, sans-serif">
|
||||||
<h1>Monero Boron Butterfly GUI Wallet</h1>
|
<h1>Monero Carbon Chamaeleon GUI Wallet</h1>
|
||||||
|
|
||||||
<p>Copyright (c) 2014-2019, The Monero Project<br>
|
<p>Copyright (c) 2014-2019, The Monero Project<br>
|
||||||
Date: July 20, 2019</p>
|
Date: November 1, 2019</p>
|
||||||
|
|
||||||
<h2>Preface</h2>
|
<h2>Preface</h2>
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<h2>Content of the Package</h2>
|
<h2>Content of the Package</h2>
|
||||||
|
|
||||||
<p>You just installed the <i>Monero GUI wallet</i> for Windows, release Boron Butterfly, version 0.14.1.2.
|
<p>You just installed the <i>Monero GUI wallet</i> for Windows, release Carbon Chamaeleon, version 0.15.0.0.
|
||||||
The wallet enables you to send and receive Moneroj in a secure and very private way.
|
The wallet enables you to send and receive Moneroj in a secure and very private way.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
provides the most security and privacy possible for you.</p>
|
provides the most security and privacy possible for you.</p>
|
||||||
|
|
||||||
<p>However if your Internet access makes it difficult to run a full node, or if you have simply no room to store
|
<p>However if your Internet access makes it difficult to run a full node, or if you have simply no room to store
|
||||||
the blockchain locally (somewhat over 70 GB in July 2019, and of course growing), you can compromise and try to connect
|
the blockchain locally (somewhat over 74 GB in November 2019, and of course growing), you can compromise and try to connect
|
||||||
to a remote node. One way of finding such a node is checking
|
to a remote node. One way of finding such a node is checking
|
||||||
<a href="https://moneroworld.com/#nodes">this page</a>.
|
<a href="https://moneroworld.com/#nodes">this page</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 440 KiB After Width: | Height: | Size: 440 KiB |
23
js/Utils.js
@@ -46,7 +46,6 @@ function showSeedPage() {
|
|||||||
leftPanel.selectItem(middlePanel.state);
|
leftPanel.selectItem(middlePanel.state);
|
||||||
}
|
}
|
||||||
passwordDialog.open();
|
passwordDialog.open();
|
||||||
if(isMobile) hideMenu();
|
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,16 +93,6 @@ function netTypeToString(){
|
|||||||
return nettype == 1 ? qsTr("Testnet") : nettype == 2 ? qsTr("Stagenet") : qsTr("Mainnet");
|
return nettype == 1 ? qsTr("Testnet") : nettype == 2 ? qsTr("Stagenet") : qsTr("Mainnet");
|
||||||
}
|
}
|
||||||
|
|
||||||
function randomChoice(arr){
|
|
||||||
return arr[Math.floor(Math.random() * arr.length)];
|
|
||||||
}
|
|
||||||
|
|
||||||
function filterNodes(nodes, port) {
|
|
||||||
if(typeof data === 'number')
|
|
||||||
port = port.toString();
|
|
||||||
return nodes.filter(function(_){return _.indexOf(port) !== -1});
|
|
||||||
}
|
|
||||||
|
|
||||||
function epoch(){
|
function epoch(){
|
||||||
return Math.floor((new Date).getTime()/1000);
|
return Math.floor((new Date).getTime()/1000);
|
||||||
}
|
}
|
||||||
@@ -144,15 +133,3 @@ function capitalize(s){
|
|||||||
if (typeof s !== 'string') return ''
|
if (typeof s !== 'string') return ''
|
||||||
return s.charAt(0).toUpperCase() + s.slice(1)
|
return s.charAt(0).toUpperCase() + s.slice(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatMoney(n, c, d, t) {
|
|
||||||
// https://stackoverflow.com/a/149099
|
|
||||||
var c = isNaN(c = Math.abs(c)) ? 2 : c,
|
|
||||||
d = d == undefined ? "." : d,
|
|
||||||
t = t == undefined ? "," : t,
|
|
||||||
s = n < 0 ? "-" : "",
|
|
||||||
i = String(parseInt(n = Math.abs(Number(n) || 0).toFixed(c))),
|
|
||||||
j = (j = i.length) > 3 ? j % 3 : 0;
|
|
||||||
|
|
||||||
return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -39,10 +39,8 @@ function switchPage(next) {
|
|||||||
console.log("switchpage: currentPage: ", currentPage);
|
console.log("switchpage: currentPage: ", currentPage);
|
||||||
|
|
||||||
// Update prev/next button positions for mobile/desktop
|
// Update prev/next button positions for mobile/desktop
|
||||||
prevButton.anchors.verticalCenter = (!isMobile) ? wizard.verticalCenter : undefined
|
prevButton.anchors.verticalCenter = wizard.verticalCenter
|
||||||
prevButton.anchors.bottom = (isMobile) ? wizard.bottom : undefined
|
nextButton.anchors.verticalCenter = wizard.verticalCenter
|
||||||
nextButton.anchors.verticalCenter = (!isMobile) ? wizard.verticalCenter : undefined
|
|
||||||
nextButton.anchors.bottom = (isMobile) ? wizard.bottom : undefined
|
|
||||||
|
|
||||||
if (currentPage > 0 || currentPage < pages.length - 1) {
|
if (currentPage > 0 || currentPage < pages.length - 1) {
|
||||||
pages[currentPage].opacity = 0
|
pages[currentPage].opacity = 0
|
||||||
|
|||||||
5
main.cpp
@@ -125,6 +125,9 @@ int main(int argc, char *argv[])
|
|||||||
// qDebug() << "High DPI auto scaling - enabled";
|
// qDebug() << "High DPI auto scaling - enabled";
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
// Turn off colors in monerod log output.
|
||||||
|
qputenv("TERM", "goaway");
|
||||||
|
|
||||||
MainApp app(argc, argv);
|
MainApp app(argc, argv);
|
||||||
|
|
||||||
app.setApplicationName("monero-core");
|
app.setApplicationName("monero-core");
|
||||||
@@ -192,7 +195,9 @@ int main(int argc, char *argv[])
|
|||||||
qWarning().noquote() << "app startd" << "(log: " + logPath + ")";
|
qWarning().noquote() << "app startd" << "(log: " + logPath + ")";
|
||||||
|
|
||||||
// Desktop entry
|
// Desktop entry
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
registerXdgMime(app);
|
registerXdgMime(app);
|
||||||
|
#endif
|
||||||
|
|
||||||
IPC *ipc = new IPC(&app);
|
IPC *ipc = new IPC(&app);
|
||||||
QStringList posArgs = parser.positionalArguments();
|
QStringList posArgs = parser.positionalArguments();
|
||||||
|
|||||||
415
main.qml
@@ -69,7 +69,6 @@ ApplicationWindow {
|
|||||||
property bool foundNewBlock: false
|
property bool foundNewBlock: false
|
||||||
property bool qrScannerEnabled: (typeof builtWithScanner != "undefined") && builtWithScanner
|
property bool qrScannerEnabled: (typeof builtWithScanner != "undefined") && builtWithScanner
|
||||||
property int blocksToSync: 1
|
property int blocksToSync: 1
|
||||||
property var isMobile: (appWindow.width > 700 && !isAndroid) ? false : true
|
|
||||||
property bool isMining: false
|
property bool isMining: false
|
||||||
property int walletMode: persistentSettings.walletMode
|
property int walletMode: persistentSettings.walletMode
|
||||||
property var cameraUi
|
property var cameraUi
|
||||||
@@ -106,19 +105,6 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property string remoteNodeService: {
|
|
||||||
// support user-defined remote node aggregators
|
|
||||||
if(persistentSettings.remoteNodeService){
|
|
||||||
var service = persistentSettings.remoteNodeService;
|
|
||||||
if(service.charAt(service.length-1) !== "/")
|
|
||||||
service += "/";
|
|
||||||
return service;
|
|
||||||
}
|
|
||||||
|
|
||||||
// monero-gui workgroup maintained
|
|
||||||
return "https://autonode.xmr.pm/"
|
|
||||||
}
|
|
||||||
|
|
||||||
// true if wallet ever synchronized
|
// true if wallet ever synchronized
|
||||||
property bool walletInitialized : false
|
property bool walletInitialized : false
|
||||||
|
|
||||||
@@ -239,7 +225,6 @@ ApplicationWindow {
|
|||||||
if (typeof currentWallet !== "undefined" && currentWallet !== null) {
|
if (typeof currentWallet !== "undefined" && currentWallet !== null) {
|
||||||
console.log("Daemon change - closing " + currentWallet)
|
console.log("Daemon change - closing " + currentWallet)
|
||||||
closeWallet();
|
closeWallet();
|
||||||
currentWallet = undefined
|
|
||||||
} else if (!walletInitialized) {
|
} else if (!walletInitialized) {
|
||||||
// set page to transfer if not changing daemon
|
// set page to transfer if not changing daemon
|
||||||
middlePanel.state = "Transfer";
|
middlePanel.state = "Transfer";
|
||||||
@@ -286,25 +271,31 @@ ApplicationWindow {
|
|||||||
function closeWallet(callback) {
|
function closeWallet(callback) {
|
||||||
|
|
||||||
// Disconnect all listeners
|
// Disconnect all listeners
|
||||||
if (typeof currentWallet !== "undefined" && currentWallet !== null) {
|
if (typeof currentWallet === "undefined" || currentWallet === null) {
|
||||||
currentWallet.heightRefreshed.disconnect(onHeightRefreshed);
|
if (callback) {
|
||||||
currentWallet.refreshed.disconnect(onWalletRefresh)
|
callback();
|
||||||
currentWallet.updated.disconnect(onWalletUpdate)
|
}
|
||||||
currentWallet.newBlock.disconnect(onWalletNewBlock)
|
return;
|
||||||
currentWallet.moneySpent.disconnect(onWalletMoneySent)
|
|
||||||
currentWallet.moneyReceived.disconnect(onWalletMoneyReceived)
|
|
||||||
currentWallet.unconfirmedMoneyReceived.disconnect(onWalletUnconfirmedMoneyReceived)
|
|
||||||
currentWallet.transactionCreated.disconnect(onTransactionCreated)
|
|
||||||
currentWallet.connectionStatusChanged.disconnect(onWalletConnectionStatusChanged)
|
|
||||||
currentWallet.deviceButtonRequest.disconnect(onDeviceButtonRequest);
|
|
||||||
currentWallet.deviceButtonPressed.disconnect(onDeviceButtonPressed);
|
|
||||||
currentWallet.transactionCommitted.disconnect(onTransactionCommitted);
|
|
||||||
middlePanel.paymentClicked.disconnect(handlePayment);
|
|
||||||
middlePanel.sweepUnmixableClicked.disconnect(handleSweepUnmixable);
|
|
||||||
middlePanel.getProofClicked.disconnect(handleGetProof);
|
|
||||||
middlePanel.checkProofClicked.disconnect(handleCheckProof);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
currentWallet.heightRefreshed.disconnect(onHeightRefreshed);
|
||||||
|
currentWallet.refreshed.disconnect(onWalletRefresh)
|
||||||
|
currentWallet.updated.disconnect(onWalletUpdate)
|
||||||
|
currentWallet.newBlock.disconnect(onWalletNewBlock)
|
||||||
|
currentWallet.moneySpent.disconnect(onWalletMoneySent)
|
||||||
|
currentWallet.moneyReceived.disconnect(onWalletMoneyReceived)
|
||||||
|
currentWallet.unconfirmedMoneyReceived.disconnect(onWalletUnconfirmedMoneyReceived)
|
||||||
|
currentWallet.transactionCreated.disconnect(onTransactionCreated)
|
||||||
|
currentWallet.connectionStatusChanged.disconnect(onWalletConnectionStatusChanged)
|
||||||
|
currentWallet.deviceButtonRequest.disconnect(onDeviceButtonRequest);
|
||||||
|
currentWallet.deviceButtonPressed.disconnect(onDeviceButtonPressed);
|
||||||
|
currentWallet.transactionCommitted.disconnect(onTransactionCommitted);
|
||||||
|
middlePanel.paymentClicked.disconnect(handlePayment);
|
||||||
|
middlePanel.sweepUnmixableClicked.disconnect(handleSweepUnmixable);
|
||||||
|
middlePanel.getProofClicked.disconnect(handleGetProof);
|
||||||
|
middlePanel.checkProofClicked.disconnect(handleCheckProof);
|
||||||
|
|
||||||
|
appWindow.walletName = "";
|
||||||
currentWallet = undefined;
|
currentWallet = undefined;
|
||||||
|
|
||||||
appWindow.showProcessingSplash(qsTr("Closing wallet..."));
|
appWindow.showProcessingSplash(qsTr("Closing wallet..."));
|
||||||
@@ -344,7 +335,6 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
walletName = usefulName(wallet.path)
|
walletName = usefulName(wallet.path)
|
||||||
updateSyncing(false)
|
|
||||||
|
|
||||||
viewOnly = currentWallet.viewOnly;
|
viewOnly = currentWallet.viewOnly;
|
||||||
|
|
||||||
@@ -385,11 +375,21 @@ ApplicationWindow {
|
|||||||
currentDaemonAddress = localDaemonAddress
|
currentDaemonAddress = localDaemonAddress
|
||||||
|
|
||||||
console.log("initializing with daemon address: ", currentDaemonAddress)
|
console.log("initializing with daemon address: ", currentDaemonAddress)
|
||||||
currentWallet.initAsync(currentDaemonAddress, 0, persistentSettings.is_recovering, persistentSettings.is_recovering_from_device, persistentSettings.restore_height);
|
currentWallet.initAsync(
|
||||||
|
currentDaemonAddress,
|
||||||
|
isTrustedDaemon(),
|
||||||
|
0,
|
||||||
|
persistentSettings.is_recovering,
|
||||||
|
persistentSettings.is_recovering_from_device,
|
||||||
|
persistentSettings.restore_height);
|
||||||
// save wallet keys in case wallet settings have been changed in the init
|
// save wallet keys in case wallet settings have been changed in the init
|
||||||
currentWallet.setPassword(walletPassword);
|
currentWallet.setPassword(walletPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isTrustedDaemon() {
|
||||||
|
return !persistentSettings.useRemoteNode || persistentSettings.is_trusted_daemon;
|
||||||
|
}
|
||||||
|
|
||||||
function walletPath() {
|
function walletPath() {
|
||||||
var wallet_path = persistentSettings.wallet_path
|
var wallet_path = persistentSettings.wallet_path
|
||||||
return wallet_path;
|
return wallet_path;
|
||||||
@@ -406,24 +406,22 @@ ApplicationWindow {
|
|||||||
if (!currentWallet)
|
if (!currentWallet)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var balance_unlocked = qsTr("HIDDEN");
|
var balance = "?.??";
|
||||||
var balance = qsTr("HIDDEN");
|
var balanceU = "?.??";
|
||||||
if(!hideBalanceForced && !persistentSettings.hideBalance){
|
if(!hideBalanceForced && !persistentSettings.hideBalance){
|
||||||
balance_unlocked = walletManager.displayAmount(currentWallet.unlockedBalance(currentWallet.currentSubaddressAccount));
|
|
||||||
balance = walletManager.displayAmount(currentWallet.balance(currentWallet.currentSubaddressAccount));
|
balance = walletManager.displayAmount(currentWallet.balance(currentWallet.currentSubaddressAccount));
|
||||||
|
balanceU = walletManager.displayAmount(currentWallet.unlockedBalance(currentWallet.currentSubaddressAccount));
|
||||||
}
|
}
|
||||||
|
|
||||||
middlePanel.unlockedBalanceText = balance_unlocked;
|
|
||||||
leftPanel.unlockedBalanceText = balance_unlocked;
|
|
||||||
middlePanel.balanceText = balance;
|
|
||||||
leftPanel.balanceText = balance;
|
|
||||||
|
|
||||||
if (persistentSettings.fiatPriceEnabled) {
|
if (persistentSettings.fiatPriceEnabled) {
|
||||||
appWindow.fiatApiUpdateBalance(balance, balance_unlocked);
|
appWindow.fiatApiUpdateBalance(balance);
|
||||||
}
|
}
|
||||||
|
|
||||||
var accountLabel = currentWallet.getSubaddressLabel(currentWallet.currentSubaddressAccount, 0);
|
leftPanel.minutesToUnlock = (balance !== balanceU) ? currentWallet.history.minutesToUnlock : "";
|
||||||
leftPanel.balanceLabelText = qsTr("Balance (#%1%2)").arg(currentWallet.currentSubaddressAccount).arg(accountLabel === "" ? "" : (" – " + accountLabel));
|
leftPanel.currentAccountIndex = currentWallet.currentSubaddressAccount;
|
||||||
|
leftPanel.currentAccountLabel = currentWallet.getSubaddressLabel(currentWallet.currentSubaddressAccount, 0);
|
||||||
|
leftPanel.balanceString = balance
|
||||||
|
leftPanel.balanceUnlockedString = balanceU
|
||||||
}
|
}
|
||||||
|
|
||||||
function onUriHandler(uri){
|
function onUriHandler(uri){
|
||||||
@@ -462,10 +460,6 @@ ApplicationWindow {
|
|||||||
// Raise window
|
// Raise window
|
||||||
appWindow.raise();
|
appWindow.raise();
|
||||||
appWindow.show();
|
appWindow.show();
|
||||||
|
|
||||||
// @TODO: remove after paymentID deprecation
|
|
||||||
if(params.hasOwnProperty("tx_payment_id"))
|
|
||||||
persistentSettings.showPid = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -475,15 +469,19 @@ ApplicationWindow {
|
|||||||
leftPanel.networkStatus.connected = status
|
leftPanel.networkStatus.connected = status
|
||||||
|
|
||||||
// update local daemon status.
|
// update local daemon status.
|
||||||
if(!isMobile && walletManager.isDaemonLocal(currentDaemonAddress))
|
if(walletManager.isDaemonLocal(currentDaemonAddress))
|
||||||
daemonRunning = status;
|
daemonRunning = status;
|
||||||
|
|
||||||
// Update fee multiplier dropdown on transfer page
|
// Update fee multiplier dropdown on transfer page
|
||||||
middlePanel.transferView.updatePriorityDropdown();
|
middlePanel.transferView.updatePriorityDropdown();
|
||||||
|
|
||||||
// If wallet isnt connected, advanced wallet mode and no daemon is running - Ask
|
// If wallet isnt connected, advanced wallet mode and no daemon is running - Ask
|
||||||
if(!isMobile && appWindow.walletMode >= 2 && walletManager.isDaemonLocal(currentDaemonAddress) && !walletInitialized && status === Wallet.ConnectionStatus_Disconnected && !daemonManager.running(persistentSettings.nettype)){
|
if (appWindow.walletMode >= 2 && walletManager.isDaemonLocal(currentDaemonAddress) && !walletInitialized && status === Wallet.ConnectionStatus_Disconnected) {
|
||||||
daemonManagerDialog.open();
|
daemonManager.runningAsync(persistentSettings.nettype, function(running) {
|
||||||
|
if (!running) {
|
||||||
|
daemonManagerDialog.open();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// initialize transaction history once wallet is initialized first time;
|
// initialize transaction history once wallet is initialized first time;
|
||||||
if (!walletInitialized) {
|
if (!walletInitialized) {
|
||||||
@@ -592,8 +590,6 @@ ApplicationWindow {
|
|||||||
foundNewBlock = false;
|
foundNewBlock = false;
|
||||||
console.log("New block found - updating history")
|
console.log("New block found - updating history")
|
||||||
currentWallet.history.refresh(currentWallet.currentSubaddressAccount)
|
currentWallet.history.refresh(currentWallet.currentSubaddressAccount)
|
||||||
var timeToUnlock = currentWallet.history.minutesToUnlock
|
|
||||||
leftPanel.minutesToUnlockTxt = (timeToUnlock > 0)? (timeToUnlock == 20)? qsTr("Unlocked balance (waiting for block)") : qsTr("Unlocked balance (~%1 min)").arg(timeToUnlock) : qsTr("Unlocked balance");
|
|
||||||
|
|
||||||
if(middlePanel.state == "History")
|
if(middlePanel.state == "History")
|
||||||
middlePanel.historyView.update();
|
middlePanel.historyView.update();
|
||||||
@@ -604,7 +600,7 @@ ApplicationWindow {
|
|||||||
console.log("connecting remote node");
|
console.log("connecting remote node");
|
||||||
persistentSettings.useRemoteNode = true;
|
persistentSettings.useRemoteNode = true;
|
||||||
currentDaemonAddress = persistentSettings.remoteNodeAddress;
|
currentDaemonAddress = persistentSettings.remoteNodeAddress;
|
||||||
currentWallet.initAsync(currentDaemonAddress);
|
currentWallet.initAsync(currentDaemonAddress, isTrustedDaemon());
|
||||||
walletManager.setDaemonAddressAsync(currentDaemonAddress);
|
walletManager.setDaemonAddressAsync(currentDaemonAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -615,7 +611,7 @@ ApplicationWindow {
|
|||||||
console.log("disconnecting remote node");
|
console.log("disconnecting remote node");
|
||||||
persistentSettings.useRemoteNode = false;
|
persistentSettings.useRemoteNode = false;
|
||||||
currentDaemonAddress = localDaemonAddress
|
currentDaemonAddress = localDaemonAddress
|
||||||
currentWallet.initAsync(currentDaemonAddress);
|
currentWallet.initAsync(currentDaemonAddress, isTrustedDaemon());
|
||||||
walletManager.setDaemonAddressAsync(currentDaemonAddress);
|
walletManager.setDaemonAddressAsync(currentDaemonAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -637,7 +633,7 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update wallet sync progress
|
// Update wallet sync progress
|
||||||
updateSyncing((currentWallet.connected() !== Wallet.ConnectionStatus_Disconnected) && !daemonSynced)
|
leftPanel.isSyncing = (currentWallet.connected() !== Wallet.ConnectionStatus_Disconnected) && !daemonSynced
|
||||||
// Update transfer page status
|
// Update transfer page status
|
||||||
middlePanel.updateStatus();
|
middlePanel.updateStatus();
|
||||||
|
|
||||||
@@ -687,8 +683,8 @@ ApplicationWindow {
|
|||||||
simpleModeConnectionTimer.stop();
|
simpleModeConnectionTimer.stop();
|
||||||
|
|
||||||
appWindow.showProcessingSplash(qsTr("Waiting for daemon to start..."))
|
appWindow.showProcessingSplash(qsTr("Waiting for daemon to start..."))
|
||||||
daemonManager.start(flags, persistentSettings.nettype, persistentSettings.blockchainDataDir, persistentSettings.bootstrapNodeAddress);
|
const noSync = appWindow.walletMode === 0;
|
||||||
persistentSettings.daemonFlags = flags
|
daemonManager.start(flags, persistentSettings.nettype, persistentSettings.blockchainDataDir, persistentSettings.bootstrapNodeAddress, noSync);
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopDaemon(){
|
function stopDaemon(){
|
||||||
@@ -704,6 +700,7 @@ ApplicationWindow {
|
|||||||
// resume refresh
|
// resume refresh
|
||||||
currentWallet.startRefresh();
|
currentWallet.startRefresh();
|
||||||
// resume simplemode connection timer
|
// resume simplemode connection timer
|
||||||
|
appWindow.disconnectedEpoch = Utils.epoch();
|
||||||
simpleModeConnectionTimer.start();
|
simpleModeConnectionTimer.start();
|
||||||
}
|
}
|
||||||
function onDaemonStopped(){
|
function onDaemonStopped(){
|
||||||
@@ -841,7 +838,9 @@ ApplicationWindow {
|
|||||||
", priority: ", priority,
|
", priority: ", priority,
|
||||||
", description: ", description);
|
", description: ", description);
|
||||||
|
|
||||||
showProcessingSplash("Creating transaction");
|
var splashMsg = qsTr("Creating transaction...");
|
||||||
|
splashMsg += appWindow.currentWallet.isLedger() ? qsTr("\n\nPlease check your hardware wallet –\nyour input may be required.") : "";
|
||||||
|
showProcessingSplash(splashMsg);
|
||||||
|
|
||||||
transactionDescription = description;
|
transactionDescription = description;
|
||||||
|
|
||||||
@@ -1079,12 +1078,6 @@ ApplicationWindow {
|
|||||||
informationPopup.open()
|
informationPopup.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateSyncing(syncing) {
|
|
||||||
var text = (syncing ? qsTr("Balance (syncing)") : qsTr("Balance")) + translationManager.emptyString
|
|
||||||
leftPanel.balanceLabelText = text
|
|
||||||
middlePanel.balanceLabelText = text
|
|
||||||
}
|
|
||||||
|
|
||||||
// blocks UI if wallet can't be opened or no connection to the daemon
|
// blocks UI if wallet can't be opened or no connection to the daemon
|
||||||
function enableUI(enable) {
|
function enableUI(enable) {
|
||||||
middlePanel.enabled = enable;
|
middlePanel.enabled = enable;
|
||||||
@@ -1119,32 +1112,19 @@ ApplicationWindow {
|
|||||||
|
|
||||||
// close wallet and show wizard
|
// close wallet and show wizard
|
||||||
function showWizard(){
|
function showWizard(){
|
||||||
clearMoneroCardLabelText();
|
|
||||||
walletInitialized = false;
|
walletInitialized = false;
|
||||||
closeWallet(function() {
|
closeWallet(function() {
|
||||||
currentWallet = undefined;
|
|
||||||
wizard.restart();
|
wizard.restart();
|
||||||
wizard.wizardState = "wizardHome";
|
wizard.wizardState = "wizardHome";
|
||||||
rootItem.state = "wizard"
|
rootItem.state = "wizard"
|
||||||
// reset balance
|
// reset balance
|
||||||
leftPanel.balanceText = leftPanel.unlockedBalanceText = walletManager.displayAmount(0);
|
clearMoneroCardLabelText();
|
||||||
fiatApiUpdateBalance(0, 0);
|
|
||||||
// disable timers
|
// disable timers
|
||||||
userInActivityTimer.running = false;
|
userInActivityTimer.running = false;
|
||||||
simpleModeConnectionTimer.running = false;
|
simpleModeConnectionTimer.running = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideMenu() {
|
|
||||||
goToBasicAnimation.start();
|
|
||||||
console.log(appWindow.width)
|
|
||||||
}
|
|
||||||
|
|
||||||
function showMenu() {
|
|
||||||
goToProAnimation.start();
|
|
||||||
console.log(appWindow.width)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
objectName: "appWindow"
|
objectName: "appWindow"
|
||||||
visible: true
|
visible: true
|
||||||
@@ -1261,22 +1241,19 @@ ApplicationWindow {
|
|||||||
Prices.getJSON(url);
|
Prices.getJSON(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
function fiatApiUpdateBalance(balance, unlocked_balance){
|
function fiatApiUpdateBalance(balance){
|
||||||
// update balance card
|
// update balance card
|
||||||
var ticker = persistentSettings.fiatPriceCurrency === "xmrusd" ? appWindow.fiatPriceXMRUSD : appWindow.fiatPriceXMREUR;
|
var ticker = persistentSettings.fiatPriceCurrency === "xmrusd" ? appWindow.fiatPriceXMRUSD : appWindow.fiatPriceXMREUR;
|
||||||
var symbol = persistentSettings.fiatPriceCurrency === "xmrusd" ? "$" : "€"
|
|
||||||
if(ticker <= 0){
|
if(ticker <= 0){
|
||||||
console.log(fiatApiError("Could not update balance card; invalid ticker value"));
|
console.log(fiatApiError("Could not update balance card; invalid ticker value"));
|
||||||
leftPanel.unlockedBalanceTextFiat = "N/A";
|
leftPanel.balanceFiatString = "?.??";
|
||||||
leftPanel.balanceTextFiat = "N/A";
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var bFiat = "?.??"
|
||||||
var uFiat = Utils.formatMoney(unlocked_balance * ticker);
|
if (!hideBalanceForced && !persistentSettings.hideBalance) {
|
||||||
var bFiat = Utils.formatMoney(balance * ticker);
|
bFiat = (balance * ticker).toFixed(2);
|
||||||
|
}
|
||||||
leftPanel.unlockedBalanceTextFiat = symbol + uFiat;
|
leftPanel.balanceFiatString = bFiat;
|
||||||
leftPanel.balanceTextFiat = symbol + bFiat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fiatTimerStart(){
|
function fiatTimerStart(){
|
||||||
@@ -1294,6 +1271,9 @@ ApplicationWindow {
|
|||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
x = (Screen.width - width) / 2
|
x = (Screen.width - width) / 2
|
||||||
y = (Screen.height - maxWindowHeight) / 2
|
y = (Screen.height - maxWindowHeight) / 2
|
||||||
|
|
||||||
|
applyWalletMode(persistentSettings.walletMode);
|
||||||
|
|
||||||
//
|
//
|
||||||
walletManager.walletOpened.connect(onWalletOpened);
|
walletManager.walletOpened.connect(onWalletOpened);
|
||||||
walletManager.deviceButtonRequest.connect(onDeviceButtonRequest);
|
walletManager.deviceButtonRequest.connect(onDeviceButtonRequest);
|
||||||
@@ -1383,7 +1363,6 @@ ApplicationWindow {
|
|||||||
property bool useRemoteNode: false
|
property bool useRemoteNode: false
|
||||||
property string remoteNodeAddress: ""
|
property string remoteNodeAddress: ""
|
||||||
property string bootstrapNodeAddress: ""
|
property string bootstrapNodeAddress: ""
|
||||||
property string remoteNodeRegion: ""
|
|
||||||
property bool segregatePreForkOutputs: true
|
property bool segregatePreForkOutputs: true
|
||||||
property bool keyReuseMitigation2: true
|
property bool keyReuseMitigation2: true
|
||||||
property int segregationHeight: 0
|
property int segregationHeight: 0
|
||||||
@@ -1391,9 +1370,7 @@ ApplicationWindow {
|
|||||||
property bool hideBalance: false
|
property bool hideBalance: false
|
||||||
property bool lockOnUserInActivity: true
|
property bool lockOnUserInActivity: true
|
||||||
property int walletMode: 2
|
property int walletMode: 2
|
||||||
property string remoteNodeService: ""
|
|
||||||
property int lockOnUserInActivityInterval: 10 // minutes
|
property int lockOnUserInActivityInterval: 10 // minutes
|
||||||
property bool showPid: false
|
|
||||||
property bool blackTheme: true
|
property bool blackTheme: true
|
||||||
|
|
||||||
property bool fiatPriceEnabled: false
|
property bool fiatPriceEnabled: false
|
||||||
@@ -1592,153 +1569,89 @@ ApplicationWindow {
|
|||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "wizard"
|
name: "wizard"
|
||||||
PropertyChanges { target: leftPanel; visible: false }
|
|
||||||
PropertyChanges { target: middlePanel; visible: false }
|
PropertyChanges { target: middlePanel; visible: false }
|
||||||
PropertyChanges { target: wizard; visible: true }
|
PropertyChanges { target: wizard; visible: true }
|
||||||
PropertyChanges { target: resizeArea; visible: true }
|
PropertyChanges { target: resizeArea; visible: true }
|
||||||
PropertyChanges { target: mobileHeader; visible: false }
|
|
||||||
PropertyChanges { target: titleBar; state: "essentials" }
|
PropertyChanges { target: titleBar; state: "essentials" }
|
||||||
}, State {
|
}, State {
|
||||||
name: "normal"
|
name: "normal"
|
||||||
PropertyChanges { target: leftPanel; visible: (isMobile)? false : true }
|
|
||||||
PropertyChanges { target: middlePanel; visible: true }
|
PropertyChanges { target: middlePanel; visible: true }
|
||||||
PropertyChanges { target: titleBar; basicButtonVisible: true }
|
|
||||||
PropertyChanges { target: wizard; visible: false }
|
PropertyChanges { target: wizard; visible: false }
|
||||||
PropertyChanges { target: resizeArea; visible: true }
|
PropertyChanges { target: resizeArea; visible: true }
|
||||||
PropertyChanges { target: titleBar; state: "default" }
|
PropertyChanges { target: titleBar; state: "default" }
|
||||||
PropertyChanges { target: mobileHeader; visible: isMobile ? true : false }
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
MobileHeader {
|
|
||||||
id: mobileHeader
|
|
||||||
visible: isMobile
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
height: visible? 65 : 0
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
enabled: persistentSettings.customDecorations
|
|
||||||
property var previousPosition
|
|
||||||
anchors.fill: parent
|
|
||||||
propagateComposedEvents: true
|
|
||||||
onPressed: previousPosition = globalCursor.getPosition()
|
|
||||||
onPositionChanged: {
|
|
||||||
if (pressedButtons == Qt.LeftButton) {
|
|
||||||
var pos = globalCursor.getPosition()
|
|
||||||
var dx = pos.x - previousPosition.x
|
|
||||||
var dy = pos.y - previousPosition.y
|
|
||||||
|
|
||||||
appWindow.x += dx
|
|
||||||
appWindow.y += dy
|
|
||||||
previousPosition = pos
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LeftPanel {
|
LeftPanel {
|
||||||
id: leftPanel
|
id: leftPanel
|
||||||
anchors.top: mobileHeader.bottom
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
visible: rootItem.state == "normal" && middlePanel.state != "Merchant"
|
||||||
|
|
||||||
onTransferClicked: {
|
onTransferClicked: {
|
||||||
middlePanel.state = "Transfer";
|
middlePanel.state = "Transfer";
|
||||||
middlePanel.flickable.contentY = 0;
|
middlePanel.flickable.contentY = 0;
|
||||||
if(isMobile) {
|
|
||||||
hideMenu();
|
|
||||||
}
|
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
onReceiveClicked: {
|
onReceiveClicked: {
|
||||||
middlePanel.state = "Receive";
|
middlePanel.state = "Receive";
|
||||||
middlePanel.flickable.contentY = 0;
|
middlePanel.flickable.contentY = 0;
|
||||||
if(isMobile) {
|
|
||||||
hideMenu();
|
|
||||||
}
|
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
onMerchantClicked: {
|
onMerchantClicked: {
|
||||||
middlePanel.state = "Merchant";
|
middlePanel.state = "Merchant";
|
||||||
middlePanel.flickable.contentY = 0;
|
middlePanel.flickable.contentY = 0;
|
||||||
if(isMobile) {
|
|
||||||
hideMenu();
|
|
||||||
}
|
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
onTxkeyClicked: {
|
onTxkeyClicked: {
|
||||||
middlePanel.state = "TxKey";
|
middlePanel.state = "TxKey";
|
||||||
middlePanel.flickable.contentY = 0;
|
middlePanel.flickable.contentY = 0;
|
||||||
if(isMobile) {
|
|
||||||
hideMenu();
|
|
||||||
}
|
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
onSharedringdbClicked: {
|
onSharedringdbClicked: {
|
||||||
middlePanel.state = "SharedRingDB";
|
middlePanel.state = "SharedRingDB";
|
||||||
middlePanel.flickable.contentY = 0;
|
middlePanel.flickable.contentY = 0;
|
||||||
if(isMobile) {
|
|
||||||
hideMenu();
|
|
||||||
}
|
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
onHistoryClicked: {
|
onHistoryClicked: {
|
||||||
middlePanel.state = "History";
|
middlePanel.state = "History";
|
||||||
middlePanel.flickable.contentY = 0;
|
middlePanel.flickable.contentY = 0;
|
||||||
if(isMobile) {
|
|
||||||
hideMenu();
|
|
||||||
}
|
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
onAddressBookClicked: {
|
onAddressBookClicked: {
|
||||||
middlePanel.state = "AddressBook";
|
middlePanel.state = "AddressBook";
|
||||||
middlePanel.flickable.contentY = 0;
|
middlePanel.flickable.contentY = 0;
|
||||||
if(isMobile) {
|
|
||||||
hideMenu();
|
|
||||||
}
|
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
onMiningClicked: {
|
onMiningClicked: {
|
||||||
middlePanel.state = "Mining";
|
middlePanel.state = "Mining";
|
||||||
middlePanel.flickable.contentY = 0;
|
middlePanel.flickable.contentY = 0;
|
||||||
if(isMobile) {
|
|
||||||
hideMenu();
|
|
||||||
}
|
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
onSignClicked: {
|
onSignClicked: {
|
||||||
middlePanel.state = "Sign";
|
middlePanel.state = "Sign";
|
||||||
middlePanel.flickable.contentY = 0;
|
middlePanel.flickable.contentY = 0;
|
||||||
if(isMobile) {
|
|
||||||
hideMenu();
|
|
||||||
}
|
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
onSettingsClicked: {
|
onSettingsClicked: {
|
||||||
middlePanel.state = "Settings";
|
middlePanel.state = "Settings";
|
||||||
middlePanel.flickable.contentY = 0;
|
middlePanel.flickable.contentY = 0;
|
||||||
if(isMobile) {
|
|
||||||
hideMenu();
|
|
||||||
}
|
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
onAccountClicked: {
|
onAccountClicked: {
|
||||||
middlePanel.state = "Account";
|
middlePanel.state = "Account";
|
||||||
middlePanel.flickable.contentY = 0;
|
middlePanel.flickable.contentY = 0;
|
||||||
if(isMobile) {
|
|
||||||
hideMenu();
|
|
||||||
}
|
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1746,102 +1659,13 @@ ApplicationWindow {
|
|||||||
|
|
||||||
MiddlePanel {
|
MiddlePanel {
|
||||||
id: middlePanel
|
id: middlePanel
|
||||||
anchors.top: mobileHeader.bottom
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: leftPanel.visible ? leftPanel.right : parent.left
|
anchors.left: leftPanel.visible ? leftPanel.right : parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
state: "Transfer"
|
state: "Transfer"
|
||||||
}
|
}
|
||||||
|
|
||||||
SequentialAnimation {
|
|
||||||
id: goToBasicAnimation
|
|
||||||
// PropertyAction {
|
|
||||||
// target: appWindow
|
|
||||||
// properties: "visibility"
|
|
||||||
// value: Window.Windowed
|
|
||||||
// }
|
|
||||||
// PropertyAction {
|
|
||||||
// target: titleBar
|
|
||||||
// properties: "maximizeButtonVisible"
|
|
||||||
// value: false
|
|
||||||
// }
|
|
||||||
// PropertyAction {
|
|
||||||
// target: frameArea
|
|
||||||
// properties: "blocked"
|
|
||||||
// value: true
|
|
||||||
// }
|
|
||||||
PropertyAction {
|
|
||||||
target: resizeArea
|
|
||||||
properties: "visible"
|
|
||||||
value: true
|
|
||||||
}
|
|
||||||
// PropertyAction {
|
|
||||||
// target: appWindow
|
|
||||||
// properties: "height"
|
|
||||||
// value: 30
|
|
||||||
// }
|
|
||||||
// PropertyAction {
|
|
||||||
// target: appWindow
|
|
||||||
// properties: "width"
|
|
||||||
// value: 326
|
|
||||||
// }
|
|
||||||
PropertyAction {
|
|
||||||
target: leftPanel
|
|
||||||
properties: "visible"
|
|
||||||
value: false
|
|
||||||
}
|
|
||||||
PropertyAction {
|
|
||||||
target: middlePanel
|
|
||||||
properties: "basicMode"
|
|
||||||
value: true
|
|
||||||
}
|
|
||||||
|
|
||||||
// PropertyAction {
|
|
||||||
// target: appWindow
|
|
||||||
// properties: "height"
|
|
||||||
// value: middlePanel.height
|
|
||||||
// }
|
|
||||||
|
|
||||||
onStopped: {
|
|
||||||
// middlePanel.visible = false
|
|
||||||
leftPanel.visible = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SequentialAnimation {
|
|
||||||
id: goToProAnimation
|
|
||||||
// PropertyAction {
|
|
||||||
// target: appWindow
|
|
||||||
// properties: "height"
|
|
||||||
// value: 30
|
|
||||||
// }
|
|
||||||
PropertyAction {
|
|
||||||
target: middlePanel
|
|
||||||
properties: "basicMode"
|
|
||||||
value: false
|
|
||||||
}
|
|
||||||
PropertyAction {
|
|
||||||
targets: [leftPanel, middlePanel, resizeArea]
|
|
||||||
properties: "visible"
|
|
||||||
value: true
|
|
||||||
}
|
|
||||||
// PropertyAction {
|
|
||||||
// target: appWindow
|
|
||||||
// properties: "height"
|
|
||||||
// value: maxWindowHeight
|
|
||||||
// }
|
|
||||||
// PropertyAction {
|
|
||||||
// target: frameArea
|
|
||||||
// properties: "blocked"
|
|
||||||
// value: false
|
|
||||||
// }
|
|
||||||
// PropertyAction {
|
|
||||||
// target: titleBar
|
|
||||||
// properties: "maximizeButtonVisible"
|
|
||||||
// value: true
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
WizardController {
|
WizardController {
|
||||||
id: wizard
|
id: wizard
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -1906,21 +1730,14 @@ ApplicationWindow {
|
|||||||
TitleBar {
|
TitleBar {
|
||||||
id: titleBar
|
id: titleBar
|
||||||
visible: persistentSettings.customDecorations && middlePanel.state !== "Merchant"
|
visible: persistentSettings.customDecorations && middlePanel.state !== "Merchant"
|
||||||
|
walletName: appWindow.walletName
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
onCloseClicked: appWindow.close();
|
onCloseClicked: appWindow.close();
|
||||||
onLanguageClicked: appWindow.toggleLanguageView();
|
onLanguageClicked: appWindow.toggleLanguageView();
|
||||||
|
onCloseWalletClicked: appWindow.showWizard();
|
||||||
onMaximizeClicked: appWindow.visibility = appWindow.visibility !== Window.Maximized ? Window.Maximized : Window.Windowed
|
onMaximizeClicked: appWindow.visibility = appWindow.visibility !== Window.Maximized ? Window.Maximized : Window.Windowed
|
||||||
onMinimizeClicked: appWindow.visibility = Window.Minimized
|
onMinimizeClicked: appWindow.visibility = Window.Minimized
|
||||||
onGoToBasicVersion: {
|
|
||||||
if (yes) {
|
|
||||||
// basicPanel.currentView = middlePanel.currentView
|
|
||||||
goToBasicAnimation.start()
|
|
||||||
} else {
|
|
||||||
// middlePanel.currentView = basicPanel.currentView
|
|
||||||
goToProAnimation.start()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroMerchant.MerchantTitlebar {
|
MoneroMerchant.MerchantTitlebar {
|
||||||
@@ -2004,41 +1821,43 @@ ApplicationWindow {
|
|||||||
onTriggered: appWindow.themeTransition = true;
|
onTriggered: appWindow.themeTransition = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkNoSyncFlag() {
|
||||||
|
if (!appWindow.daemonRunning) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (appWindow.walletMode == 0 && !daemonManager.noSync()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (appWindow.walletMode == 1 && daemonManager.noSync()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
function checkSimpleModeConnection(){
|
function checkSimpleModeConnection(){
|
||||||
// auto-connection mechanism for simple mode
|
// auto-connection mechanism for simple mode
|
||||||
if(persistentSettings.nettype != NetworkType.MAINNET) return;
|
|
||||||
if(appWindow.walletMode >= 2) return;
|
if(appWindow.walletMode >= 2) return;
|
||||||
|
|
||||||
var disconnected = leftPanel.networkStatus.connected === Wallet.ConnectionStatus_Disconnected;
|
const disconnectedTimeoutSec = 30;
|
||||||
var disconnectedEpoch = appWindow.disconnectedEpoch;
|
const firstCheckDelaySec = 2;
|
||||||
if(disconnectedEpoch === 0){
|
|
||||||
|
const connected = leftPanel.networkStatus.connected !== Wallet.ConnectionStatus_Disconnected;
|
||||||
|
const firstRun = appWindow.disconnectedEpoch == 0;
|
||||||
|
if (firstRun) {
|
||||||
|
appWindow.disconnectedEpoch = Utils.epoch() + firstCheckDelaySec - disconnectedTimeoutSec;
|
||||||
|
} else if (connected) {
|
||||||
appWindow.disconnectedEpoch = Utils.epoch();
|
appWindow.disconnectedEpoch = Utils.epoch();
|
||||||
}
|
}
|
||||||
|
|
||||||
// disconnected longer than 5 seconds?
|
const sinceLastConnect = Utils.epoch() - appWindow.disconnectedEpoch;
|
||||||
if(disconnected && disconnectedEpoch > 0 && (Utils.epoch() - disconnectedEpoch) >= 5){
|
if (sinceLastConnect < disconnectedTimeoutSec && checkNoSyncFlag()) {
|
||||||
// for bootstrap mode, first wait until daemon is killed
|
return;
|
||||||
if(appWindow.walletMode === 1 && appWindow.daemonRunning) {
|
|
||||||
appWindow.stopDaemon();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// fetch new node list
|
|
||||||
wizard.fetchRemoteNodes(function() {
|
|
||||||
// fetched node, connect
|
|
||||||
if(appWindow.walletMode === 0){
|
|
||||||
appWindow.connectRemoteNode();
|
|
||||||
} else if(appWindow.walletMode === 1){
|
|
||||||
appWindow.startDaemon(persistentSettings.daemonFlags);
|
|
||||||
}
|
|
||||||
|
|
||||||
// reset state
|
|
||||||
appWindow.disconnectedEpoch = 0;
|
|
||||||
return;
|
|
||||||
}, function(){
|
|
||||||
appWindow.showStatusMessage(qsTr("Failed to fetch remote nodes from third-party server."), simpleModeConnectionTimer.interval / 1000);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (appWindow.daemonRunning) {
|
||||||
|
appWindow.stopDaemon();
|
||||||
|
}
|
||||||
|
appWindow.startDaemon("");
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
@@ -2117,7 +1936,12 @@ ApplicationWindow {
|
|||||||
closeAccepted();
|
closeAccepted();
|
||||||
};
|
};
|
||||||
|
|
||||||
confirmationDialog.open()
|
if (appWindow.walletMode == 0) {
|
||||||
|
stopDaemon();
|
||||||
|
closeAccepted();
|
||||||
|
} else {
|
||||||
|
confirmationDialog.open();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
closeAccepted();
|
closeAccepted();
|
||||||
@@ -2179,8 +2003,8 @@ ApplicationWindow {
|
|||||||
|
|
||||||
// reset label text. othewise potential privacy leak showing unlock time when switching wallets
|
// reset label text. othewise potential privacy leak showing unlock time when switching wallets
|
||||||
function clearMoneroCardLabelText(){
|
function clearMoneroCardLabelText(){
|
||||||
leftPanel.minutesToUnlockTxt = qsTr("Unlocked balance")
|
leftPanel.balanceString = "?.??"
|
||||||
leftPanel.balanceLabelText = qsTr("Balance")
|
leftPanel.balanceFiatString = "?.??"
|
||||||
}
|
}
|
||||||
|
|
||||||
// some fields need an extra nudge when changing languages
|
// some fields need an extra nudge when changing languages
|
||||||
@@ -2229,11 +2053,22 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changeWalletMode(mode){
|
function changeWalletMode(mode){
|
||||||
|
appWindow.disconnectedEpoch = 0;
|
||||||
appWindow.walletMode = mode;
|
appWindow.walletMode = mode;
|
||||||
persistentSettings.walletMode = mode;
|
persistentSettings.walletMode = mode;
|
||||||
persistentSettings.useRemoteNode = mode === 0 ? true : false;
|
applyWalletMode(mode);
|
||||||
|
}
|
||||||
|
|
||||||
console.log("walletMode changed: " + (mode === 0 ? "simple": mode === 1 ? "simple (bootstrap)" : "Advanced"));
|
function applyWalletMode(mode){
|
||||||
|
if (mode < 2) {
|
||||||
|
persistentSettings.useRemoteNode = false;
|
||||||
|
persistentSettings.bootstrapNodeAddress = "auto";
|
||||||
|
|
||||||
|
if (middlePanel.settingsView.settingsStateViewState === "Node" || middlePanel.settingsView.settingsStateViewState === "Log") {
|
||||||
|
middlePanel.settingsView.settingsStateViewState = "Wallet"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log("walletMode: " + (mode === 0 ? "simple": mode === 1 ? "simple (bootstrap)" : "Advanced"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Daemon console
|
// Daemon console
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# qml components require at least QT 5.9.0
|
# qml components require at least QT 5.9.7
|
||||||
lessThan (QT_MAJOR_VERSION, 5) | lessThan (QT_MINOR_VERSION, 9) {
|
lessThan (QT_MAJOR_VERSION, 5) | lessThan (QT_MINOR_VERSION, 9) {
|
||||||
error("Can't build with Qt $${QT_VERSION}. Use at least Qt 5.9.0")
|
error("Can't build with Qt $${QT_VERSION}. Use at least Qt 5.9.7")
|
||||||
}
|
}
|
||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
@@ -16,10 +16,21 @@ packagesExist(libusb-1.0) {
|
|||||||
packagesExist(hidapi-libusb) {
|
packagesExist(hidapi-libusb) {
|
||||||
PKGCONFIG += hidapi-libusb
|
PKGCONFIG += hidapi-libusb
|
||||||
}
|
}
|
||||||
!win32 {
|
|
||||||
|
GCC_VERSION = $$system("g++ -dumpversion")
|
||||||
|
GCC_VERSION = $$split(GCC_VERSION, .)
|
||||||
|
GCC_VERSION_MAJOR = $$member(GCC_VERSION, 0)
|
||||||
|
GCC_VERSION_MINOR = $$member(GCC_VERSION, 1)
|
||||||
|
greaterThan(GCC_VERSION_MAJOR, 9) | if(equals(GCC_VERSION_MAJOR, 9) : greaterThan(GCC_VERSION_MINOR, 0)) {
|
||||||
|
GCC_9_1_OR_GREATER = TRUE
|
||||||
|
}
|
||||||
|
|
||||||
|
!win32 | !isEmpty(GCC_9_1_OR_GREATER) {
|
||||||
QMAKE_CXXFLAGS += -fPIC -fstack-protector -fstack-protector-strong
|
QMAKE_CXXFLAGS += -fPIC -fstack-protector -fstack-protector-strong
|
||||||
QMAKE_LFLAGS += -fstack-protector -fstack-protector-strong
|
QMAKE_LFLAGS += -fstack-protector -fstack-protector-strong
|
||||||
|
}
|
||||||
|
|
||||||
|
!win32 {
|
||||||
packagesExist(protobuf) {
|
packagesExist(protobuf) {
|
||||||
PKGCONFIG += protobuf
|
PKGCONFIG += protobuf
|
||||||
}
|
}
|
||||||
@@ -142,25 +153,25 @@ ios:arm64 {
|
|||||||
LIBS += \
|
LIBS += \
|
||||||
-L$$PWD/../ofxiOSBoost/build/libs/boost/lib/arm64 \
|
-L$$PWD/../ofxiOSBoost/build/libs/boost/lib/arm64 \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LIBS_COMMON = \
|
||||||
|
-lwallet_merged \
|
||||||
|
-llmdb \
|
||||||
|
-lepee \
|
||||||
|
-lunbound \
|
||||||
|
-lsodium \
|
||||||
|
-leasylogging \
|
||||||
|
-lrandomx
|
||||||
|
|
||||||
!ios:!android {
|
!ios:!android {
|
||||||
LIBS += -L$$WALLET_ROOT/lib \
|
LIBS += -L$$WALLET_ROOT/lib \
|
||||||
-lwallet_merged \
|
$$LIBS_COMMON
|
||||||
-llmdb \
|
|
||||||
-lepee \
|
|
||||||
-lunbound \
|
|
||||||
-lsodium \
|
|
||||||
-leasylogging
|
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
message("Host is Android")
|
message("Host is Android")
|
||||||
LIBS += -L$$WALLET_ROOT/lib \
|
LIBS += -L$$WALLET_ROOT/lib \
|
||||||
-lwallet_merged \
|
$$LIBS_COMMON
|
||||||
-llmdb \
|
|
||||||
-lepee \
|
|
||||||
-lunbound \
|
|
||||||
-lsodium \
|
|
||||||
-leasylogging
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -175,12 +186,7 @@ ios {
|
|||||||
QMAKE_IOS_DEVICE_ARCHS = arm64
|
QMAKE_IOS_DEVICE_ARCHS = arm64
|
||||||
CONFIG += arm64
|
CONFIG += arm64
|
||||||
LIBS += -L$$WALLET_ROOT/lib-ios \
|
LIBS += -L$$WALLET_ROOT/lib-ios \
|
||||||
-lwallet_merged \
|
$$LIBS_COMMON
|
||||||
-llmdb \
|
|
||||||
-lepee \
|
|
||||||
-lunbound \
|
|
||||||
-lsodium \
|
|
||||||
-leasylogging
|
|
||||||
|
|
||||||
LIBS+= \
|
LIBS+= \
|
||||||
-L$$PWD/../OpenSSL-for-iPhone/lib \
|
-L$$PWD/../OpenSSL-for-iPhone/lib \
|
||||||
@@ -287,6 +293,7 @@ win32 {
|
|||||||
-licudt \
|
-licudt \
|
||||||
-licutu \
|
-licutu \
|
||||||
-liconv \
|
-liconv \
|
||||||
|
-lstdc++ \
|
||||||
-lpthread \
|
-lpthread \
|
||||||
-lsetupapi \
|
-lsetupapi \
|
||||||
-lssl \
|
-lssl \
|
||||||
@@ -337,13 +344,13 @@ linux {
|
|||||||
-llmdb \
|
-llmdb \
|
||||||
-lsodium \
|
-lsodium \
|
||||||
-lhidapi-libusb \
|
-lhidapi-libusb \
|
||||||
-lcrypto $$TREZOR_LINKER \
|
-lcrypto $$TREZOR_LINKER
|
||||||
-lX11
|
|
||||||
|
|
||||||
if(!android) {
|
if(!android) {
|
||||||
LIBS+= \
|
LIBS+= \
|
||||||
-Wl,-Bdynamic \
|
-Wl,-Bdynamic \
|
||||||
-lGL
|
-lGL \
|
||||||
|
-lX11
|
||||||
}
|
}
|
||||||
# currently monero has an issue with "static" build and linunwind-dev,
|
# currently monero has an issue with "static" build and linunwind-dev,
|
||||||
# so we link libunwind-dev only for non-Ubuntu distros
|
# so we link libunwind-dev only for non-Ubuntu distros
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_LINUX
|
#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
#undef KeyPress
|
#undef KeyPress
|
||||||
#undef KeyRelease
|
#undef KeyRelease
|
||||||
@@ -78,7 +78,7 @@ bool OSHelper::isCapsLock() const
|
|||||||
// platform dependent method of determining if CAPS LOCK is on
|
// platform dependent method of determining if CAPS LOCK is on
|
||||||
#if defined(Q_OS_WIN32) // MS Windows version
|
#if defined(Q_OS_WIN32) // MS Windows version
|
||||||
return GetKeyState(VK_CAPITAL) == 1;
|
return GetKeyState(VK_CAPITAL) == 1;
|
||||||
#elif defined(Q_OS_LINUX) // X11 version
|
#elif defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID) // X11 version
|
||||||
Display * d = XOpenDisplay((char*)0);
|
Display * d = XOpenDisplay((char*)0);
|
||||||
bool caps_state = false;
|
bool caps_state = false;
|
||||||
if (d) {
|
if (d) {
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ Rectangle {
|
|||||||
/* main layout */
|
/* main layout */
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ Rectangle {
|
|||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|||||||
@@ -939,7 +939,7 @@ Rectangle {
|
|||||||
anchors.leftMargin: 10
|
anchors.leftMargin: 10
|
||||||
text: FontAwesome.productHunt
|
text: FontAwesome.productHunt
|
||||||
small: true
|
small: true
|
||||||
label.font.family: FontAwesome.fontFamily
|
label.font.family: FontAwesome.fontFamilyBrands
|
||||||
fontSize: 18
|
fontSize: 18
|
||||||
width: 36
|
width: 36
|
||||||
|
|
||||||
@@ -1361,8 +1361,9 @@ Rectangle {
|
|||||||
// applying filters
|
// applying filters
|
||||||
root.txData = JSON.parse(JSON.stringify(root.txModelData)); // deepcopy
|
root.txData = JSON.parse(JSON.stringify(root.txModelData)); // deepcopy
|
||||||
|
|
||||||
var fromDate = fromDatePicker.currentDate.getTime() / 1000;
|
const timezoneOffset = new Date().getTimezoneOffset() * 60;
|
||||||
var toDate = toDatePicker.currentDate.getTime() / 1000;
|
var fromDate = Math.floor(fromDatePicker.currentDate.getTime() / 86400000) * 86400 + timezoneOffset;
|
||||||
|
var toDate = (Math.floor(toDatePicker.currentDate.getTime() / 86400000) + 1) * 86400 + timezoneOffset;
|
||||||
|
|
||||||
var txs = [];
|
var txs = [];
|
||||||
for (var i = 0; i < root.txData.length; i++){
|
for (var i = 0; i < root.txData.length; i++){
|
||||||
@@ -1582,9 +1583,9 @@ Rectangle {
|
|||||||
elem.parent.text = txKey ? txKey : '-';
|
elem.parent.text = txKey ? txKey : '-';
|
||||||
elem.parent.state = 'ready';
|
elem.parent.state = 'ready';
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
toClipboard(elem.parent.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
toClipboard(elem.parent.text);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showTxDetails(hash, paymentId, destinations, subaddrAccount, subaddrIndex){
|
function showTxDetails(hash, paymentId, destinations, subaddrAccount, subaddrIndex){
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ Rectangle {
|
|||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
|
|
||||||
spacing: 30
|
spacing: 30
|
||||||
@@ -251,7 +251,7 @@ Rectangle {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
loadPage("Settings")
|
loadPage("Settings")
|
||||||
}
|
}
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
width: 135
|
width: 135
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ Rectangle {
|
|||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import QtQuick.Controls 2.0
|
|||||||
import QtQuick.Controls.Styles 1.4
|
import QtQuick.Controls.Styles 1.4
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
|
import FontAwesome 1.0
|
||||||
|
|
||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
import "../components/effects/" as MoneroEffects
|
import "../components/effects/" as MoneroEffects
|
||||||
@@ -65,7 +66,7 @@ Rectangle {
|
|||||||
/* main layout */
|
/* main layout */
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@@ -309,6 +310,20 @@ Rectangle {
|
|||||||
appWindow.showStatusMessage(qsTr("Copied to clipboard") + translationManager.emptyString, 3);
|
appWindow.showStatusMessage(qsTr("Copied to clipboard") + translationManager.emptyString, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.StandardButton {
|
||||||
|
text: FontAwesome.eye
|
||||||
|
label.font.family: FontAwesome.fontFamily
|
||||||
|
fontSize: 24
|
||||||
|
width: 36
|
||||||
|
visible: appWindow.currentWallet ? appWindow.currentWallet.isHwBacked() : false
|
||||||
|
onClicked: {
|
||||||
|
appWindow.currentWallet.deviceShowAddressAsync(
|
||||||
|
appWindow.currentWallet.currentSubaddressAccount,
|
||||||
|
appWindow.current_subaddress_table_index,
|
||||||
|
'');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ Rectangle {
|
|||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@@ -296,7 +296,7 @@ Rectangle {
|
|||||||
|
|
||||||
GridLayout{
|
GridLayout{
|
||||||
Layout.topMargin: 12
|
Layout.topMargin: 12
|
||||||
columns: (isMobile) ? 1 : 2
|
columns: 2
|
||||||
columnSpacing: 32
|
columnSpacing: 32
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -368,7 +368,7 @@ Rectangle {
|
|||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columnSpacing: 20
|
columnSpacing: 20
|
||||||
columns: (isMobile) ? 1 : 2
|
columns: 2
|
||||||
|
|
||||||
MoneroComponents.CheckBox {
|
MoneroComponents.CheckBox {
|
||||||
id: segregatePreForkOutputs
|
id: segregatePreForkOutputs
|
||||||
@@ -405,7 +405,7 @@ Rectangle {
|
|||||||
id: segregationHeightRow
|
id: segregationHeightRow
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 17
|
Layout.topMargin: 17
|
||||||
columns: (isMobile) ? 1 : 2
|
columns: 2
|
||||||
columnSpacing: 32
|
columnSpacing: 32
|
||||||
|
|
||||||
MoneroComponents.LineEdit {
|
MoneroComponents.LineEdit {
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ Rectangle {
|
|||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ Rectangle {
|
|||||||
property bool showAdvanced: false
|
property bool showAdvanced: false
|
||||||
// @TODO: remove after pid removal hardfork
|
// @TODO: remove after pid removal hardfork
|
||||||
property bool warningLongPidTransfer: false
|
property bool warningLongPidTransfer: false
|
||||||
property bool warningLongPidDescription: false
|
property bool warningLongPidDescription: descriptionLine.text.match(/^[0-9a-f]{64}$/i)
|
||||||
|
|
||||||
Clipboard { id: clipboard }
|
Clipboard { id: clipboard }
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ Rectangle {
|
|||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: pageRoot
|
id: pageRoot
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@@ -143,8 +143,16 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
visible: leftPanel.minutesToUnlock !== ""
|
||||||
|
|
||||||
|
MoneroComponents.WarningBox {
|
||||||
|
text: qsTr("Spendable funds: %1 XMR. Please wait ~%2 minutes for your whole balance to become spendable.").arg(leftPanel.balanceUnlockedString).arg(leftPanel.minutesToUnlock)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: (isMobile || !(appWindow.walletMode >= 2)) ? 1 : 2
|
columns: appWindow.walletMode < 2 ? 1 : 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
columnSpacing: 32
|
columnSpacing: 32
|
||||||
|
|
||||||
@@ -203,10 +211,10 @@ Rectangle {
|
|||||||
id: priorityModelV5
|
id: priorityModelV5
|
||||||
|
|
||||||
ListElement { column1: qsTr("Automatic") ; column2: ""; priority: 0}
|
ListElement { column1: qsTr("Automatic") ; column2: ""; priority: 0}
|
||||||
ListElement { column1: qsTr("Slow (x0.25 fee)") ; column2: ""; priority: 1}
|
ListElement { column1: qsTr("Slow (x0.2 fee)") ; column2: ""; priority: 1}
|
||||||
ListElement { column1: qsTr("Normal (x1 fee)") ; column2: ""; priority: 2 }
|
ListElement { column1: qsTr("Normal (x1 fee)") ; column2: ""; priority: 2 }
|
||||||
ListElement { column1: qsTr("Fast (x5 fee)") ; column2: ""; priority: 3 }
|
ListElement { column1: qsTr("Fast (x5 fee)") ; column2: ""; priority: 3 }
|
||||||
ListElement { column1: qsTr("Fastest (x41.5 fee)") ; column2: ""; priority: 4 }
|
ListElement { column1: qsTr("Fastest (x200 fee)") ; column2: ""; priority: 4 }
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardDropdown {
|
StandardDropdown {
|
||||||
@@ -261,8 +269,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
// @TODO: remove after pid removal hardfork
|
warningLongPidTransfer = isLongPidService(text);
|
||||||
warningLongPidTransfer = !persistentSettings.showPid && isLongPidService(text)
|
|
||||||
}
|
}
|
||||||
inlineButton.text: FontAwesome.qrcode
|
inlineButton.text: FontAwesome.qrcode
|
||||||
inlineButton.fontPixelSize: 22
|
inlineButton.fontPixelSize: 22
|
||||||
@@ -323,6 +330,12 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.WarningBox {
|
||||||
|
text: qsTr("Description field contents match long payment ID format. \
|
||||||
|
Please don't paste long payment ID into description field, your funds might be lost.") + translationManager.emptyString;
|
||||||
|
visible: warningLongPidDescription
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 15
|
spacing: 15
|
||||||
|
|
||||||
@@ -352,7 +365,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
visible: appWindow.persistentSettings.showPid || paymentIdCheckbox.checked
|
visible: paymentIdCheckbox.checked
|
||||||
// @TODO: remove after pid removal hardfork
|
// @TODO: remove after pid removal hardfork
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: paymentIdCheckbox
|
id: paymentIdCheckbox
|
||||||
@@ -375,6 +388,7 @@ Rectangle {
|
|||||||
id: paymentIdLine
|
id: paymentIdLine
|
||||||
fontBold: true
|
fontBold: true
|
||||||
placeholderText: qsTr("64 hexadecimal characters") + translationManager.emptyString
|
placeholderText: qsTr("64 hexadecimal characters") + translationManager.emptyString
|
||||||
|
readOnly: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
addressValidation: false
|
addressValidation: false
|
||||||
@@ -386,8 +400,10 @@ Rectangle {
|
|||||||
MoneroComponents.WarningBox {
|
MoneroComponents.WarningBox {
|
||||||
// @TODO: remove after pid removal hardfork
|
// @TODO: remove after pid removal hardfork
|
||||||
id: paymentIdWarningBox
|
id: paymentIdWarningBox
|
||||||
text: qsTr("You can enable transfers with payment ID on the settings page.") + translationManager.emptyString;
|
text: qsTr("Long payment IDs are obsolete. \
|
||||||
visible: !persistentSettings.showPid && (warningLongPidTransfer || warningLongPidDescription)
|
Long payment IDs were not encrypted on the blockchain and would harm your privacy. \
|
||||||
|
If the party you're sending to still requires a long payment ID, please notify them.") + translationManager.emptyString;
|
||||||
|
visible: warningLongPidTransfer || paymentIdCheckbox.checked
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.WarningBox {
|
MoneroComponents.WarningBox {
|
||||||
@@ -443,7 +459,7 @@ Rectangle {
|
|||||||
anchors.top: pageRoot.bottom
|
anchors.top: pageRoot.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 32
|
anchors.topMargin: 32
|
||||||
spacing: 26
|
spacing: 26
|
||||||
enabled: !viewOnly || pageRoot.enabled
|
enabled: !viewOnly || pageRoot.enabled
|
||||||
@@ -462,7 +478,7 @@ Rectangle {
|
|||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
visible: persistentSettings.transferShowAdvanced && appWindow.walletMode >= 2
|
visible: persistentSettings.transferShowAdvanced && appWindow.walletMode >= 2
|
||||||
columns: (isMobile) ? 2 : 6
|
columns: 6
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: sweepUnmixableButton
|
id: sweepUnmixableButton
|
||||||
@@ -761,6 +777,11 @@ Rectangle {
|
|||||||
root.sendButtonWarning = qsTr("Transaction information is incorrect.") + translationManager.emptyString;
|
root.sendButtonWarning = qsTr("Transaction information is incorrect.") + translationManager.emptyString;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (paymentIdWarningBox.visible) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ Rectangle {
|
|||||||
/* main layout */
|
/* main layout */
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ Item {
|
|||||||
property var hiddenAmounts: []
|
property var hiddenAmounts: []
|
||||||
|
|
||||||
function onPageCompleted() {
|
function onPageCompleted() {
|
||||||
appWindow.hideMenu();
|
|
||||||
|
|
||||||
// prepare tracking
|
// prepare tracking
|
||||||
trackingCheckbox.checked = root.enableTracking
|
trackingCheckbox.checked = root.enableTracking
|
||||||
root.update();
|
root.update();
|
||||||
@@ -56,8 +54,6 @@ Item {
|
|||||||
timer.running = false
|
timer.running = false
|
||||||
root.enableTracking = false
|
root.enableTracking = false
|
||||||
trackingModel.clear()
|
trackingModel.clear()
|
||||||
|
|
||||||
appWindow.showMenu();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
|||||||
@@ -4,38 +4,55 @@ import QtGraphicalEffects 1.0
|
|||||||
|
|
||||||
import "../../components" as MoneroComponents
|
import "../../components" as MoneroComponents
|
||||||
|
|
||||||
RowLayout {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
spacing: 10
|
|
||||||
property bool checked: false;
|
property bool checked: false;
|
||||||
property alias text: content.text
|
property alias text: content.text
|
||||||
signal changed;
|
signal changed;
|
||||||
|
|
||||||
Rectangle {
|
width: checkBoxLayout.width
|
||||||
id: checkbox
|
height: 22
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: parent.top
|
|
||||||
implicitHeight: 22
|
|
||||||
width: 22
|
|
||||||
radius: 5
|
|
||||||
|
|
||||||
Image {
|
RowLayout {
|
||||||
id: imageChecked
|
id: checkBoxLayout
|
||||||
visible: root.checked
|
spacing: 10
|
||||||
anchors.centerIn: parent
|
|
||||||
source: "qrc:///images/uncheckedIcon.png"
|
Item {
|
||||||
|
height: root.height
|
||||||
|
width: root.height
|
||||||
|
Rectangle {
|
||||||
|
id: checkbox
|
||||||
|
anchors.fill: parent
|
||||||
|
radius: 5
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: imageChecked
|
||||||
|
visible: root.checked
|
||||||
|
anchors.centerIn: parent
|
||||||
|
source: "qrc:///images/uncheckedIcon.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
DropShadow {
|
||||||
|
anchors.fill: source
|
||||||
|
cached: true
|
||||||
|
horizontalOffset: 3
|
||||||
|
verticalOffset: 3
|
||||||
|
radius: 8.0
|
||||||
|
samples: 16
|
||||||
|
color: "#20000000"
|
||||||
|
smooth: true
|
||||||
|
source: checkbox
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
id: content
|
||||||
|
font.pixelSize: 14
|
||||||
|
font.bold: false
|
||||||
|
color: "white"
|
||||||
|
text: ""
|
||||||
|
themeTransition: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
|
||||||
id: content
|
|
||||||
font.pixelSize: 14
|
|
||||||
font.bold: false
|
|
||||||
color: "white"
|
|
||||||
text: ""
|
|
||||||
themeTransition: false
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
@@ -46,16 +63,4 @@ RowLayout {
|
|||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DropShadow {
|
|
||||||
anchors.fill: source
|
|
||||||
cached: true
|
|
||||||
horizontalOffset: 3
|
|
||||||
verticalOffset: 3
|
|
||||||
radius: 8.0
|
|
||||||
samples: 16
|
|
||||||
color: "#20000000"
|
|
||||||
smooth: true
|
|
||||||
source: checkbox
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ Rectangle {
|
|||||||
property bool showCloseButton: true
|
property bool showCloseButton: true
|
||||||
|
|
||||||
height: {
|
height: {
|
||||||
if(!persistentSettings.customDecorations || isMobile) return 0;
|
if(!persistentSettings.customDecorations) return 0;
|
||||||
return 50;
|
return 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,7 @@ Rectangle {
|
|||||||
property string borderColor: MoneroComponents.Style.blackTheme ? "#808080" : "#B9B9B9"
|
property string borderColor: MoneroComponents.Style.blackTheme ? "#808080" : "#B9B9B9"
|
||||||
property int textMargin: {
|
property int textMargin: {
|
||||||
// left-right margins for a given cell
|
// left-right margins for a given cell
|
||||||
if(isMobile){
|
if(appWindow.width < 890){
|
||||||
return 10;
|
|
||||||
} else if(appWindow.width < 890){
|
|
||||||
return 32;
|
return 32;
|
||||||
} else {
|
} else {
|
||||||
return 64;
|
return 64;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 0
|
anchors.topMargin: 0
|
||||||
spacing: 30
|
spacing: 30
|
||||||
|
|
||||||
|
|||||||
@@ -47,12 +47,11 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 0
|
anchors.topMargin: 0
|
||||||
spacing: 6
|
spacing: 6
|
||||||
|
|
||||||
MoneroComponents.CheckBox {
|
MoneroComponents.CheckBox {
|
||||||
visible: !isMobile
|
|
||||||
id: customDecorationsCheckBox
|
id: customDecorationsCheckBox
|
||||||
checked: persistentSettings.customDecorations
|
checked: persistentSettings.customDecorations
|
||||||
onClicked: Windows.setCustomWindowDecorations(checked)
|
onClicked: Windows.setCustomWindowDecorations(checked)
|
||||||
@@ -60,7 +59,6 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.CheckBox {
|
MoneroComponents.CheckBox {
|
||||||
visible: !isMobile
|
|
||||||
id: hideBalanceCheckBox
|
id: hideBalanceCheckBox
|
||||||
checked: persistentSettings.hideBalance
|
checked: persistentSettings.hideBalance
|
||||||
onClicked: {
|
onClicked: {
|
||||||
@@ -70,16 +68,6 @@ Rectangle {
|
|||||||
text: qsTr("Hide balance") + translationManager.emptyString
|
text: qsTr("Hide balance") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.CheckBox {
|
|
||||||
visible: !isMobile
|
|
||||||
id: showPidCheckBox
|
|
||||||
checked: persistentSettings.showPid
|
|
||||||
onClicked: {
|
|
||||||
persistentSettings.showPid = !persistentSettings.showPid
|
|
||||||
}
|
|
||||||
text: qsTr("Enable transfer with payment ID (OBSOLETE)") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.CheckBox {
|
MoneroComponents.CheckBox {
|
||||||
id: themeCheckbox
|
id: themeCheckbox
|
||||||
checked: !MoneroComponents.Style.blackTheme
|
checked: !MoneroComponents.Style.blackTheme
|
||||||
@@ -91,7 +79,6 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.CheckBox {
|
MoneroComponents.CheckBox {
|
||||||
visible: !isMobile
|
|
||||||
id: userInActivityCheckbox
|
id: userInActivityCheckbox
|
||||||
checked: persistentSettings.lockOnUserInActivity
|
checked: persistentSettings.lockOnUserInActivity
|
||||||
onClicked: persistentSettings.lockOnUserInActivity = !persistentSettings.lockOnUserInActivity
|
onClicked: persistentSettings.lockOnUserInActivity = !persistentSettings.lockOnUserInActivity
|
||||||
@@ -267,14 +254,6 @@ Rectangle {
|
|||||||
appWindow.toggleLanguageView();
|
appWindow.toggleLanguageView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextBlock {
|
|
||||||
visible: isMobile
|
|
||||||
font.pixelSize: 14
|
|
||||||
textFormat: Text.RichText
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: qsTr("No Layout options exist yet in mobile mode.") + translationManager.emptyString;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 0
|
anchors.topMargin: 0
|
||||||
spacing: 10
|
spacing: 10
|
||||||
|
|
||||||
@@ -216,7 +216,11 @@ Rectangle {
|
|||||||
onAccepted: {
|
onAccepted: {
|
||||||
if(text.length > 0) {
|
if(text.length > 0) {
|
||||||
consoleArea.logCommand(">>> " + text)
|
consoleArea.logCommand(">>> " + text)
|
||||||
daemonManager.sendCommand(text, currentWallet.nettype);
|
daemonManager.sendCommandAsync(text.split(" "), currentWallet.nettype, function(result) {
|
||||||
|
if (!result) {
|
||||||
|
appWindow.showStatusMessage(qsTr("Failed to send command"), 3);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
text = ""
|
text = ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ Rectangle{
|
|||||||
/* main layout */
|
/* main layout */
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 0
|
anchors.topMargin: 0
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@@ -96,17 +96,13 @@ Rectangle{
|
|||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
MoneroEffects.ImageMask {
|
MoneroComponents.Label {
|
||||||
height: 27
|
fontSize: 32
|
||||||
width: 27
|
text: FontAwesome.home
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
fontFamily: FontAwesome.fontFamilySolid
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.centerIn: parent
|
||||||
fontAwesomeFallbackIcon: FontAwesome.shield
|
fontColor: MoneroComponents.Style.defaultFontColor
|
||||||
fontAwesomeFallbackSize: 26
|
styleName: "Solid"
|
||||||
image: "qrc:///images/settings_local.svg"
|
|
||||||
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
|
||||||
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,16 +198,13 @@ Rectangle{
|
|||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
MoneroEffects.ImageMask {
|
MoneroComponents.Label {
|
||||||
height: 29
|
fontSize: 28
|
||||||
width: 22
|
text: FontAwesome.cloud
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
fontFamily: FontAwesome.fontFamilySolid
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
styleName: "Solid"
|
||||||
fontAwesomeFallbackIcon: FontAwesome.cloudDownload
|
anchors.centerIn: parent
|
||||||
fontAwesomeFallbackSize: 26
|
fontColor: MoneroComponents.Style.defaultFontColor
|
||||||
image: "qrc:///images/settings_remote.svg"
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
|
||||||
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,7 +278,7 @@ Rectangle{
|
|||||||
spacing: 20
|
spacing: 20
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
visible: !isMobile && persistentSettings.useRemoteNode
|
visible: persistentSettings.useRemoteNode
|
||||||
|
|
||||||
MoneroComponents.WarningBox {
|
MoneroComponents.WarningBox {
|
||||||
Layout.topMargin: 26
|
Layout.topMargin: 26
|
||||||
@@ -317,7 +310,7 @@ Rectangle{
|
|||||||
}
|
}
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: (isMobile) ? 1 : 2
|
columns: 2
|
||||||
columnSpacing: 32
|
columnSpacing: 32
|
||||||
|
|
||||||
MoneroComponents.LineEdit {
|
MoneroComponents.LineEdit {
|
||||||
@@ -377,11 +370,11 @@ Rectangle{
|
|||||||
id: localNodeLayout
|
id: localNodeLayout
|
||||||
spacing: 20
|
spacing: 20
|
||||||
Layout.topMargin: 40
|
Layout.topMargin: 40
|
||||||
visible: !isMobile && !persistentSettings.useRemoteNode
|
visible: !persistentSettings.useRemoteNode
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
small: true
|
small: true
|
||||||
text: (appWindow.daemonRunning ? qsTr("Stop local node") : qsTr("Start daemon")) + translationManager.emptyString
|
text: (appWindow.daemonRunning ? qsTr("Stop daemon") : qsTr("Start daemon")) + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (appWindow.daemonRunning) {
|
if (appWindow.daemonRunning) {
|
||||||
appWindow.stopDaemon();
|
appWindow.stopDaemon();
|
||||||
@@ -403,6 +396,7 @@ Rectangle{
|
|||||||
labelText: qsTr("Blockchain location") + style + qsTr(" <a href='#'> (change)</a>") + translationManager.emptyString
|
labelText: qsTr("Blockchain location") + style + qsTr(" <a href='#'> (change)</a>") + translationManager.emptyString
|
||||||
placeholderText: qsTr("(default)") + translationManager.emptyString
|
placeholderText: qsTr("(default)") + translationManager.emptyString
|
||||||
placeholderFontSize: 15
|
placeholderFontSize: 15
|
||||||
|
readOnly: true
|
||||||
text: {
|
text: {
|
||||||
if(persistentSettings.blockchainDataDir.length > 0){
|
if(persistentSettings.blockchainDataDir.length > 0){
|
||||||
return persistentSettings.blockchainDataDir;
|
return persistentSettings.blockchainDataDir;
|
||||||
@@ -435,7 +429,7 @@ Rectangle{
|
|||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
visible: !isMobile && !persistentSettings.useRemoteNode
|
visible: !persistentSettings.useRemoteNode
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -457,7 +451,11 @@ Rectangle{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
persistentSettings.bootstrapNodeAddress = daemonAddrText ? bootstrapNodeEdit.getAddress() : "";
|
if (daemonAddrText == "auto") {
|
||||||
|
persistentSettings.bootstrapNodeAddress = daemonAddrText;
|
||||||
|
} else {
|
||||||
|
persistentSettings.bootstrapNodeAddress = daemonAddrText ? bootstrapNodeEdit.getAddress() : "";
|
||||||
|
}
|
||||||
console.log("setting bootstrap node to " + persistentSettings.bootstrapNodeAddress)
|
console.log("setting bootstrap node to " + persistentSettings.bootstrapNodeAddress)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: 20
|
||||||
anchors.topMargin: 0
|
anchors.topMargin: 0
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
|
|||||||
15
qml.qrc
@@ -107,13 +107,14 @@
|
|||||||
<file>components/DaemonConsole.qml</file>
|
<file>components/DaemonConsole.qml</file>
|
||||||
<file>components/QRCodeScanner.qml</file>
|
<file>components/QRCodeScanner.qml</file>
|
||||||
<file>components/Notifier.qml</file>
|
<file>components/Notifier.qml</file>
|
||||||
<file>components/MobileHeader.qml</file>
|
|
||||||
<file>components/TextBlock.qml</file>
|
<file>components/TextBlock.qml</file>
|
||||||
<file>components/RemoteNodeEdit.qml</file>
|
<file>components/RemoteNodeEdit.qml</file>
|
||||||
<file>pages/Keys.qml</file>
|
<file>pages/Keys.qml</file>
|
||||||
<file>images/appicon.ico</file>
|
<file>images/appicon.ico</file>
|
||||||
<file>images/card-background.png</file>
|
<file>images/card-background-black.png</file>
|
||||||
<file>images/card-background@2x.png</file>
|
<file>images/card-background-black@2x.png</file>
|
||||||
|
<file>images/card-background-white.png</file>
|
||||||
|
<file>images/card-background-white@2x.png</file>
|
||||||
<file>images/moneroLogo_white.png</file>
|
<file>images/moneroLogo_white.png</file>
|
||||||
<file>images/question.png</file>
|
<file>images/question.png</file>
|
||||||
<file>images/question@2x.png</file>
|
<file>images/question@2x.png</file>
|
||||||
@@ -167,8 +168,6 @@
|
|||||||
<file>pages/settings/SettingsLayout.qml</file>
|
<file>pages/settings/SettingsLayout.qml</file>
|
||||||
<file>pages/settings/SettingsInfo.qml</file>
|
<file>pages/settings/SettingsInfo.qml</file>
|
||||||
<file>pages/settings/Navbar.qml</file>
|
<file>pages/settings/Navbar.qml</file>
|
||||||
<file>images/settings_local.svg</file>
|
|
||||||
<file>images/settings_remote.svg</file>
|
|
||||||
<file>components/WarningBox.qml</file>
|
<file>components/WarningBox.qml</file>
|
||||||
<file>images/miningxmr.png</file>
|
<file>images/miningxmr.png</file>
|
||||||
<file>images/miningxmr@2x.png</file>
|
<file>images/miningxmr@2x.png</file>
|
||||||
@@ -180,7 +179,9 @@
|
|||||||
<file>images/merchant/arrow_right.png</file>
|
<file>images/merchant/arrow_right.png</file>
|
||||||
<file>images/merchant/bg.png</file>
|
<file>images/merchant/bg.png</file>
|
||||||
<file>images/merchant/input_box.png</file>
|
<file>images/merchant/input_box.png</file>
|
||||||
<file>fonts/FontAwesome/fontawesome-webfont.ttf</file>
|
<file>fonts/FontAwesome/fa-brands-400.ttf</file>
|
||||||
|
<file>fonts/FontAwesome/fa-regular-400.ttf</file>
|
||||||
|
<file>fonts/FontAwesome/fa-solid-900.ttf</file>
|
||||||
<file>fonts/FontAwesome/FontAwesome.qml</file>
|
<file>fonts/FontAwesome/FontAwesome.qml</file>
|
||||||
<file>fonts/FontAwesome/Object.qml</file>
|
<file>fonts/FontAwesome/Object.qml</file>
|
||||||
<file>fonts/FontAwesome/qmldir</file>
|
<file>fonts/FontAwesome/qmldir</file>
|
||||||
@@ -236,7 +237,6 @@
|
|||||||
<file>images/middlePanelShadow.png</file>
|
<file>images/middlePanelShadow.png</file>
|
||||||
<file>images/themes/white/titlebarLogo@2x.png</file>
|
<file>images/themes/white/titlebarLogo@2x.png</file>
|
||||||
<file>images/themes/white/titlebarLogo.png</file>
|
<file>images/themes/white/titlebarLogo.png</file>
|
||||||
<file>images/sidebar.svg</file>
|
|
||||||
<file>images/fullscreen.svg</file>
|
<file>images/fullscreen.svg</file>
|
||||||
<file>images/close.svg</file>
|
<file>images/close.svg</file>
|
||||||
<file>images/minimize.svg</file>
|
<file>images/minimize.svg</file>
|
||||||
@@ -244,7 +244,6 @@
|
|||||||
<file>images/themes/white/fullscreen.svg</file>
|
<file>images/themes/white/fullscreen.svg</file>
|
||||||
<file>images/themes/white/minimize.svg</file>
|
<file>images/themes/white/minimize.svg</file>
|
||||||
<file>images/themes/white/question.svg</file>
|
<file>images/themes/white/question.svg</file>
|
||||||
<file>images/themes/white/expand.svg</file>
|
|
||||||
<file>components/effects/ColorTransition.qml</file>
|
<file>components/effects/ColorTransition.qml</file>
|
||||||
<file>components/effects/GradientBackground.qml</file>
|
<file>components/effects/GradientBackground.qml</file>
|
||||||
<file>images/check-white.svg</file>
|
<file>images/check-white.svg</file>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
static const int DAEMON_START_TIMEOUT_SECONDS = 30;
|
static const int DAEMON_START_TIMEOUT_SECONDS = 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
DaemonManager * DaemonManager::m_instance = nullptr;
|
DaemonManager * DaemonManager::m_instance = nullptr;
|
||||||
@@ -61,7 +61,7 @@ DaemonManager *DaemonManager::instance(const QStringList *args)
|
|||||||
return m_instance;
|
return m_instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const QString &dataDir, const QString &bootstrapNodeAddress)
|
bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const QString &dataDir, const QString &bootstrapNodeAddress, bool noSync /* = false*/)
|
||||||
{
|
{
|
||||||
// prepare command line arguments and pass to monerod
|
// prepare command line arguments and pass to monerod
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
@@ -99,6 +99,10 @@ bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const
|
|||||||
arguments << "--bootstrap-daemon-address" << bootstrapNodeAddress;
|
arguments << "--bootstrap-daemon-address" << bootstrapNodeAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (noSync) {
|
||||||
|
arguments << "--no-sync";
|
||||||
|
}
|
||||||
|
|
||||||
arguments << "--check-updates" << "disabled";
|
arguments << "--check-updates" << "disabled";
|
||||||
|
|
||||||
// --max-concurrency based on threads available. max: 6
|
// --max-concurrency based on threads available. max: 6
|
||||||
@@ -131,11 +135,13 @@ bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start start watcher
|
// Start start watcher
|
||||||
m_scheduler.run([this, nettype] {
|
m_scheduler.run([this, nettype, noSync] {
|
||||||
if (startWatcher(nettype))
|
if (startWatcher(nettype)) {
|
||||||
emit daemonStarted();
|
emit daemonStarted();
|
||||||
else
|
m_noSync = noSync;
|
||||||
|
} else {
|
||||||
emit daemonStartFailure();
|
emit daemonStartFailure();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -144,7 +150,7 @@ bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const
|
|||||||
bool DaemonManager::stop(NetworkType::Type nettype)
|
bool DaemonManager::stop(NetworkType::Type nettype)
|
||||||
{
|
{
|
||||||
QString message;
|
QString message;
|
||||||
sendCommand("exit", nettype, message);
|
sendCommand({"exit"}, nettype, message);
|
||||||
qDebug() << message;
|
qDebug() << message;
|
||||||
|
|
||||||
// Start stop watcher - Will kill if not shutting down
|
// Start stop watcher - Will kill if not shutting down
|
||||||
@@ -234,26 +240,27 @@ void DaemonManager::printError()
|
|||||||
bool DaemonManager::running(NetworkType::Type nettype) const
|
bool DaemonManager::running(NetworkType::Type nettype) const
|
||||||
{
|
{
|
||||||
QString status;
|
QString status;
|
||||||
sendCommand("status", nettype, status);
|
sendCommand({"sync_info"}, nettype, status);
|
||||||
qDebug() << status;
|
qDebug() << status;
|
||||||
// `./monerod status` returns BUSY when syncing.
|
return status.contains("Height:");
|
||||||
// Treat busy as connected, until fixed upstream.
|
|
||||||
if (status.contains("Height:") || status.contains("BUSY") ) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
bool DaemonManager::sendCommand(const QString &cmd, NetworkType::Type nettype) const
|
|
||||||
{
|
|
||||||
QString message;
|
|
||||||
return sendCommand(cmd, nettype, message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DaemonManager::sendCommand(const QString &cmd, NetworkType::Type nettype, QString &message) const
|
bool DaemonManager::noSync() const noexcept
|
||||||
|
{
|
||||||
|
return m_noSync;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DaemonManager::runningAsync(NetworkType::Type nettype, const QJSValue& callback) const
|
||||||
|
{
|
||||||
|
m_scheduler.run([this, nettype] {
|
||||||
|
return QJSValueList({running(nettype)});
|
||||||
|
}, callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DaemonManager::sendCommand(const QStringList &cmd, NetworkType::Type nettype, QString &message) const
|
||||||
{
|
{
|
||||||
QProcess p;
|
QProcess p;
|
||||||
QStringList external_cmd;
|
QStringList external_cmd(cmd);
|
||||||
external_cmd << cmd;
|
|
||||||
|
|
||||||
// Add network type flag if needed
|
// Add network type flag if needed
|
||||||
if (nettype == NetworkType::TESTNET)
|
if (nettype == NetworkType::TESTNET)
|
||||||
@@ -272,6 +279,14 @@ bool DaemonManager::sendCommand(const QString &cmd, NetworkType::Type nettype, Q
|
|||||||
return started;
|
return started;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DaemonManager::sendCommandAsync(const QStringList &cmd, NetworkType::Type nettype, const QJSValue& callback) const
|
||||||
|
{
|
||||||
|
m_scheduler.run([this, cmd, nettype] {
|
||||||
|
QString message;
|
||||||
|
return QJSValueList({sendCommand(cmd, nettype, message)});
|
||||||
|
}, callback);
|
||||||
|
}
|
||||||
|
|
||||||
void DaemonManager::exit()
|
void DaemonManager::exit()
|
||||||
{
|
{
|
||||||
qDebug("DaemonManager: exit()");
|
qDebug("DaemonManager: exit()");
|
||||||
|
|||||||
@@ -44,19 +44,21 @@ public:
|
|||||||
|
|
||||||
static DaemonManager * instance(const QStringList *args);
|
static DaemonManager * instance(const QStringList *args);
|
||||||
|
|
||||||
Q_INVOKABLE bool start(const QString &flags, NetworkType::Type nettype, const QString &dataDir = "", const QString &bootstrapNodeAddress = "");
|
Q_INVOKABLE bool start(const QString &flags, NetworkType::Type nettype, const QString &dataDir = "", const QString &bootstrapNodeAddress = "", bool noSync = false);
|
||||||
Q_INVOKABLE bool stop(NetworkType::Type nettype);
|
Q_INVOKABLE bool stop(NetworkType::Type nettype);
|
||||||
|
|
||||||
|
Q_INVOKABLE bool noSync() const noexcept;
|
||||||
// return true if daemon process is started
|
// return true if daemon process is started
|
||||||
Q_INVOKABLE bool running(NetworkType::Type nettype) const;
|
Q_INVOKABLE void runningAsync(NetworkType::Type nettype, const QJSValue& callback) const;
|
||||||
// Send daemon command from qml and prints output in console window.
|
// Send daemon command from qml and prints output in console window.
|
||||||
Q_INVOKABLE bool sendCommand(const QString &cmd, NetworkType::Type nettype) const;
|
Q_INVOKABLE void sendCommandAsync(const QStringList &cmd, NetworkType::Type nettype, const QJSValue& callback) const;
|
||||||
Q_INVOKABLE void exit();
|
Q_INVOKABLE void exit();
|
||||||
Q_INVOKABLE QVariantMap validateDataDir(const QString &dataDir) const;
|
Q_INVOKABLE QVariantMap validateDataDir(const QString &dataDir) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
bool sendCommand(const QString &cmd, NetworkType::Type nettype, QString &message) const;
|
bool running(NetworkType::Type nettype) const;
|
||||||
|
bool sendCommand(const QStringList &cmd, NetworkType::Type nettype, QString &message) const;
|
||||||
bool startWatcher(NetworkType::Type nettype) const;
|
bool startWatcher(NetworkType::Type nettype) const;
|
||||||
bool stopWatcher(NetworkType::Type nettype) const;
|
bool stopWatcher(NetworkType::Type nettype) const;
|
||||||
signals:
|
signals:
|
||||||
@@ -81,8 +83,9 @@ private:
|
|||||||
QString m_monerod;
|
QString m_monerod;
|
||||||
bool m_has_daemon = true;
|
bool m_has_daemon = true;
|
||||||
bool m_app_exit = false;
|
bool m_app_exit = false;
|
||||||
|
bool m_noSync = false;
|
||||||
|
|
||||||
FutureScheduler m_scheduler;
|
mutable FutureScheduler m_scheduler;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DAEMONMANAGER_H
|
#endif // DAEMONMANAGER_H
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ QString UnsignedTransaction::errorString() const
|
|||||||
return QString::fromStdString(m_pimpl->errorString());
|
return QString::fromStdString(m_pimpl->errorString());
|
||||||
}
|
}
|
||||||
|
|
||||||
quint64 UnsignedTransaction::amount(int index) const
|
quint64 UnsignedTransaction::amount(size_t index) const
|
||||||
{
|
{
|
||||||
std::vector<uint64_t> arr = m_pimpl->amount();
|
std::vector<uint64_t> arr = m_pimpl->amount();
|
||||||
if(index > arr.size() - 1)
|
if(index > arr.size() - 1)
|
||||||
@@ -48,7 +48,7 @@ quint64 UnsignedTransaction::amount(int index) const
|
|||||||
return arr[index];
|
return arr[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
quint64 UnsignedTransaction::fee(int index) const
|
quint64 UnsignedTransaction::fee(size_t index) const
|
||||||
{
|
{
|
||||||
std::vector<uint64_t> arr = m_pimpl->fee();
|
std::vector<uint64_t> arr = m_pimpl->fee();
|
||||||
if(index > arr.size() - 1)
|
if(index > arr.size() - 1)
|
||||||
@@ -56,7 +56,7 @@ quint64 UnsignedTransaction::fee(int index) const
|
|||||||
return arr[index];
|
return arr[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
quint64 UnsignedTransaction::mixin(int index) const
|
quint64 UnsignedTransaction::mixin(size_t index) const
|
||||||
{
|
{
|
||||||
std::vector<uint64_t> arr = m_pimpl->mixin();
|
std::vector<uint64_t> arr = m_pimpl->mixin();
|
||||||
if(index > arr.size() - 1)
|
if(index > arr.size() - 1)
|
||||||
|
|||||||
@@ -56,9 +56,9 @@ public:
|
|||||||
|
|
||||||
Status status() const;
|
Status status() const;
|
||||||
QString errorString() const;
|
QString errorString() const;
|
||||||
Q_INVOKABLE quint64 amount(int index) const;
|
Q_INVOKABLE quint64 amount(size_t index) const;
|
||||||
Q_INVOKABLE quint64 fee(int index) const;
|
Q_INVOKABLE quint64 fee(size_t index) const;
|
||||||
Q_INVOKABLE quint64 mixin(int index) const;
|
Q_INVOKABLE quint64 mixin(size_t index) const;
|
||||||
QStringList recipientAddress() const;
|
QStringList recipientAddress() const;
|
||||||
QStringList paymentId() const;
|
QStringList paymentId() const;
|
||||||
quint64 txCount() const;
|
quint64 txCount() const;
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ bool Wallet::store(const QString &path)
|
|||||||
return m_walletImpl->store(path.toStdString());
|
return m_walletImpl->store(path.toStdString());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Wallet::init(const QString &daemonAddress, quint64 upperTransactionLimit, bool isRecovering, bool isRecoveringFromDevice, quint64 restoreHeight)
|
bool Wallet::init(const QString &daemonAddress, bool trustedDaemon, quint64 upperTransactionLimit, bool isRecovering, bool isRecoveringFromDevice, quint64 restoreHeight)
|
||||||
{
|
{
|
||||||
qDebug() << "init non async";
|
qDebug() << "init non async";
|
||||||
if (isRecovering){
|
if (isRecovering){
|
||||||
@@ -221,6 +221,7 @@ bool Wallet::init(const QString &daemonAddress, quint64 upperTransactionLimit, b
|
|||||||
m_walletImpl->setRefreshFromBlockHeight(restoreHeight);
|
m_walletImpl->setRefreshFromBlockHeight(restoreHeight);
|
||||||
}
|
}
|
||||||
m_walletImpl->init(daemonAddress.toStdString(), upperTransactionLimit, m_daemonUsername.toStdString(), m_daemonPassword.toStdString());
|
m_walletImpl->init(daemonAddress.toStdString(), upperTransactionLimit, m_daemonUsername.toStdString(), m_daemonPassword.toStdString());
|
||||||
|
setTrustedDaemon(trustedDaemon);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,7 +232,7 @@ void Wallet::setDaemonLogin(const QString &daemonUsername, const QString &daemon
|
|||||||
m_daemonPassword = daemonPassword;
|
m_daemonPassword = daemonPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wallet::initAsync(const QString &daemonAddress, quint64 upperTransactionLimit, bool isRecovering, bool isRecoveringFromDevice, quint64 restoreHeight)
|
void Wallet::initAsync(const QString &daemonAddress, bool trustedDaemon, quint64 upperTransactionLimit, bool isRecovering, bool isRecoveringFromDevice, quint64 restoreHeight)
|
||||||
{
|
{
|
||||||
qDebug() << "initAsync: " + daemonAddress;
|
qDebug() << "initAsync: " + daemonAddress;
|
||||||
// Change status to disconnected if connected
|
// Change status to disconnected if connected
|
||||||
@@ -240,19 +241,28 @@ void Wallet::initAsync(const QString &daemonAddress, quint64 upperTransactionLim
|
|||||||
emit connectionStatusChanged(m_connectionStatus);
|
emit connectionStatusChanged(m_connectionStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_scheduler.run([this, daemonAddress, upperTransactionLimit, isRecovering, isRecoveringFromDevice, restoreHeight] {
|
m_scheduler.run([this, daemonAddress, trustedDaemon, upperTransactionLimit, isRecovering, isRecoveringFromDevice, restoreHeight] {
|
||||||
bool success = init(daemonAddress, upperTransactionLimit, isRecovering, isRecoveringFromDevice, restoreHeight);
|
bool success = init(daemonAddress, trustedDaemon, upperTransactionLimit, isRecovering, isRecoveringFromDevice, restoreHeight);
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
emit walletCreationHeightChanged();
|
emit walletCreationHeightChanged();
|
||||||
qDebug() << "init async finished - starting refresh";
|
qDebug() << "init async finished - starting refresh";
|
||||||
connected(true);
|
connected(true);
|
||||||
m_walletImpl->startRefresh();
|
m_walletImpl->startRefresh();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Wallet::isHwBacked() const
|
||||||
|
{
|
||||||
|
return m_walletImpl->getDeviceType() != Monero::Wallet::Device_Software;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Wallet::isLedger() const
|
||||||
|
{
|
||||||
|
return m_walletImpl->getDeviceType() == Monero::Wallet::Device_Ledger;
|
||||||
|
}
|
||||||
|
|
||||||
//! create a view only wallet
|
//! create a view only wallet
|
||||||
bool Wallet::createViewOnly(const QString &path, const QString &password) const
|
bool Wallet::createViewOnly(const QString &path, const QString &password) const
|
||||||
{
|
{
|
||||||
@@ -335,6 +345,13 @@ void Wallet::setSubaddressLabel(quint32 accountIndex, quint32 addressIndex, cons
|
|||||||
{
|
{
|
||||||
m_walletImpl->setSubaddressLabel(accountIndex, addressIndex, label.toStdString());
|
m_walletImpl->setSubaddressLabel(accountIndex, addressIndex, label.toStdString());
|
||||||
}
|
}
|
||||||
|
void Wallet::deviceShowAddressAsync(quint32 accountIndex, quint32 addressIndex, const QString &paymentId)
|
||||||
|
{
|
||||||
|
m_scheduler.run([this, accountIndex, addressIndex, paymentId] {
|
||||||
|
m_walletImpl->deviceShowAddress(accountIndex, addressIndex, paymentId.toStdString());
|
||||||
|
emit deviceShowAddressShowed();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void Wallet::refreshHeightAsync()
|
void Wallet::refreshHeightAsync()
|
||||||
{
|
{
|
||||||
@@ -623,6 +640,15 @@ void Wallet::setPaymentId(const QString &paymentId)
|
|||||||
m_paymentId = paymentId;
|
m_paymentId = paymentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Wallet::getCacheAttribute(const QString &key) const {
|
||||||
|
return QString::fromStdString(m_walletImpl->getCacheAttribute(key.toStdString()));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Wallet::setCacheAttribute(const QString &key, const QString &val)
|
||||||
|
{
|
||||||
|
return m_walletImpl->setCacheAttribute(key.toStdString(), val.toStdString());
|
||||||
|
}
|
||||||
|
|
||||||
bool Wallet::setUserNote(const QString &txid, const QString ¬e)
|
bool Wallet::setUserNote(const QString &txid, const QString ¬e)
|
||||||
{
|
{
|
||||||
return m_walletImpl->setUserNote(txid.toStdString(), note.toStdString());
|
return m_walletImpl->setUserNote(txid.toStdString(), note.toStdString());
|
||||||
@@ -937,16 +963,16 @@ Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
|||||||
, m_historyModel(nullptr)
|
, m_historyModel(nullptr)
|
||||||
, m_addressBook(nullptr)
|
, m_addressBook(nullptr)
|
||||||
, m_addressBookModel(nullptr)
|
, m_addressBookModel(nullptr)
|
||||||
, m_subaddress(nullptr)
|
|
||||||
, m_subaddressModel(nullptr)
|
|
||||||
, m_subaddressAccount(nullptr)
|
|
||||||
, m_subaddressAccountModel(nullptr)
|
|
||||||
, m_daemonBlockChainHeight(0)
|
, m_daemonBlockChainHeight(0)
|
||||||
, m_daemonBlockChainHeightTtl(DAEMON_BLOCKCHAIN_HEIGHT_CACHE_TTL_SECONDS)
|
, m_daemonBlockChainHeightTtl(DAEMON_BLOCKCHAIN_HEIGHT_CACHE_TTL_SECONDS)
|
||||||
, m_daemonBlockChainTargetHeight(0)
|
, m_daemonBlockChainTargetHeight(0)
|
||||||
, m_daemonBlockChainTargetHeightTtl(DAEMON_BLOCKCHAIN_TARGET_HEIGHT_CACHE_TTL_SECONDS)
|
, m_daemonBlockChainTargetHeightTtl(DAEMON_BLOCKCHAIN_TARGET_HEIGHT_CACHE_TTL_SECONDS)
|
||||||
, m_connectionStatusTtl(WALLET_CONNECTION_STATUS_CACHE_TTL_SECONDS)
|
, m_connectionStatusTtl(WALLET_CONNECTION_STATUS_CACHE_TTL_SECONDS)
|
||||||
, m_currentSubaddressAccount(0)
|
, m_currentSubaddressAccount(0)
|
||||||
|
, m_subaddress(nullptr)
|
||||||
|
, m_subaddressModel(nullptr)
|
||||||
|
, m_subaddressAccount(nullptr)
|
||||||
|
, m_subaddressAccountModel(nullptr)
|
||||||
, m_scheduler(this)
|
, m_scheduler(this)
|
||||||
{
|
{
|
||||||
m_history = new TransactionHistory(m_walletImpl->history(), this);
|
m_history = new TransactionHistory(m_walletImpl->history(), this);
|
||||||
|
|||||||
@@ -144,11 +144,8 @@ public:
|
|||||||
//! empty path stores in current location
|
//! empty path stores in current location
|
||||||
Q_INVOKABLE bool store(const QString &path = "");
|
Q_INVOKABLE bool store(const QString &path = "");
|
||||||
|
|
||||||
//! initializes wallet
|
|
||||||
Q_INVOKABLE bool init(const QString &daemonAddress, quint64 upperTransactionLimit = 0, bool isRecovering = false, bool isRecoveringFromDevice = false, quint64 restoreHeight = 0);
|
|
||||||
|
|
||||||
//! initializes wallet asynchronously
|
//! initializes wallet asynchronously
|
||||||
Q_INVOKABLE void initAsync(const QString &daemonAddress, quint64 upperTransactionLimit = 0, bool isRecovering = false, bool isRecoveringFromDevice = false, quint64 restoreHeight = 0);
|
Q_INVOKABLE void initAsync(const QString &daemonAddress, bool trustedDaemon = false, quint64 upperTransactionLimit = 0, bool isRecovering = false, bool isRecoveringFromDevice = false, quint64 restoreHeight = 0);
|
||||||
|
|
||||||
// Set daemon rpc user/pass
|
// Set daemon rpc user/pass
|
||||||
Q_INVOKABLE void setDaemonLogin(const QString &daemonUsername = "", const QString &daemonPassword = "");
|
Q_INVOKABLE void setDaemonLogin(const QString &daemonUsername = "", const QString &daemonPassword = "");
|
||||||
@@ -179,6 +176,11 @@ public:
|
|||||||
Q_INVOKABLE void addSubaddress(const QString& label);
|
Q_INVOKABLE void addSubaddress(const QString& label);
|
||||||
Q_INVOKABLE QString getSubaddressLabel(quint32 accountIndex, quint32 addressIndex) const;
|
Q_INVOKABLE QString getSubaddressLabel(quint32 accountIndex, quint32 addressIndex) const;
|
||||||
Q_INVOKABLE void setSubaddressLabel(quint32 accountIndex, quint32 addressIndex, const QString &label);
|
Q_INVOKABLE void setSubaddressLabel(quint32 accountIndex, quint32 addressIndex, const QString &label);
|
||||||
|
Q_INVOKABLE void deviceShowAddressAsync(quint32 accountIndex, quint32 addressIndex, const QString &paymentId);
|
||||||
|
|
||||||
|
//! hw-device backed wallets
|
||||||
|
Q_INVOKABLE bool isHwBacked() const;
|
||||||
|
Q_INVOKABLE bool isLedger() const;
|
||||||
|
|
||||||
//! returns if view only wallet
|
//! returns if view only wallet
|
||||||
Q_INVOKABLE bool viewOnly() const;
|
Q_INVOKABLE bool viewOnly() const;
|
||||||
@@ -288,6 +290,10 @@ public:
|
|||||||
|
|
||||||
void setPaymentId(const QString &paymentId);
|
void setPaymentId(const QString &paymentId);
|
||||||
|
|
||||||
|
//! Namespace your cacheAttribute keys to avoid collisions
|
||||||
|
Q_INVOKABLE bool setCacheAttribute(const QString &key, const QString &val);
|
||||||
|
Q_INVOKABLE QString getCacheAttribute(const QString &key) const;
|
||||||
|
|
||||||
Q_INVOKABLE bool setUserNote(const QString &txid, const QString ¬e);
|
Q_INVOKABLE bool setUserNote(const QString &txid, const QString ¬e);
|
||||||
Q_INVOKABLE QString getUserNote(const QString &txid) const;
|
Q_INVOKABLE QString getUserNote(const QString &txid) const;
|
||||||
Q_INVOKABLE QString getTxKey(const QString &txid) const;
|
Q_INVOKABLE QString getTxKey(const QString &txid) const;
|
||||||
@@ -353,6 +359,7 @@ signals:
|
|||||||
void deviceButtonPressed();
|
void deviceButtonPressed();
|
||||||
void transactionCommitted(bool status, PendingTransaction *t, const QStringList& txid);
|
void transactionCommitted(bool status, PendingTransaction *t, const QStringList& txid);
|
||||||
void heightRefreshed(quint64 walletHeight, quint64 daemonHeight, quint64 targetHeight) const;
|
void heightRefreshed(quint64 walletHeight, quint64 daemonHeight, quint64 targetHeight) const;
|
||||||
|
void deviceShowAddressShowed();
|
||||||
|
|
||||||
// emitted when transaction is created async
|
// emitted when transaction is created async
|
||||||
void transactionCreated(PendingTransaction * transaction, QString address, QString paymentId, quint32 mixinCount);
|
void transactionCreated(PendingTransaction * transaction, QString address, QString paymentId, quint32 mixinCount);
|
||||||
@@ -374,6 +381,9 @@ private:
|
|||||||
//! returns daemon's blockchain target height
|
//! returns daemon's blockchain target height
|
||||||
quint64 daemonBlockChainTargetHeight() const;
|
quint64 daemonBlockChainTargetHeight() const;
|
||||||
|
|
||||||
|
//! initializes wallet
|
||||||
|
bool init(const QString &daemonAddress, bool trustedDaemon, quint64 upperTransactionLimit, bool isRecovering, bool isRecoveringFromDevice, quint64 restoreHeight);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class WalletManager;
|
friend class WalletManager;
|
||||||
friend class WalletListenerImpl;
|
friend class WalletListenerImpl;
|
||||||
@@ -385,6 +395,8 @@ private:
|
|||||||
mutable TransactionHistoryModel * m_historyModel;
|
mutable TransactionHistoryModel * m_historyModel;
|
||||||
mutable TransactionHistorySortFilterModel * m_historySortFilterModel;
|
mutable TransactionHistorySortFilterModel * m_historySortFilterModel;
|
||||||
QString m_paymentId;
|
QString m_paymentId;
|
||||||
|
AddressBook * m_addressBook;
|
||||||
|
mutable AddressBookModel * m_addressBookModel;
|
||||||
mutable QTime m_daemonBlockChainHeightTime;
|
mutable QTime m_daemonBlockChainHeightTime;
|
||||||
mutable quint64 m_daemonBlockChainHeight;
|
mutable quint64 m_daemonBlockChainHeight;
|
||||||
int m_daemonBlockChainHeightTtl;
|
int m_daemonBlockChainHeightTtl;
|
||||||
@@ -396,8 +408,6 @@ private:
|
|||||||
mutable QTime m_connectionStatusTime;
|
mutable QTime m_connectionStatusTime;
|
||||||
mutable bool m_initialized;
|
mutable bool m_initialized;
|
||||||
uint32_t m_currentSubaddressAccount;
|
uint32_t m_currentSubaddressAccount;
|
||||||
AddressBook * m_addressBook;
|
|
||||||
mutable AddressBookModel * m_addressBookModel;
|
|
||||||
Subaddress * m_subaddress;
|
Subaddress * m_subaddress;
|
||||||
mutable SubaddressModel * m_subaddressModel;
|
mutable SubaddressModel * m_subaddressModel;
|
||||||
SubaddressAccount * m_subaddressAccount;
|
SubaddressAccount * m_subaddressAccount;
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ bool WalletManager::localDaemonSynced() const
|
|||||||
|
|
||||||
bool WalletManager::isDaemonLocal(const QString &daemon_address) const
|
bool WalletManager::isDaemonLocal(const QString &daemon_address) const
|
||||||
{
|
{
|
||||||
return Monero::Utils::isAddressLocal(daemon_address.toStdString());
|
return daemon_address.isEmpty() ? false : Monero::Utils::isAddressLocal(daemon_address.toStdString());
|
||||||
}
|
}
|
||||||
|
|
||||||
QString WalletManager::resolveOpenAlias(const QString &address) const
|
QString WalletManager::resolveOpenAlias(const QString &address) const
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ void AddressBookModel::endReset(){
|
|||||||
endResetModel();
|
endResetModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
int AddressBookModel::rowCount(const QModelIndex &parent) const
|
int AddressBookModel::rowCount(const QModelIndex &) const
|
||||||
{
|
{
|
||||||
return m_addressBook->count();
|
return m_addressBook->count();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ void SubaddressAccountModel::endReset(){
|
|||||||
endResetModel();
|
endResetModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
int SubaddressAccountModel::rowCount(const QModelIndex &parent) const
|
int SubaddressAccountModel::rowCount(const QModelIndex &) const
|
||||||
{
|
{
|
||||||
return m_subaddressAccount->count();
|
return m_subaddressAccount->count();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ void SubaddressModel::endReset(){
|
|||||||
endResetModel();
|
endResetModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
int SubaddressModel::rowCount(const QModelIndex &parent) const
|
int SubaddressModel::rowCount(const QModelIndex &) const
|
||||||
{
|
{
|
||||||
return m_subaddress->count();
|
return m_subaddress->count();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ QPair<bool, QFuture<void>> FutureScheduler::run(std::function<void()> function)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QPair<bool, QFuture<QJSValueList>> FutureScheduler::run(std::function<QJSValueList() noexcept> function, const QJSValue &callback) noexcept
|
QPair<bool, QFuture<QJSValueList>> FutureScheduler::run(std::function<QJSValueList() noexcept> function, const QJSValue &callback)
|
||||||
{
|
{
|
||||||
if (!callback.isCallable())
|
if (!callback.isCallable())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ public:
|
|||||||
~FutureScheduler();
|
~FutureScheduler();
|
||||||
|
|
||||||
void shutdownWaitForFinished() noexcept;
|
void shutdownWaitForFinished() noexcept;
|
||||||
|
|
||||||
QPair<bool, QFuture<void>> run(std::function<void()> function) noexcept;
|
QPair<bool, QFuture<void>> run(std::function<void()> function) noexcept;
|
||||||
QPair<bool, QFuture<QJSValueList>> run(std::function<QJSValueList() noexcept> function, const QJSValue &callback) noexcept;
|
QPair<bool, QFuture<QJSValueList>> run(std::function<QJSValueList() noexcept> function, const QJSValue &callback);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool add() noexcept;
|
bool add() noexcept;
|
||||||
@@ -38,7 +38,7 @@ private:
|
|||||||
watcher->moveToThread(schedulerThread);
|
watcher->moveToThread(schedulerThread);
|
||||||
}
|
}
|
||||||
watcher->setParent(this);
|
watcher->setParent(this);
|
||||||
|
|
||||||
return watcher;
|
return watcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,9 +36,9 @@
|
|||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QMutexLocker>
|
#include <QMutexLocker>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include "src/libwalletqt/WalletManager.h"
|
#include "libwalletqt/WalletManager.h"
|
||||||
#include "src/NetworkType.h"
|
#include "NetworkType.h"
|
||||||
#include "src/qt/utils.h"
|
#include "qt/utils.h"
|
||||||
|
|
||||||
#include "KeysFiles.h"
|
#include "KeysFiles.h"
|
||||||
|
|
||||||
|
|||||||
@@ -30,8 +30,8 @@
|
|||||||
#define KEYSFILES_H
|
#define KEYSFILES_H
|
||||||
|
|
||||||
#include <qqmlcontext.h>
|
#include <qqmlcontext.h>
|
||||||
#include "src/libwalletqt/WalletManager.h"
|
#include "libwalletqt/WalletManager.h"
|
||||||
#include "src/NetworkType.h"
|
#include "NetworkType.h"
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
|
|
||||||
class WalletKeysFiles
|
class WalletKeysFiles
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QMetaProperty>
|
#include <QMetaProperty>
|
||||||
|
|
||||||
#include "src/qt/MoneroSettings.h"
|
#include "qt/MoneroSettings.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlmodule moneroSettings 1.0
|
\qmlmodule moneroSettings 1.0
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
#include "src/qt/TailsOS.h"
|
#include "TailsOS.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
bool fileExists(QString path) {
|
bool fileExists(QString path) {
|
||||||
@@ -67,6 +67,7 @@ QString getAccountName(){
|
|||||||
return accountName;
|
return accountName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
QString xdgMime(QApplication &app){
|
QString xdgMime(QApplication &app){
|
||||||
return QString(
|
return QString(
|
||||||
"[Desktop Entry]\n"
|
"[Desktop Entry]\n"
|
||||||
@@ -88,7 +89,6 @@ QString xdgMime(QApplication &app){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void registerXdgMime(QApplication &app){
|
void registerXdgMime(QApplication &app){
|
||||||
#ifdef Q_OS_LINUX
|
|
||||||
// Register desktop entry
|
// Register desktop entry
|
||||||
// - MacOS handled via Info.plist
|
// - MacOS handled via Info.plist
|
||||||
// - Windows handled in the installer by rbrunner7
|
// - Windows handled in the installer by rbrunner7
|
||||||
@@ -111,8 +111,8 @@ void registerXdgMime(QApplication &app){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
fileWrite(filePath, mime);
|
fileWrite(filePath, mime);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QString randomUserAgent(){
|
QString randomUserAgent(){
|
||||||
QStringList urand;
|
QStringList urand;
|
||||||
|
|||||||
@@ -37,8 +37,10 @@ bool fileExists(QString path);
|
|||||||
QByteArray fileOpen(QString path);
|
QByteArray fileOpen(QString path);
|
||||||
bool fileWrite(QString path, QString data);
|
bool fileWrite(QString path, QString data);
|
||||||
QString getAccountName();
|
QString getAccountName();
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
QString xdgMime(QApplication &app);
|
QString xdgMime(QApplication &app);
|
||||||
void registerXdgMime(QApplication &app);
|
void registerXdgMime(QApplication &app);
|
||||||
|
#endif
|
||||||
const static QRegExp reURI = QRegExp("^\\w+:\\/\\/([\\w+\\-?\\-_\\-=\\-&]+)");
|
const static QRegExp reURI = QRegExp("^\\w+:\\/\\/([\\w+\\-?\\-_\\-=\\-&]+)");
|
||||||
QString randomUserAgent();
|
QString randomUserAgent();
|
||||||
|
|
||||||
|
|||||||