Merge pull request #1206
Look at the PR, I'm not listing the commits here
314
LeftPanel.qml
|
@ -27,6 +27,7 @@
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import moneroComponents.Wallet 1.0
|
import moneroComponents.Wallet 1.0
|
||||||
import moneroComponents.NetworkType 1.0
|
import moneroComponents.NetworkType 1.0
|
||||||
|
@ -36,12 +37,15 @@ Rectangle {
|
||||||
id: panel
|
id: panel
|
||||||
|
|
||||||
property alias unlockedBalanceText: unlockedBalanceText.text
|
property alias unlockedBalanceText: unlockedBalanceText.text
|
||||||
|
property alias unlockedBalanceVisible: unlockedBalanceText.visible
|
||||||
|
property alias unlockedBalanceLabelVisible: unlockedBalanceLabel.visible
|
||||||
property alias balanceLabelText: balanceLabel.text
|
property alias balanceLabelText: balanceLabel.text
|
||||||
property alias balanceText: balanceText.text
|
property alias balanceText: balanceText.text
|
||||||
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 alias minutesToUnlockTxt: unlockedBalanceLabel.text
|
||||||
|
property int titleBarHeight: 50
|
||||||
|
|
||||||
signal dashboardClicked()
|
signal dashboardClicked()
|
||||||
signal historyClicked()
|
signal historyClicked()
|
||||||
|
@ -72,178 +76,178 @@ Rectangle {
|
||||||
menuColumn.previousButton.checked = true
|
menuColumn.previousButton.checked = true
|
||||||
}
|
}
|
||||||
|
|
||||||
width: (isMobile)? appWindow.width : 260
|
width: (isMobile)? appWindow.width : 300
|
||||||
color: "#FFFFFF"
|
color: "transparent"
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
|
||||||
// Item with monero logo
|
Image {
|
||||||
Item {
|
|
||||||
visible: !isMobile
|
|
||||||
id: logoItem
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: (persistentSettings.customDecorations)? 66 : 36
|
height: panel.height
|
||||||
height: logo.implicitHeight
|
source: "images/leftPanelBg.jpg"
|
||||||
|
z: 1
|
||||||
Image {
|
|
||||||
id: logo
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 50
|
|
||||||
source: "images/moneroLogo.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: viewOnlyLabel
|
|
||||||
visible: viewOnly
|
|
||||||
text: qsTr("View Only") + translationManager.emptyString
|
|
||||||
anchors.top: logo.bottom
|
|
||||||
anchors.topMargin: 5
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 50
|
|
||||||
font.bold: true
|
|
||||||
color: "blue"
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: testnetLabel
|
|
||||||
visible: persistentSettings.nettype !== NetworkType.MAINNET
|
|
||||||
text: (persistentSettings.nettype === NetworkType.TESTNET ? qsTr("Testnet") : qsTr("Stagenet")) + translationManager.emptyString
|
|
||||||
anchors.top: logo.bottom
|
|
||||||
anchors.topMargin: 5
|
|
||||||
anchors.left: viewOnly ? viewOnlyLabel.right : parent.left
|
|
||||||
anchors.leftMargin: viewOnly ? 10 : 50
|
|
||||||
font.bold: true
|
|
||||||
color: "red"
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Disable twitter/news panel
|
|
||||||
Image {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.verticalCenter: logo.verticalCenter
|
|
||||||
anchors.leftMargin: 19
|
|
||||||
source: appWindow.rightPanelExpanded ? "images/expandRightPanel.png" :
|
|
||||||
"images/collapseRightPanel.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: appWindow.rightPanelExpanded = !appWindow.rightPanelExpanded
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// card with monero logo
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
visible: !isMobile
|
visible: true
|
||||||
|
z: 2
|
||||||
id: column1
|
id: column1
|
||||||
|
height: 200
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: logoItem.bottom
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 26
|
anchors.topMargin: (persistentSettings.customDecorations)? 50 : 0
|
||||||
spacing: 5
|
|
||||||
|
|
||||||
Label {
|
RowLayout {
|
||||||
visible: !isMobile
|
visible: true
|
||||||
id: balanceLabel
|
|
||||||
text: qsTr("Balance") + translationManager.emptyString
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 50
|
|
||||||
}
|
|
||||||
|
|
||||||
Row {
|
|
||||||
visible: !isMobile
|
|
||||||
Item {
|
Item {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 20
|
||||||
|
anchors.leftMargin: 20
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
height: 26 * scaleRatio
|
height: 490 * scaleRatio
|
||||||
width: 50 * scaleRatio
|
width: 259 * scaleRatio
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.centerIn: parent
|
width: 259; height: 170
|
||||||
source: "images/lockIcon.png"
|
fillMode: Image.PreserveAspectFit
|
||||||
|
source: "images/card-background.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: testnetLabel
|
||||||
|
visible: persistentSettings.nettype != NetworkType.MAINNET
|
||||||
|
text: (persistentSettings.nettype == NetworkType.TESTNET ? qsTr("Testnet") : qsTr("Stagenet")) + translationManager.emptyString
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 8
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 192
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 12
|
||||||
|
color: "#f33434"
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: viewOnlyLabel
|
||||||
|
visible: viewOnly
|
||||||
|
text: qsTr("View Only") + translationManager.emptyString
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 8
|
||||||
|
anchors.right: testnetLabel.visible ? testnetLabel.left : parent.right
|
||||||
|
anchors.rightMargin: 8
|
||||||
|
font.pixelSize: 12
|
||||||
|
font.bold: true
|
||||||
|
color: "#ff9323"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Item {
|
||||||
visible: !isMobile
|
anchors.left: parent.left
|
||||||
id: balanceText
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 20
|
||||||
|
anchors.leftMargin: 20
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
font.family: "Arial"
|
height: 490 * scaleRatio
|
||||||
color: "#000000"
|
width: 50 * scaleRatio
|
||||||
text: "N/A"
|
|
||||||
// dynamically adjust text size
|
Text {
|
||||||
font.pixelSize: {
|
visible: !isMobile
|
||||||
var digits = text.split('.')[0].length
|
id: balanceText
|
||||||
var defaultSize = 25;
|
anchors.left: parent.left
|
||||||
if(digits > 2) {
|
anchors.leftMargin: 20
|
||||||
return defaultSize - 1.1*digits
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 76
|
||||||
|
font.family: "Arial"
|
||||||
|
color: "#FFFFFF"
|
||||||
|
text: "N/A"
|
||||||
|
// dynamically adjust text size
|
||||||
|
font.pixelSize: {
|
||||||
|
var digits = text.split('.')[0].length
|
||||||
|
var defaultSize = 22;
|
||||||
|
if(digits > 2) {
|
||||||
|
return defaultSize - 1.1*digits
|
||||||
|
}
|
||||||
|
return defaultSize;
|
||||||
}
|
}
|
||||||
return defaultSize;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item { //separator
|
Text {
|
||||||
anchors.left: parent.left
|
id: unlockedBalanceText
|
||||||
anchors.right: parent.right
|
visible: false
|
||||||
height: 1
|
anchors.left: parent.left
|
||||||
}
|
anchors.leftMargin: 20
|
||||||
|
anchors.top: parent.top
|
||||||
Label {
|
anchors.topMargin: 126
|
||||||
id: unlockedBalanceLabel
|
font.family: "Arial"
|
||||||
text: qsTr("Unlocked balance") + translationManager.emptyString
|
color: "#FFFFFF"
|
||||||
anchors.left: parent.left
|
text: "N/A"
|
||||||
anchors.leftMargin: 50
|
// dynamically adjust text size
|
||||||
}
|
font.pixelSize: {
|
||||||
|
var digits = text.split('.')[0].length
|
||||||
Text {
|
var defaultSize = 20;
|
||||||
id: unlockedBalanceText
|
if(digits > 3) {
|
||||||
anchors.left: parent.left
|
return defaultSize - 0.6*digits
|
||||||
anchors.leftMargin: 50
|
}
|
||||||
font.family: "Arial"
|
return defaultSize;
|
||||||
color: "#000000"
|
}
|
||||||
text: "N/A"
|
|
||||||
// dynamically adjust text size
|
|
||||||
font.pixelSize: {
|
|
||||||
var digits = text.split('.')[0].length
|
|
||||||
var defaultSize = 18;
|
|
||||||
if(digits > 3) {
|
|
||||||
return defaultSize - 0.6*digits
|
|
||||||
}
|
}
|
||||||
return defaultSize;
|
|
||||||
|
Label {
|
||||||
|
id: unlockedBalanceLabel
|
||||||
|
visible: false
|
||||||
|
text: qsTr("Unlocked balance") + translationManager.emptyString
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 20
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 110
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
visible: !isMobile
|
||||||
|
id: balanceLabel
|
||||||
|
text: qsTr("Balance") + translationManager.emptyString
|
||||||
|
fontSize: 14
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 20
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 60
|
||||||
|
}
|
||||||
|
Item { //separator
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
height: 1
|
||||||
|
}
|
||||||
|
/* Disable twitter/news panel
|
||||||
|
Image {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.verticalCenter: logo.verticalCenter
|
||||||
|
anchors.leftMargin: 19
|
||||||
|
source: appWindow.rightPanelExpanded ? "images/expandRightPanel.png" :
|
||||||
|
"images/collapseRightPanel.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: appWindow.rightPanelExpanded = !appWindow.rightPanelExpanded
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.bottom: menuRect.top
|
|
||||||
width: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
height: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: menuRect
|
id: menuRect
|
||||||
|
z: 2
|
||||||
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: (isMobile)? parent.top : column1.bottom
|
||||||
anchors.topMargin: (isMobile)? 0 : 25
|
anchors.topMargin: (isMobile)? 0 : 32
|
||||||
color: "#1C1C1C"
|
color: "transparent"
|
||||||
|
|
||||||
|
|
||||||
Flickable {
|
Flickable {
|
||||||
|
@ -285,11 +289,19 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
color: dashboardButton.checked || transferButton.checked ? "#1C1C1C" : "#505050"
|
color: dashboardButton.checked || transferButton.checked ? "#1C1C1C" : "#313131"
|
||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// top border
|
||||||
|
Rectangle {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.leftMargin: 16
|
||||||
|
color: "#313131"
|
||||||
|
height: 1
|
||||||
|
}
|
||||||
|
|
||||||
// ------------- Transfer tab ---------------
|
// ------------- Transfer tab ---------------
|
||||||
MenuButton {
|
MenuButton {
|
||||||
|
@ -311,7 +323,7 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
color: "#505050"
|
color: "#313131"
|
||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,7 +349,7 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
color: "#505050"
|
color: "#313131"
|
||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,7 +372,7 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
color: "#505050"
|
color: "#313131"
|
||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,7 +396,7 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
color: "#505050"
|
color: "#313131"
|
||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,7 +418,7 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
color: "#505050"
|
color: "#313131"
|
||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,7 +444,7 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
color: miningButton.checked || settingsButton.checked ? "#1C1C1C" : "#505050"
|
color: miningButton.checked || settingsButton.checked ? "#1C1C1C" : "#313131"
|
||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
// ------------- TxKey tab ---------------
|
// ------------- TxKey tab ---------------
|
||||||
|
@ -455,7 +467,7 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
color: "#505050"
|
color: "#313131"
|
||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
// ------------- Shared RingDB tab ---------------
|
// ------------- Shared RingDB tab ---------------
|
||||||
|
@ -478,7 +490,7 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
color: "#505050"
|
color: "#313131"
|
||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -503,7 +515,7 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
color: "#505050"
|
color: "#313131"
|
||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
// ------------- Settings tab ---------------
|
// ------------- Settings tab ---------------
|
||||||
|
@ -525,7 +537,7 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
color: "#505050"
|
color: "#313131"
|
||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
// ------------- Sign/verify tab ---------------
|
// ------------- Sign/verify tab ---------------
|
||||||
|
@ -548,7 +560,7 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
color: "#505050"
|
color: "#313131"
|
||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -560,6 +572,8 @@ Rectangle {
|
||||||
id: networkStatus
|
id: networkStatus
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
anchors.leftMargin: 4
|
||||||
|
anchors.rightMargin: 4
|
||||||
anchors.bottom: (progressBar.visible)? progressBar.top : parent.bottom;
|
anchors.bottom: (progressBar.visible)? progressBar.top : parent.bottom;
|
||||||
connected: Wallet.ConnectionStatus_Disconnected
|
connected: Wallet.ConnectionStatus_Disconnected
|
||||||
height: 58 * scaleRatio
|
height: 58 * scaleRatio
|
||||||
|
@ -580,9 +594,9 @@ 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
|
||||||
height: 35 * scaleRatio
|
|
||||||
syncType: qsTr("Daemon")
|
syncType: qsTr("Daemon")
|
||||||
visible: networkStatus.connected
|
visible: networkStatus.connected
|
||||||
|
height: 62 * scaleRatio
|
||||||
}
|
}
|
||||||
} // menuRect
|
} // menuRect
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ Rectangle {
|
||||||
property string unlockedBalanceLabelText: qsTr("Unlocked Balance") + translationManager.emptyString
|
property string unlockedBalanceLabelText: qsTr("Unlocked Balance") + translationManager.emptyString
|
||||||
property string unlockedBalanceText
|
property string unlockedBalanceText
|
||||||
property int minHeight: (appWindow.height > 800) ? appWindow.height : 800 * scaleRatio
|
property int minHeight: (appWindow.height > 800) ? appWindow.height : 800 * scaleRatio
|
||||||
|
property alias contentHeight: mainFlickable.contentHeight
|
||||||
// property int headerHeight: header.height
|
// property int headerHeight: header.height
|
||||||
|
|
||||||
property Transfer transferView: Transfer { }
|
property Transfer transferView: Transfer { }
|
||||||
|
@ -69,7 +70,13 @@ Rectangle {
|
||||||
signal getProofClicked(string txid, string address, string message);
|
signal getProofClicked(string txid, string address, string message);
|
||||||
signal checkProofClicked(string txid, string address, string message, string signature);
|
signal checkProofClicked(string txid, string address, string message, string signature);
|
||||||
|
|
||||||
color: "#F0EEEE"
|
Image {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
source: "../images/middlePanelBg.jpg"
|
||||||
|
}
|
||||||
|
|
||||||
onCurrentViewChanged: {
|
onCurrentViewChanged: {
|
||||||
if (previousView) {
|
if (previousView) {
|
||||||
|
@ -105,7 +112,7 @@ Rectangle {
|
||||||
name: "History"
|
name: "History"
|
||||||
PropertyChanges { target: root; currentView: historyView }
|
PropertyChanges { target: root; currentView: historyView }
|
||||||
PropertyChanges { target: historyView; model: appWindow.currentWallet ? appWindow.currentWallet.historyModel : null }
|
PropertyChanges { target: historyView; model: appWindow.currentWallet ? appWindow.currentWallet.historyModel : null }
|
||||||
PropertyChanges { target: mainFlickable; contentHeight: minHeight }
|
PropertyChanges { target: mainFlickable; contentHeight: historyView.tableHeight + 220 * scaleRatio }
|
||||||
}, State {
|
}, State {
|
||||||
name: "Transfer"
|
name: "Transfer"
|
||||||
PropertyChanges { target: root; currentView: transferView }
|
PropertyChanges { target: root; currentView: transferView }
|
||||||
|
@ -117,7 +124,7 @@ Rectangle {
|
||||||
}, State {
|
}, State {
|
||||||
name: "TxKey"
|
name: "TxKey"
|
||||||
PropertyChanges { target: root; currentView: txkeyView }
|
PropertyChanges { target: root; currentView: txkeyView }
|
||||||
PropertyChanges { target: mainFlickable; contentHeight: minHeight }
|
PropertyChanges { target: mainFlickable; contentHeight: 1200 * scaleRatio }
|
||||||
}, State {
|
}, State {
|
||||||
name: "SharedRingDB"
|
name: "SharedRingDB"
|
||||||
PropertyChanges { target: root; currentView: sharedringdbView }
|
PropertyChanges { target: root; currentView: sharedringdbView }
|
||||||
|
@ -129,11 +136,11 @@ Rectangle {
|
||||||
}, State {
|
}, State {
|
||||||
name: "Sign"
|
name: "Sign"
|
||||||
PropertyChanges { target: root; currentView: signView }
|
PropertyChanges { target: root; currentView: signView }
|
||||||
PropertyChanges { target: mainFlickable; contentHeight: minHeight }
|
PropertyChanges { target: mainFlickable; contentHeight: 1200 * scaleRatio }
|
||||||
}, State {
|
}, State {
|
||||||
name: "Settings"
|
name: "Settings"
|
||||||
PropertyChanges { target: root; currentView: settingsView }
|
PropertyChanges { target: root; currentView: settingsView }
|
||||||
PropertyChanges { target: mainFlickable; contentHeight: 1200 * scaleRatio }
|
PropertyChanges { target: mainFlickable; contentHeight: 1400 * scaleRatio }
|
||||||
}, State {
|
}, State {
|
||||||
name: "Mining"
|
name: "Mining"
|
||||||
PropertyChanges { target: root; currentView: miningView }
|
PropertyChanges { target: root; currentView: miningView }
|
||||||
|
@ -163,8 +170,8 @@ Rectangle {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 2
|
anchors.margins: 18
|
||||||
anchors.topMargin: appWindow.persistentSettings.customDecorations ? 30 : 0
|
anchors.topMargin: appWindow.persistentSettings.customDecorations ? 50 : 0
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Flickable {
|
Flickable {
|
||||||
|
@ -212,30 +219,14 @@ Rectangle {
|
||||||
|
|
||||||
}// flickable
|
}// flickable
|
||||||
}
|
}
|
||||||
|
|
||||||
// border
|
// border
|
||||||
Rectangle {
|
|
||||||
anchors.top: styledRow.bottom
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.right: parent.right
|
|
||||||
width: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.top: styledRow.bottom
|
anchors.top: styledRow.bottom
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
width: 1
|
width: 1
|
||||||
color: "#DBDBDB"
|
color: "#313131"
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
height: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* connect "payment" click */
|
/* connect "payment" click */
|
||||||
|
|
|
@ -37,13 +37,13 @@ ListView {
|
||||||
footer: Rectangle {
|
footer: Rectangle {
|
||||||
height: 127
|
height: 127
|
||||||
width: listView.width
|
width: listView.width
|
||||||
color: "#FFFFFF"
|
color: "transparent"
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
font.family: "Arial"
|
font.family: "Arial"
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
color: "#545454"
|
color: "#808080"
|
||||||
text: qsTr("No more results") + translationManager.emptyString
|
text: qsTr("No more results") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ ListView {
|
||||||
id: delegate
|
id: delegate
|
||||||
height: 64
|
height: 64
|
||||||
width: listView.width
|
width: listView.width
|
||||||
color: index % 2 ? "#F8F8F8" : "#FFFFFF"
|
color: "transparent"
|
||||||
z: listView.count - index
|
z: listView.count - index
|
||||||
function collapseDropdown() { dropdown.expanded = false }
|
function collapseDropdown() { dropdown.expanded = false }
|
||||||
|
|
||||||
|
@ -62,11 +62,11 @@ ListView {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 12
|
anchors.topMargin: 12
|
||||||
width: text.length ? (descriptionArea.containsMouse ? dropdown.x - x - 12 : 139) : 0
|
width: text.length ? (descriptionArea.containsMouse ? 139 : 139) : 0
|
||||||
font.family: "Arial"
|
font.family: "Arial"
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: 19
|
font.pixelSize: 19
|
||||||
color: "#444444"
|
color: "#ffffff"
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: description
|
text: description
|
||||||
|
|
||||||
|
@ -87,8 +87,9 @@ ListView {
|
||||||
anchors.rightMargin: 40
|
anchors.rightMargin: 40
|
||||||
font.family: "Arial"
|
font.family: "Arial"
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
color: "#545454"
|
color: "#ffffff"
|
||||||
text: address
|
text: address
|
||||||
|
readOnly: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
@ -100,7 +101,7 @@ ListView {
|
||||||
width: 139
|
width: 139
|
||||||
font.family: "Arial"
|
font.family: "Arial"
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
color: "#535353"
|
color: "#ffffff"
|
||||||
text: qsTr("Payment ID:") + translationManager.emptyString
|
text: qsTr("Payment ID:") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +112,7 @@ ListView {
|
||||||
anchors.leftMargin: 12
|
anchors.leftMargin: 12
|
||||||
anchors.rightMargin: 12
|
anchors.rightMargin: 12
|
||||||
anchors.right: dropdown.left
|
anchors.right: dropdown.left
|
||||||
|
readOnly: true
|
||||||
|
|
||||||
font.family: "Arial"
|
font.family: "Arial"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
|
@ -164,7 +165,7 @@ ListView {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
height: 1
|
height: 1
|
||||||
color: "#DBDBDB"
|
color: "#404040"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,11 +28,12 @@
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: checkBox
|
id: checkBox
|
||||||
property alias text: label.text
|
property alias text: label.text
|
||||||
property string checkedIcon
|
property string checkedIcon: "../images/checkedIcon-black.png"
|
||||||
property string uncheckedIcon
|
property string uncheckedIcon
|
||||||
property bool checked: false
|
property bool checked: false
|
||||||
property alias background: backgroundRect.color
|
property alias background: backgroundRect.color
|
||||||
|
@ -52,9 +53,10 @@ RowLayout {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
width: 25 * scaleRatio
|
width: 25 * scaleRatio
|
||||||
height: checkBox.height - 1
|
height: checkBox.height - 1
|
||||||
//radius: 4
|
radius: 3
|
||||||
y: 0
|
y: 0
|
||||||
color: "#DBDBDB"
|
color: "transparent"
|
||||||
|
border.color: checkBox.checked ? Qt.rgba(1, 1, 1, 0.35) : Qt.rgba(1, 1, 1, 0.25)
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -64,16 +66,17 @@ RowLayout {
|
||||||
height: checkBox.height - 1
|
height: checkBox.height - 1
|
||||||
//radius: 4
|
//radius: 4
|
||||||
y: 1
|
y: 1
|
||||||
color: "#FFFFFF"
|
color: "transparent"
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
source: checkBox.checked ? checkBox.checkedIcon :
|
source: checkBox.checkedIcon
|
||||||
checkBox.uncheckedIcon
|
visible: checkBox.checked
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
toggle()
|
toggle()
|
||||||
}
|
}
|
||||||
|
@ -82,13 +85,16 @@ RowLayout {
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: label
|
id: label
|
||||||
font.family: "Arial"
|
font.family: Style.fontRegular.name
|
||||||
font.pixelSize: checkBox.fontSize
|
font.pixelSize: checkBox.fontSize
|
||||||
color: "#525252"
|
color: Style.defaultFontColor
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
anchors.left: backgroundRect.right
|
||||||
|
anchors.leftMargin: !isMobile ? 10 : 8
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
toggle()
|
toggle()
|
||||||
}
|
}
|
||||||
|
|
98
components/CheckBox2.qml
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
// Copyright (c) 2014-2015, The Monero Project
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
|
// materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
|
// used to endorse or promote products derived from this software without specific
|
||||||
|
// prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: checkBox
|
||||||
|
property alias text: label.text
|
||||||
|
property string checkedIcon: "../images/checkedIcon-black.png"
|
||||||
|
property string uncheckedIcon
|
||||||
|
property bool checked: false
|
||||||
|
property string background: "backgroundRect.color"
|
||||||
|
property int fontSize: 14 * scaleRatio
|
||||||
|
property alias fontColor: label.color
|
||||||
|
property int textMargin: 8 * scaleRatio
|
||||||
|
signal clicked()
|
||||||
|
height: 25 * scaleRatio
|
||||||
|
|
||||||
|
function toggle(){
|
||||||
|
checkBox.checked = !checkBox.checked
|
||||||
|
checkBox.clicked()
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
height: label.height
|
||||||
|
width: (label.width + indicatorRect.width + checkBox.textMargin)
|
||||||
|
color: "transparent"
|
||||||
|
anchors.left: parent.left
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: label
|
||||||
|
font.family: Style.fontLight.name
|
||||||
|
font.pixelSize: checkBox.fontSize
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
Layout.fillWidth: true
|
||||||
|
anchors.left: parent.left
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: indicatorRect
|
||||||
|
width: indicatorImage.width
|
||||||
|
height: label.height
|
||||||
|
anchors.left: label.right
|
||||||
|
anchors.leftMargin: textMargin
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: indicatorImage
|
||||||
|
anchors.centerIn: parent
|
||||||
|
source: "../images/whiteDropIndicator.png"
|
||||||
|
rotation: checkBox.checked ? 180 * scaleRatio : 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea{
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: {
|
||||||
|
toggle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -110,10 +110,6 @@ Window {
|
||||||
id: okButton
|
id: okButton
|
||||||
width: 120
|
width: 120
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
text: qsTr("Close") + translationManager.emptyString
|
text: qsTr("Close") + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.close()
|
root.close()
|
||||||
|
@ -138,10 +134,6 @@ Window {
|
||||||
// id: sendCommandButton
|
// id: sendCommandButton
|
||||||
// enabled: sendCommandText.text.length > 0
|
// enabled: sendCommandText.text.length > 0
|
||||||
// fontSize: 14
|
// fontSize: 14
|
||||||
// shadowReleasedColor: "#FF4304"
|
|
||||||
// shadowPressedColor: "#B32D00"
|
|
||||||
// releasedColor: "#FF6C3C"
|
|
||||||
// pressedColor: "#FF4304"
|
|
||||||
// text: qsTr("Send command")
|
// text: qsTr("Send command")
|
||||||
// onClicked: {
|
// onClicked: {
|
||||||
// daemonManager.sendCommand(sendCommandText.text,currentWallet.testnet);
|
// daemonManager.sendCommand(sendCommandText.text,currentWallet.testnet);
|
||||||
|
|
|
@ -108,10 +108,6 @@ Window {
|
||||||
id: okButton
|
id: okButton
|
||||||
visible:false
|
visible:false
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
text: qsTr("Start daemon (%1)").arg(countDown)
|
text: qsTr("Start daemon (%1)").arg(countDown)
|
||||||
KeyNavigation.tab: cancelButton
|
KeyNavigation.tab: cancelButton
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -125,10 +121,6 @@ Window {
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: cancelButton
|
id: cancelButton
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
text: qsTr("Use custom settings")
|
text: qsTr("Use custom settings")
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
@ -29,18 +29,23 @@
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
import QtQuick.Controls 1.2
|
import QtQuick.Controls 1.2
|
||||||
import QtQuick.Controls.Styles 1.2
|
import QtQuick.Controls.Styles 1.2
|
||||||
|
import "../components"
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: datePicker
|
id: datePicker
|
||||||
property bool expanded: false
|
property bool expanded: false
|
||||||
property date currentDate
|
property date currentDate
|
||||||
property bool showCurrentDate: true
|
property bool showCurrentDate: true
|
||||||
property color backgroundColor : "#FFFFFF"
|
property color backgroundColor : "#404040"
|
||||||
property color errorColor : "#FFDDDD"
|
property color errorColor : "red"
|
||||||
property bool error: false
|
property bool error: false
|
||||||
|
property alias inputLabel: inputLabel
|
||||||
|
|
||||||
height: 37
|
signal dateChanged();
|
||||||
width: 156
|
|
||||||
|
height: 50
|
||||||
|
|
||||||
onExpandedChanged: if(expanded) appWindow.currentItem = datePicker
|
onExpandedChanged: if(expanded) appWindow.currentItem = datePicker
|
||||||
|
|
||||||
|
@ -57,28 +62,49 @@ Item {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: inputLabelRect
|
||||||
|
color: "transparent"
|
||||||
|
height: 22
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: inputLabel
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 2
|
||||||
|
anchors.left: parent.left
|
||||||
|
font.family: Style.fontLight.name
|
||||||
|
font.pixelSize: 14
|
||||||
|
font.bold: false
|
||||||
|
textFormat: Text.RichText
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.NoButton
|
||||||
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: head
|
id: head
|
||||||
anchors.fill: parent
|
anchors.top: inputLabelRect.bottom
|
||||||
Rectangle {
|
anchors.topMargin: 6 * scaleRatio
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
height: parent.height
|
height: 28
|
||||||
//radius: 4
|
|
||||||
y: 0
|
|
||||||
color: "#DBDBDB"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
height: parent.height - 1
|
height: parent.height - 1
|
||||||
anchors.leftMargin: datePicker.expanded ? 1 : 0
|
anchors.leftMargin: datePicker.expanded ? 1 : 0
|
||||||
anchors.rightMargin: datePicker.expanded ? 1 : 0
|
anchors.rightMargin: datePicker.expanded ? 1 : 0
|
||||||
//radius: 4
|
radius: 4
|
||||||
y: 1
|
y: 1
|
||||||
color: datePicker.error ? datePicker.errorColor : datePicker.backgroundColor
|
color: datePicker.backgroundColor
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -89,28 +115,18 @@ Item {
|
||||||
anchors.margins: 4
|
anchors.margins: 4
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
StandardButton {
|
|
||||||
id: button
|
|
||||||
anchors.fill: parent
|
|
||||||
shadowReleasedColor: "#DBDBDB"
|
|
||||||
shadowPressedColor: "#888888"
|
|
||||||
releasedColor: "#F0EEEE"
|
|
||||||
pressedColor: "#DBDBDB"
|
|
||||||
icon: "../images/datePicker.png"
|
|
||||||
visible: !datePicker.expanded
|
|
||||||
onClicked: datePicker.expanded = true
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
id: button
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
source: "../images/datePicker.png"
|
source: "../images/whiteDropIndicator.png"
|
||||||
visible: datePicker.expanded
|
rotation: datePicker.expanded ? 180 : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
enabled: datePicker.expanded
|
onClicked: datePicker.expanded = !datePicker.expanded
|
||||||
onClicked: datePicker.expanded = false
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +137,7 @@ Item {
|
||||||
anchors.rightMargin: 4
|
anchors.rightMargin: 4
|
||||||
height: 16
|
height: 16
|
||||||
width: 1
|
width: 1
|
||||||
color: "#DBDBDB"
|
color: "#808080"
|
||||||
visible: datePicker.expanded
|
visible: datePicker.expanded
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,9 +166,9 @@ Item {
|
||||||
id: dayInput
|
id: dayInput
|
||||||
readOnly: true
|
readOnly: true
|
||||||
width: 22
|
width: 22
|
||||||
font.family: "Arial"
|
font.family: Style.fontRegular.name
|
||||||
font.pixelSize: 18
|
font.pixelSize: 14
|
||||||
// color: "#525252"
|
color: datePicker.error ? errorColor : Style.defaultFontColor
|
||||||
maximumLength: 2
|
maximumLength: 2
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
horizontalAlignment: TextInput.AlignHCenter
|
||||||
validator: IntValidator{bottom: 01; top: 31;}
|
validator: IntValidator{bottom: 01; top: 31;}
|
||||||
|
@ -173,19 +189,19 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
font.family: "Arial"
|
font.family: Style.fontRegular.name
|
||||||
font.pixelSize: 18
|
font.pixelSize: 14
|
||||||
// color: "#525252"
|
color: datePicker.error ? errorColor : Style.defaultFontColor
|
||||||
text: "."
|
text: "-"
|
||||||
}
|
}
|
||||||
|
|
||||||
TextInput {
|
TextInput {
|
||||||
id: monthInput
|
id: monthInput
|
||||||
readOnly: true
|
readOnly: true
|
||||||
width: 22
|
width: 22
|
||||||
font.family: "Arial"
|
font.family: Style.fontRegular.name
|
||||||
font.pixelSize: 18
|
font.pixelSize: 14
|
||||||
// color: "#525252"
|
color: datePicker.error ? errorColor : Style.defaultFontColor
|
||||||
maximumLength: 2
|
maximumLength: 2
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
horizontalAlignment: TextInput.AlignHCenter
|
||||||
validator: IntValidator{bottom: 01; top: 12;}
|
validator: IntValidator{bottom: 01; top: 12;}
|
||||||
|
@ -205,18 +221,18 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
font.family: "Arial"
|
font.family: Style.fontRegular.name
|
||||||
font.pixelSize: 18
|
font.pixelSize: 14
|
||||||
// color: "#525252"
|
color: datePicker.error ? errorColor : Style.defaultFontColor
|
||||||
text: "."
|
text: "-"
|
||||||
}
|
}
|
||||||
|
|
||||||
TextInput {
|
TextInput {
|
||||||
id: yearInput
|
id: yearInput
|
||||||
width: 44
|
width: 44
|
||||||
font.family: "Arial"
|
font.family: Style.fontRegular.name
|
||||||
font.pixelSize: 18
|
font.pixelSize: 14
|
||||||
/// color: "#525252"
|
color: datePicker.error ? errorColor : Style.defaultFontColor
|
||||||
maximumLength: 4
|
maximumLength: 4
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
horizontalAlignment: TextInput.AlignHCenter
|
||||||
validator: IntValidator{bottom: 1000; top: 9999;}
|
validator: IntValidator{bottom: 1000; top: 9999;}
|
||||||
|
@ -272,6 +288,7 @@ Item {
|
||||||
gridVisible: false
|
gridVisible: false
|
||||||
background: Rectangle { color: "transparent" }
|
background: Rectangle { color: "transparent" }
|
||||||
dayDelegate: Item {
|
dayDelegate: Item {
|
||||||
|
z: parent.z + 1
|
||||||
implicitHeight: implicitWidth
|
implicitHeight: implicitWidth
|
||||||
implicitWidth: calendar.width / 7
|
implicitWidth: calendar.width / 7
|
||||||
|
|
||||||
|
@ -308,6 +325,8 @@ Item {
|
||||||
calendar.showNextMonth()
|
calendar.showNextMonth()
|
||||||
else calendar.showPreviousMonth()
|
else calendar.showPreviousMonth()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dateChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,8 @@ import QtQuick 2.0
|
||||||
import moneroComponents.Clipboard 1.0
|
import moneroComponents.Clipboard 1.0
|
||||||
import moneroComponents.AddressBookModel 1.0
|
import moneroComponents.AddressBookModel 1.0
|
||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
|
import "../js/TxUtils.js" as TxUtils
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: listView
|
id: listView
|
||||||
|
@ -65,11 +67,10 @@ ListView {
|
||||||
return addressBookModel.data(idx, AddressBookModel.AddressBookDescriptionRole)
|
return addressBookModel.data(idx, AddressBookModel.AddressBookDescriptionRole)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
footer: Rectangle {
|
footer: Rectangle {
|
||||||
height: 127
|
height: 127 * scaleRatio
|
||||||
width: listView.width
|
width: listView.width
|
||||||
color: "#FFFFFF"
|
color: "transparent"
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
@ -82,398 +83,401 @@ ListView {
|
||||||
|
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
id: delegate
|
id: delegate
|
||||||
height: 144
|
property bool collapsed: index ? false : true
|
||||||
|
height: collapsed ? 180 * scaleRatio : 70 * scaleRatio
|
||||||
width: listView.width
|
width: listView.width
|
||||||
color: index % 2 ? "#F8F8F8" : "#FFFFFF"
|
color: "transparent"
|
||||||
z: listView.count - index
|
|
||||||
function collapseDropdown() { dropdown.expanded = false }
|
|
||||||
|
|
||||||
StandardButton {
|
function collapse(){
|
||||||
id: detailsButton
|
delegate.height = 180 * scaleRatio;
|
||||||
anchors.right:parent.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: parent.height/2 - this.height/2
|
|
||||||
width: 80
|
|
||||||
fontSize: 14
|
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
text: qsTr("Details")
|
|
||||||
onClicked: {
|
|
||||||
var tx_key = currentWallet.getTxKey(hash)
|
|
||||||
var tx_note = currentWallet.getUserNote(hash)
|
|
||||||
var rings = currentWallet.getRings(hash)
|
|
||||||
if (rings)
|
|
||||||
rings = rings.replace(/\|/g, '\n')
|
|
||||||
informationPopup.title = "Transaction details";
|
|
||||||
informationPopup.content = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations, rings);
|
|
||||||
informationPopup.onCloseCallback = null
|
|
||||||
informationPopup.open();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// borders
|
||||||
|
Rectangle{
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
width: 1
|
||||||
|
color: "#404040"
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
width: collapsed ? 2 : 1
|
||||||
|
color: collapsed ? "#BBBBBB" : "#404040"
|
||||||
|
}
|
||||||
|
|
||||||
Row {
|
Rectangle{
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
height: 1
|
||||||
|
color: "#404040"
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.left: parent.left
|
||||||
|
height: 1
|
||||||
|
color: "#404040"
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
id: row1
|
id: row1
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 20 * scaleRatio
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 20 * scaleRatio
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 14
|
anchors.topMargin: 15 * scaleRatio
|
||||||
// -- direction indicator
|
height: 40 * scaleRatio
|
||||||
Rectangle {
|
color: "transparent"
|
||||||
id: dot
|
|
||||||
width: 14
|
Image {
|
||||||
height: width
|
id: arrowImage
|
||||||
radius: width / 2
|
source: isOut ? "../images/downArrow.png" : "../images/upArrow-green.png"
|
||||||
color: isOut ? "#FF4F41" : "#36B05B"
|
height: 18 * scaleRatio
|
||||||
|
width: 12 * scaleRatio
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 12 * scaleRatio
|
||||||
}
|
}
|
||||||
|
|
||||||
Item { //separator
|
|
||||||
width: 12
|
|
||||||
height: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
// -- description aka recepient name from address book (TODO)
|
|
||||||
/*
|
|
||||||
Text {
|
Text {
|
||||||
id: descriptionText
|
id: txrxLabel
|
||||||
width: text.length ? (descriptionArea.containsMouse ? parent.width - x - 12 : 120) : 0
|
anchors.left: arrowImage.right
|
||||||
anchors.verticalCenter: dot.verticalCenter
|
anchors.leftMargin: 18 * scaleRatio
|
||||||
font.family: "Arial"
|
font.family: Style.fontLight.name
|
||||||
font.bold: true
|
font.pixelSize: 14 * scaleRatio
|
||||||
font.pixelSize: 19
|
text: isOut ? "Sent" : "Received"
|
||||||
color: "#444444"
|
color: "#808080"
|
||||||
elide: Text.ElideRight
|
}
|
||||||
text: description
|
|
||||||
|
|
||||||
MouseArea {
|
Text {
|
||||||
id: descriptionArea
|
id: amountLabel
|
||||||
anchors.fill: parent
|
anchors.left: arrowImage.right
|
||||||
hoverEnabled: true
|
anchors.leftMargin: 18 * scaleRatio
|
||||||
|
anchors.top: txrxLabel.bottom
|
||||||
|
anchors.topMargin: 0 * scaleRatio
|
||||||
|
font.family: Style.fontBold.name
|
||||||
|
font.pixelSize: 18 * scaleRatio
|
||||||
|
font.bold: true
|
||||||
|
text: {
|
||||||
|
var _amount = amount;
|
||||||
|
if(_amount === 0){
|
||||||
|
// *sometimes* amount is 0, while the 'destinations string'
|
||||||
|
// has the correct amount, so we try to fetch it from that instead.
|
||||||
|
_amount = TxUtils.destinationsToAmount(destinations);
|
||||||
|
_amount = (_amount *1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _amount + " XMR";
|
||||||
|
}
|
||||||
|
color: isOut ? "white" : "#2eb358"
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.right: parent.right
|
||||||
|
width: 300 * scaleRatio
|
||||||
|
height: parent.height
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: dateLabel
|
||||||
|
anchors.left: parent.left
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 14 * scaleRatio
|
||||||
|
text: date
|
||||||
|
color: "#808080"
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: timeLabel
|
||||||
|
anchors.left: dateLabel.right
|
||||||
|
anchors.leftMargin: 7 * scaleRatio
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 3 * scaleRatio
|
||||||
|
font.pixelSize: 12 * scaleRatio
|
||||||
|
text: time
|
||||||
|
color: "#808080"
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: toLabel
|
||||||
|
property string address: ""
|
||||||
|
color: "#BBBBBB"
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: dateLabel.bottom
|
||||||
|
anchors.topMargin: 0
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 16 * scaleRatio
|
||||||
|
text: {
|
||||||
|
if(isOut){
|
||||||
|
address = TxUtils.destinationsToAddress(destinations);
|
||||||
|
if(address){
|
||||||
|
var truncated = TxUtils.addressTruncate(address);
|
||||||
|
return "To " + truncated;
|
||||||
|
} else {
|
||||||
|
return "Unknown recipient";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea{
|
||||||
|
visible: parent.address !== undefined
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: {
|
||||||
|
toLabel.color = "white";
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
toLabel.color = "#BBBBBB";
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
if(parent.address){
|
||||||
|
console.log("Address copied to clipboard");
|
||||||
|
clipboard.setText(parent.address);
|
||||||
|
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
height: 24 * scaleRatio
|
||||||
|
width: 24 * scaleRatio
|
||||||
|
color: "transparent"
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: dropdownImage
|
||||||
|
height: 8 * scaleRatio
|
||||||
|
width: 12 * scaleRatio
|
||||||
|
source: "../images/whiteDropIndicator.png"
|
||||||
|
rotation: delegate.collapsed ? 180 : 0
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea{
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: {
|
||||||
|
delegate.collapsed = !delegate.collapsed;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
/*
|
|
||||||
Item { //separator
|
|
||||||
width: descriptionText.width ? 12 : 0
|
|
||||||
height: 14
|
|
||||||
visible: !descriptionArea.containsMouse
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
// -- address (in case outgoing transaction) - N/A in case of incoming
|
|
||||||
MoneroComponents.TextBlock {
|
|
||||||
id: addressText
|
|
||||||
anchors.verticalCenter: dot.verticalCenter
|
|
||||||
width: parent.width - x - 12
|
|
||||||
//elide: Text.ElideRight
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 14
|
|
||||||
color: "#545454"
|
|
||||||
text: hash
|
|
||||||
// visible: !descriptionArea.containsMouse
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Rectangle {
|
||||||
// - Payment ID
|
|
||||||
id: row2
|
id: row2
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 20 * scaleRatio
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.rightMargin: 20 * scaleRatio
|
||||||
anchors.topMargin: 40
|
anchors.top: row1.bottom
|
||||||
anchors.leftMargin: 26
|
anchors.topMargin: 15 * scaleRatio
|
||||||
|
height: 40 * scaleRatio
|
||||||
|
color: "transparent"
|
||||||
|
visible: delegate.collapsed
|
||||||
|
|
||||||
// -- "PaymentID" title
|
// left column
|
||||||
Text {
|
HistoryTableInnerColumn{
|
||||||
id: paymentLabel
|
anchors.left: parent.left
|
||||||
width: 86
|
anchors.leftMargin: 30 * scaleRatio
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 12
|
|
||||||
color: "#535353"
|
|
||||||
text: paymentId !== "" ? qsTr("Payment ID:") + translationManager.emptyString : ""
|
|
||||||
}
|
|
||||||
// -- "PaymentID" value
|
|
||||||
MoneroComponents.TextBlock {
|
|
||||||
id: paymentIdValue
|
|
||||||
width: 136
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
//elide: Text.ElideRight
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize:13
|
|
||||||
color: "#545454"
|
|
||||||
text: paymentId
|
|
||||||
|
|
||||||
|
labelHeader: "Transaction ID"
|
||||||
|
labelValue: hash.substring(0, 18) + "..."
|
||||||
|
copyValue: hash
|
||||||
}
|
}
|
||||||
// Address book lookup
|
|
||||||
MoneroComponents.TextBlock {
|
// right column
|
||||||
id: addressBookLookupValue
|
HistoryTableInnerColumn{
|
||||||
width: 136
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.rightMargin: 100 * scaleRatio
|
||||||
//elide: Text.ElideRight
|
width: 200 * scaleRatio
|
||||||
font.family: "Arial"
|
height: parent.height
|
||||||
font.pixelSize:13
|
color: "transparent"
|
||||||
color: "#545454"
|
|
||||||
text: "(" + lookupPaymentID(paymentId) + ")"
|
labelHeader: qsTr("Fee")
|
||||||
visible: text !== "()"
|
labelValue: {
|
||||||
|
if(!isOut && !fee){
|
||||||
|
return "-";
|
||||||
|
} else if(isOut && fee){
|
||||||
|
return fee + " XMR";
|
||||||
|
} else {
|
||||||
|
return "Unknown"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
copyValue: {
|
||||||
|
if(isOut && fee){ return fee }
|
||||||
|
else { return "" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Row {
|
|
||||||
// block height row
|
Rectangle {
|
||||||
id: row3
|
id: row3
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 20 * scaleRatio
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 20 * scaleRatio
|
||||||
anchors.top: row2.bottom
|
anchors.top: row2.bottom
|
||||||
anchors.topMargin: rowSpacing
|
anchors.topMargin: 15 * scaleRatio
|
||||||
anchors.leftMargin: 26
|
height: 40 * scaleRatio
|
||||||
|
color: "transparent"
|
||||||
|
visible: delegate.collapsed
|
||||||
|
|
||||||
// -- "BlockHeight" title
|
// left column
|
||||||
Text {
|
HistoryTableInnerColumn{
|
||||||
id: blockHeghtTitle
|
anchors.left: parent.left
|
||||||
anchors.bottom: parent.bottom
|
anchors.leftMargin: 30 * scaleRatio
|
||||||
width: 86
|
labelHeader: qsTr("Blockheight")
|
||||||
font.family: "Arial"
|
labelValue: {
|
||||||
font.pixelSize: 12
|
|
||||||
color: "#535353"
|
|
||||||
text: qsTr("BlockHeight:") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
// -- "BlockHeight" value
|
|
||||||
MoneroComponents.TextBlock {
|
|
||||||
width: 200
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
//elide: Text.ElideRight
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 13
|
|
||||||
color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454"
|
|
||||||
text: {
|
|
||||||
if (!isPending)
|
if (!isPending)
|
||||||
if(confirmations < confirmationsRequired)
|
if(confirmations < confirmationsRequired)
|
||||||
return blockHeight + " " + qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired)
|
return blockHeight + " " + qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired);
|
||||||
else
|
else
|
||||||
return blockHeight
|
return blockHeight;
|
||||||
if (!isOut)
|
if (!isOut)
|
||||||
return qsTr("UNCONFIRMED") + translationManager.emptyString
|
return qsTr("UNCONFIRMED") + translationManager.emptyString
|
||||||
if (isFailed)
|
if (isFailed)
|
||||||
return qsTr("FAILED") + translationManager.emptyString
|
return qsTr("FAILED") + translationManager.emptyString
|
||||||
return qsTr("PENDING") + translationManager.emptyString
|
return qsTr("PENDING") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
copyValue: labelValue
|
||||||
|
}
|
||||||
|
|
||||||
|
// right column
|
||||||
|
HistoryTableInnerColumn {
|
||||||
|
visible: currentWallet.getUserNote(hash)
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 80 * scaleRatio
|
||||||
|
width: 220 * scaleRatio
|
||||||
|
height: parent.height
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
labelHeader: qsTr("Description")
|
||||||
|
labelValue: {
|
||||||
|
var note = currentWallet.getUserNote(hash);
|
||||||
|
if(note){
|
||||||
|
if(note.length > 28) {
|
||||||
|
return note.substring(0, 28) + "...";
|
||||||
|
} else {
|
||||||
|
return note;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
copyValue: {
|
||||||
|
return currentWallet.getUserNote(hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item { //separator
|
|
||||||
width: 100
|
Rectangle {
|
||||||
height: 14
|
id: proofButton
|
||||||
}
|
visible: isOut
|
||||||
// -- "Received by" title
|
color: "#404040"
|
||||||
Text {
|
height: 24 * scaleRatio
|
||||||
|
width: 24 * scaleRatio
|
||||||
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
font.family: "Arial"
|
anchors.bottomMargin: 36
|
||||||
font.pixelSize: 12
|
radius: 20 * scaleRatio
|
||||||
color: "#535353"
|
|
||||||
text: (isOut ? qsTr("Spent from:") : qsTr("Received by:")) + translationManager.emptyString
|
MouseArea {
|
||||||
|
id: proofButtonMouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: {
|
||||||
|
var address = TxUtils.destinationsToAddress(destinations);
|
||||||
|
if(address === undefined){
|
||||||
|
console.log('getProof: Error fetching address')
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var checked = (TxUtils.checkTxID(hash) && TxUtils.checkAddress(address, appWindow.persistentSettings.nettype));
|
||||||
|
if(!checked){
|
||||||
|
console.log('getProof: Error checking TxId and/or address');
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("getProof: Generate clicked: txid " + hash + ", address " + address);
|
||||||
|
root.getProofClicked(hash, address, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
onEntered: {
|
||||||
|
proofButton.color = "#656565";
|
||||||
|
}
|
||||||
|
|
||||||
|
onExited: {
|
||||||
|
proofButton.color = "#404040";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
text: "P"
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
font.pixelSize: 14 * scaleRatio
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Item { //separator
|
|
||||||
width: 5
|
Rectangle {
|
||||||
height: 14
|
id: detailsButton
|
||||||
}
|
color: "#404040"
|
||||||
// -- "Index" value
|
height: 24 * scaleRatio
|
||||||
Text {
|
width: 24 * scaleRatio
|
||||||
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
font.family: "Arial"
|
anchors.bottomMargin: 6
|
||||||
font.pixelSize: 13
|
radius: 20 * scaleRatio
|
||||||
font.bold: true
|
|
||||||
color: "#545454"
|
|
||||||
text: "#" + subaddrIndex
|
|
||||||
}
|
|
||||||
Item { //separator
|
|
||||||
width: 5
|
|
||||||
height: 14
|
|
||||||
}
|
|
||||||
// -- "Label" value
|
|
||||||
Text {
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 13
|
|
||||||
color: "#545454"
|
|
||||||
text: label
|
|
||||||
elide: Text.ElideRight
|
|
||||||
width: detailsButton.x - x - 30
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// -- "Date", "Balance" and "Amound" section
|
MouseArea {
|
||||||
Row {
|
id: detailsButtonMouseArea
|
||||||
id: row4
|
anchors.fill: parent
|
||||||
anchors.top: row3.bottom
|
hoverEnabled: true
|
||||||
anchors.left: parent.left
|
cursorShape: Qt.PointingHandCursor
|
||||||
spacing: 12
|
onClicked: {
|
||||||
anchors.topMargin: rowSpacing
|
var tx_key = currentWallet.getTxKey(hash)
|
||||||
|
var tx_note = currentWallet.getUserNote(hash)
|
||||||
Item { //separator
|
var rings = currentWallet.getRings(hash)
|
||||||
width: 14
|
if (rings)
|
||||||
height: 14
|
rings = rings.replace(/\|/g, '\n')
|
||||||
}
|
informationPopup.title = "Transaction details";
|
||||||
|
informationPopup.content = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations, rings);
|
||||||
// -- "Date" column
|
informationPopup.onCloseCallback = null
|
||||||
Column {
|
informationPopup.open();
|
||||||
anchors.top: parent.top
|
|
||||||
width: 215
|
|
||||||
|
|
||||||
Text {
|
|
||||||
anchors.left: parent.left
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 12
|
|
||||||
color: "#545454"
|
|
||||||
text: qsTr("Date") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
Row {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
spacing: 33
|
|
||||||
|
|
||||||
Text {
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 18
|
|
||||||
color: "#000000"
|
|
||||||
text: date
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
onEntered: {
|
||||||
font.family: "Arial"
|
detailsButton.color = "#656565";
|
||||||
font.pixelSize: 18
|
|
||||||
color: "#000000"
|
|
||||||
text: time
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
// -- "Balance" column
|
|
||||||
// XXX: we don't have a balance
|
|
||||||
/*
|
|
||||||
Column {
|
|
||||||
anchors.top: parent.top
|
|
||||||
width: 148
|
|
||||||
visible: false
|
|
||||||
|
|
||||||
Text {
|
onExited: {
|
||||||
anchors.left: parent.left
|
detailsButton.color = "#404040";
|
||||||
font.family: "Arial"
|
}
|
||||||
font.pixelSize: 12
|
|
||||||
color: "#545454"
|
|
||||||
text: qsTr("Balance") + translationManager.emptyString
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
font.family: "Arial"
|
color: Style.defaultFontColor
|
||||||
font.pixelSize: 18
|
text: "?"
|
||||||
color: "#000000"
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
text: balance
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
font.pixelSize: 14 * scaleRatio
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// -- "Amount column
|
|
||||||
Column {
|
|
||||||
anchors.top: parent.top
|
|
||||||
|
|
||||||
Text {
|
|
||||||
anchors.left: parent.left
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 12
|
|
||||||
color: "#545454"
|
|
||||||
text: qsTr("Amount") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
Row {
|
|
||||||
spacing: 2
|
|
||||||
Text {
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.bottomMargin: 3
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 16
|
|
||||||
color: isOut ? "#FF4F41" : "#36B05B"
|
|
||||||
text: isOut ? "↓" : "↑"
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: amountText
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 18
|
|
||||||
color: isOut ? "#FF4F41" : "#36B05B"
|
|
||||||
text: displayAmount
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// -- "Fee column
|
|
||||||
Column {
|
|
||||||
anchors.top: parent.top
|
|
||||||
width: 148
|
|
||||||
visible: isOut && fee != ""
|
|
||||||
Text {
|
|
||||||
anchors.left: parent.left
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 12
|
|
||||||
color: "#545454"
|
|
||||||
text: qsTr("Fee") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
Row {
|
|
||||||
spacing: 2
|
|
||||||
Text {
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 18
|
|
||||||
color: "#FF4F41"
|
|
||||||
text: fee
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
// Transaction dropdown menu.
|
|
||||||
// Disable for now until AddressBook implemented
|
|
||||||
TableDropdown {
|
|
||||||
id: dropdown
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.bottomMargin: 11
|
|
||||||
anchors.rightMargin: 5
|
|
||||||
dataModel: dropModel
|
|
||||||
z: 1
|
|
||||||
onExpandedChanged: {
|
|
||||||
if(expanded) {
|
|
||||||
listView.previousItem = delegate
|
|
||||||
listView.currentIndex = index
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onOptionClicked: {
|
|
||||||
if(option === 0)
|
|
||||||
clipboard.setText(address)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
height: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
ListModel {
|
|
||||||
id: dropModel
|
|
||||||
ListElement { name: "<b>Copy address to clipboard</b>"; icon: "../images/dropdownCopy.png" }
|
|
||||||
ListElement { name: "<b>Add to address book</b>"; icon: "../images/dropdownAdd.png" }
|
|
||||||
ListElement { name: "<b>Send to this address</b>"; icon: "../images/dropdownSend.png" }
|
|
||||||
ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Clipboard { id: clipboard }
|
Clipboard { id: clipboard }
|
||||||
|
|
91
components/HistoryTableInnerColumn.qml
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
// Copyright (c) 2014-2015, The Monero Project
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
|
// materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
|
// used to endorse or promote products derived from this software without specific
|
||||||
|
// prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
|
import QtQuick.Dialogs 1.2
|
||||||
|
import moneroComponents.Clipboard 1.0
|
||||||
|
import moneroComponents.PendingTransaction 1.0
|
||||||
|
import moneroComponents.Wallet 1.0
|
||||||
|
import "../components"
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
Clipboard { id: clipboard }
|
||||||
|
|
||||||
|
width: label1.width > label2.width ? label1.width : label2.width
|
||||||
|
height: label1.height + label2.height
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
property string copyValue: ""
|
||||||
|
property alias labelHeader: label1.text
|
||||||
|
property alias labelValue: label2.text
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: label1
|
||||||
|
anchors.left: parent.left
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 14 * scaleRatio
|
||||||
|
text: labelHeader
|
||||||
|
color: Style.greyFontColor
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: label2
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: label1.bottom
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 14 * scaleRatio
|
||||||
|
text: labelValue
|
||||||
|
color: Style.dimmedFontColor
|
||||||
|
}
|
||||||
|
|
||||||
|
// hover effect / copy value
|
||||||
|
MouseArea {
|
||||||
|
visible: copyValue !== ""
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: {
|
||||||
|
label1.color = Style.defaultFontColor;
|
||||||
|
label2.color = Style.defaultFontColor;
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
label1.color = Style.greyFontColor;
|
||||||
|
label2.color = Style.dimmedFontColor;
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
if(copyValue){
|
||||||
|
console.log("Copied to clipboard");
|
||||||
|
clipboard.setText(copyValue);
|
||||||
|
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -68,7 +68,7 @@ ListView {
|
||||||
footer: Rectangle {
|
footer: Rectangle {
|
||||||
height: 127 * scaleRatio
|
height: 127 * scaleRatio
|
||||||
width: listView.width
|
width: listView.width
|
||||||
color: "#FFFFFF"
|
color: "transparent"
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
@ -83,10 +83,35 @@ ListView {
|
||||||
id: delegate
|
id: delegate
|
||||||
height: tableContent.height + 20 * scaleRatio
|
height: tableContent.height + 20 * scaleRatio
|
||||||
width: listView.width
|
width: listView.width
|
||||||
color: index % 2 ? "#F8F8F8" : "#FFFFFF"
|
color: "transparent"
|
||||||
Layout.leftMargin: 10 * scaleRatio
|
Layout.leftMargin: 10 * scaleRatio
|
||||||
z: listView.count - index
|
z: listView.count - index
|
||||||
function collapseDropdown() { dropdown.expanded = false }
|
function collapseDropdown() { dropdown.expanded = false }
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
width: 1
|
||||||
|
color: "#404040"
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.top: parent.top
|
||||||
|
width: 1
|
||||||
|
color: "#404040"
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.left: parent.left
|
||||||
|
height: 1
|
||||||
|
color: "#404040"
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -109,7 +134,7 @@ ListView {
|
||||||
anchors.topMargin: parent.height/2 - this.height/2
|
anchors.topMargin: parent.height/2 - this.height/2
|
||||||
width: 30 * scaleRatio; height: 30 * scaleRatio
|
width: 30 * scaleRatio; height: 30 * scaleRatio
|
||||||
radius: 25
|
radius: 25
|
||||||
color: "#FF4304"
|
color: "#404040"
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
width: 20 * scaleRatio
|
width: 20 * scaleRatio
|
||||||
|
@ -127,16 +152,16 @@ ListView {
|
||||||
Layout.topMargin: 20 * scaleRatio
|
Layout.topMargin: 20 * scaleRatio
|
||||||
Layout.leftMargin: 10 * scaleRatio
|
Layout.leftMargin: 10 * scaleRatio
|
||||||
Text {
|
Text {
|
||||||
font.family: "Arial"
|
font.family: Style.fontMedium.name
|
||||||
font.pixelSize: 14 * scaleRatio
|
font.pixelSize: 14 * scaleRatio
|
||||||
color: "#555555"
|
color: Style.defaultFontColor
|
||||||
text: date
|
text: date
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
font.family: "Arial"
|
font.family: Style.fontRegular.name
|
||||||
font.pixelSize: 14 * scaleRatio
|
font.pixelSize: 14 * scaleRatio
|
||||||
color: "#555555"
|
color: Style.dimmedFontColor
|
||||||
text: time
|
text: time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +169,7 @@ ListView {
|
||||||
Text {
|
Text {
|
||||||
visible: confirmations < confirmationsRequired || isPending
|
visible: confirmations < confirmationsRequired || isPending
|
||||||
Layout.leftMargin: 5 * scaleRatio
|
Layout.leftMargin: 5 * scaleRatio
|
||||||
font.family: "Arial"
|
font.family: Style.fontRegular.name
|
||||||
font.pixelSize: 14 * scaleRatio
|
font.pixelSize: 14 * scaleRatio
|
||||||
color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454"
|
color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454"
|
||||||
text: {
|
text: {
|
||||||
|
@ -161,7 +186,6 @@ ListView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Amount & confirmations
|
// Amount & confirmations
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.leftMargin: 10 * scaleRatio
|
Layout.leftMargin: 10 * scaleRatio
|
||||||
|
@ -169,7 +193,7 @@ ListView {
|
||||||
Text {
|
Text {
|
||||||
font.family: "Arial"
|
font.family: "Arial"
|
||||||
font.pixelSize: 14 * scaleRatio
|
font.pixelSize: 14 * scaleRatio
|
||||||
color: isOut ? "#FF4F41" : "#36B05B"
|
color: isOut ? Style.defaultFontColor : "#2eb358"
|
||||||
text: isOut ? "↓" : "↑"
|
text: isOut ? "↓" : "↑"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +201,7 @@ ListView {
|
||||||
id: amountText
|
id: amountText
|
||||||
font.family: "Arial"
|
font.family: "Arial"
|
||||||
font.pixelSize: 18 * scaleRatio
|
font.pixelSize: 18 * scaleRatio
|
||||||
color: isOut ? "#FF4F41" : "#36B05B"
|
color: isOut ? Style.defaultFontColor : "#2eb358"
|
||||||
text: displayAmount
|
text: displayAmount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
92
components/InlineButton.qml
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
// Copyright (c) 2014-2015, The Monero Project
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
|
// materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
|
// used to endorse or promote products derived from this software without specific
|
||||||
|
// prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: inlineButton
|
||||||
|
height: rect.height * scaleRatio
|
||||||
|
property string shadowPressedColor: "#B32D00"
|
||||||
|
property string shadowReleasedColor: "#FF4304"
|
||||||
|
property string pressedColor: "#FF4304"
|
||||||
|
property string releasedColor: "#FF6C3C"
|
||||||
|
property string icon: ""
|
||||||
|
property string textColor: "#FFFFFF"
|
||||||
|
property int fontSize: 12 * scaleRatio
|
||||||
|
property alias text: inlineText.text
|
||||||
|
signal clicked()
|
||||||
|
|
||||||
|
function doClick() {
|
||||||
|
// Android workaround
|
||||||
|
releaseFocus();
|
||||||
|
clicked();
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
id: rect
|
||||||
|
color: Style.buttonBackgroundColorDisabled
|
||||||
|
border.color: "black"
|
||||||
|
height: 28 * scaleRatio
|
||||||
|
width: inlineText.width + 22 * scaleRatio
|
||||||
|
radius: 4
|
||||||
|
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: inlineText
|
||||||
|
font.family: Style.fontBold.name
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16 * scaleRatio
|
||||||
|
color: "black"
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: buttonArea
|
||||||
|
cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: doClick()
|
||||||
|
onEntered: {
|
||||||
|
rect.color = "#707070";
|
||||||
|
rect.opacity = 0.8;
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
rect.opacity = 1.0;
|
||||||
|
rect.color = "#808080";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Keys.onSpacePressed: doClick()
|
||||||
|
Keys.onReturnPressed: doClick()
|
||||||
|
}
|
|
@ -26,21 +26,20 @@
|
||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick.Controls 1.2
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Controls.Styles 1.2
|
import QtQuick 2.7
|
||||||
import QtQuick 2.2
|
import "." 1.0
|
||||||
|
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
font.family: "Arial"
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 18 * scaleRatio
|
||||||
|
font.bold: true
|
||||||
horizontalAlignment: TextInput.AlignLeft
|
horizontalAlignment: TextInput.AlignLeft
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
style: TextFieldStyle {
|
color: Style.defaultFontColor
|
||||||
textColor: "#3F3F3F"
|
|
||||||
placeholderTextColor: "#BABABA"
|
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
border.width: 0
|
color: "transparent"
|
||||||
color: "transparent"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Controls.Styles 1.4
|
import QtQuick.Controls.Styles 1.4
|
||||||
|
@ -38,14 +38,6 @@ import "../components" as MoneroComponents
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
visible: false
|
visible: false
|
||||||
Rectangle {
|
|
||||||
id: bg
|
|
||||||
z: parent.z + 1
|
|
||||||
anchors.fill: parent
|
|
||||||
color: "white"
|
|
||||||
opacity: 0.9
|
|
||||||
}
|
|
||||||
|
|
||||||
property alias labelText: label.text
|
property alias labelText: label.text
|
||||||
property alias inputText: input.text
|
property alias inputText: input.text
|
||||||
|
|
||||||
|
@ -78,42 +70,45 @@ Item {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: column
|
id: column
|
||||||
//anchors {fill: parent; margins: 16 }
|
|
||||||
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.maximumWidth: 400 * scaleRatio
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: label
|
id: label
|
||||||
Layout.alignment: Qt.AlignHCenter
|
anchors.left: parent.left
|
||||||
// Layout.columnSpan: 2
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
font.pixelSize: 18 * scaleRatio
|
font.pixelSize: 16 * scaleRatio
|
||||||
font.family: "Arial"
|
font.family: Style.fontLight.name
|
||||||
color: "#555555"
|
|
||||||
|
color: Style.defaultFontColor
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id : input
|
id : input
|
||||||
focus: true
|
focus: true
|
||||||
|
Layout.topMargin: 6
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
anchors.left: parent.left
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
horizontalAlignment: TextInput.AlignLeft
|
||||||
verticalAlignment: TextInput.AlignVCenter
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
font.family: "Arial"
|
font.family: Style.fontLight.name
|
||||||
font.pixelSize: 32 * scaleRatio
|
font.pixelSize: 24 * scaleRatio
|
||||||
// echoMode: TextInput.Password
|
|
||||||
KeyNavigation.tab: okButton
|
KeyNavigation.tab: okButton
|
||||||
|
bottomPadding: 10
|
||||||
|
leftPadding: 10
|
||||||
|
topPadding: 10
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
|
||||||
style: TextFieldStyle {
|
background: Rectangle {
|
||||||
renderType: Text.NativeRendering
|
radius: 2
|
||||||
textColor: "#35B05A"
|
border.color: Qt.rgba(255, 255, 255, 0.35)
|
||||||
// passwordCharacter: "•"
|
border.width: 1
|
||||||
// no background
|
color: "black"
|
||||||
background: Rectangle {
|
|
||||||
radius: 0
|
|
||||||
border.width: 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
root.close()
|
root.close()
|
||||||
root.accepted()
|
root.accepted()
|
||||||
|
@ -123,59 +118,47 @@ Item {
|
||||||
root.rejected()
|
root.rejected()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// underline
|
|
||||||
Rectangle {
|
|
||||||
height: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
anchors.bottomMargin: 3
|
|
||||||
}
|
|
||||||
// padding
|
|
||||||
Rectangle {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
height: 10
|
|
||||||
opacity: 0
|
|
||||||
color: "black"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Ok/Cancel buttons
|
|
||||||
RowLayout {
|
|
||||||
id: buttons
|
|
||||||
spacing: 60
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
// Ok/Cancel buttons
|
||||||
id: cancelButton
|
RowLayout {
|
||||||
width: 120
|
id: buttons
|
||||||
fontSize: 14
|
spacing: 16 * scaleRatio
|
||||||
shadowReleasedColor: "#FF4304"
|
Layout.topMargin: 16
|
||||||
shadowPressedColor: "#B32D00"
|
Layout.alignment: Qt.AlignRight
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
MoneroComponents.StandardButton {
|
||||||
text: qsTr("Cancel") + translationManager.emptyString
|
id: cancelButton
|
||||||
KeyNavigation.tab: input
|
small: true
|
||||||
onClicked: {
|
width: 120
|
||||||
root.close()
|
fontSize: 14
|
||||||
root.rejected()
|
text: qsTr("Cancel") + translationManager.emptyString
|
||||||
|
KeyNavigation.tab: input
|
||||||
|
onClicked: {
|
||||||
|
root.close()
|
||||||
|
root.rejected()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
MoneroComponents.StandardButton {
|
||||||
MoneroComponents.StandardButton {
|
id: okButton
|
||||||
id: okButton
|
small: true
|
||||||
width: 120
|
width: 120
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
shadowReleasedColor: "#FF4304"
|
text: qsTr("Ok")
|
||||||
shadowPressedColor: "#B32D00"
|
KeyNavigation.tab: cancelButton
|
||||||
releasedColor: "#FF6C3C"
|
onClicked: {
|
||||||
pressedColor: "#FF4304"
|
root.close()
|
||||||
text: qsTr("Ok")
|
root.accepted()
|
||||||
KeyNavigation.tab: cancelButton
|
}
|
||||||
onClicked: {
|
|
||||||
root.close()
|
|
||||||
root.accepted()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: bg
|
||||||
|
z: parent.z + 1
|
||||||
|
anchors.fill: parent
|
||||||
|
color: "black"
|
||||||
|
opacity: 0.8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
68
components/InputMulti.qml
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
// Copyright (c) 2014-2015, The Monero Project
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
|
// materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
|
// used to endorse or promote products derived from this software without specific
|
||||||
|
// prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
import QtQuick.Controls 2.2
|
||||||
|
|
||||||
|
import QtQuick 2.7
|
||||||
|
import "../js/TxUtils.js" as TxUtils
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
|
|
||||||
|
TextArea {
|
||||||
|
property bool error: false
|
||||||
|
property bool addressValidation: false
|
||||||
|
property bool wrapAnywhere: true
|
||||||
|
property int fontSize: 18 * scaleRatio
|
||||||
|
property bool fontBold: false
|
||||||
|
|
||||||
|
id: textArea
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: fontSize
|
||||||
|
font.bold: fontBold
|
||||||
|
horizontalAlignment: TextInput.AlignLeft
|
||||||
|
selectByMouse: true
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
|
||||||
|
wrapMode: {
|
||||||
|
if(wrapAnywhere){
|
||||||
|
return Text.WrapAnywhere;
|
||||||
|
} else {
|
||||||
|
return Text.WordWrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onTextChanged: {
|
||||||
|
if(addressValidation){
|
||||||
|
// js replacement for `RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }`
|
||||||
|
textArea.text = textArea.text.replace(/[^a-z0-9]/gi,'');
|
||||||
|
var address_ok = TxUtils.checkAddress(textArea.text, appWindow.persistentSettings.nettype);
|
||||||
|
if(!address_ok) error = true;
|
||||||
|
else error = false;
|
||||||
|
TextArea.cursorPosition = textArea.text.length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,6 +29,8 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: item
|
id: item
|
||||||
property alias text: label.text
|
property alias text: label.text
|
||||||
|
@ -36,11 +38,14 @@ Item {
|
||||||
property alias textFormat: label.textFormat
|
property alias textFormat: label.textFormat
|
||||||
property string tipText: ""
|
property string tipText: ""
|
||||||
property int fontSize: 16 * scaleRatio
|
property int fontSize: 16 * scaleRatio
|
||||||
|
property bool fontBold: false
|
||||||
|
property string fontColor: Style.defaultFontColor
|
||||||
|
property string fontFamily: ""
|
||||||
property alias wrapMode: label.wrapMode
|
property alias wrapMode: label.wrapMode
|
||||||
property alias horizontalAlignment: label.horizontalAlignment
|
property alias horizontalAlignment: label.horizontalAlignment
|
||||||
signal linkActivated()
|
signal linkActivated()
|
||||||
width: icon.x + icon.width * scaleRatio
|
height: label.height * scaleRatio
|
||||||
height: icon.height * scaleRatio
|
width: label.width * scaleRatio
|
||||||
Layout.topMargin: 10 * scaleRatio
|
Layout.topMargin: 10 * scaleRatio
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
@ -48,38 +53,16 @@ Item {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: 2 * scaleRatio
|
anchors.bottomMargin: 2 * scaleRatio
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
font.family: "Arial"
|
font.family: {
|
||||||
|
if(fontFamily){
|
||||||
|
return fontFamily;
|
||||||
|
} else {
|
||||||
|
return Style.fontRegular.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
font.pixelSize: fontSize
|
font.pixelSize: fontSize
|
||||||
color: "#555555"
|
font.bold: fontBold
|
||||||
|
color: fontColor
|
||||||
onLinkActivated: item.linkActivated()
|
onLinkActivated: item.linkActivated()
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
|
||||||
id: icon
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.left: label.right
|
|
||||||
anchors.leftMargin: 5 * scaleRatio
|
|
||||||
source: "../images/whatIsIcon.png"
|
|
||||||
visible: appWindow.whatIsEnable
|
|
||||||
}
|
|
||||||
|
|
||||||
// MouseArea {
|
|
||||||
// anchors.fill: icon
|
|
||||||
// enabled: appWindow.whatIsEnable
|
|
||||||
// hoverEnabled: true
|
|
||||||
// onEntered: {
|
|
||||||
// icon.visible = false
|
|
||||||
// var pos = appWindow.mapFromItem(icon, 0, -15)
|
|
||||||
// tipItem.text = item.tipText
|
|
||||||
// tipItem.x = pos.x
|
|
||||||
// if(tipItem.height > 30)
|
|
||||||
// pos.y -= tipItem.height - 28
|
|
||||||
// tipItem.y = pos.y
|
|
||||||
// tipItem.visible = true
|
|
||||||
// }
|
|
||||||
// onExited: {
|
|
||||||
// icon.visible = Qt.binding(function(){ return appWindow.whatIsEnable; })
|
|
||||||
// tipItem.visible = false
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
73
components/LabelButton.qml
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
// Copyright (c) 2014-2015, The Monero Project
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
|
// materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
|
// used to endorse or promote products derived from this software without specific
|
||||||
|
// prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
signal clicked();
|
||||||
|
property alias text: labelButtonText.text
|
||||||
|
|
||||||
|
id: labelButton
|
||||||
|
color: "#808080"
|
||||||
|
radius: 3
|
||||||
|
height: 20
|
||||||
|
width: labelButtonText.width + 14
|
||||||
|
anchors.right: copyButton.left
|
||||||
|
anchors.rightMargin: 6
|
||||||
|
visible: isValidOpenAliasAddress(addressLine.text)
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: labelButtonText
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 12
|
||||||
|
font.bold: true
|
||||||
|
text: ""
|
||||||
|
color: "black"
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked: labelButton.clicked()
|
||||||
|
onEntered: {
|
||||||
|
labelButton.color = "#707070";
|
||||||
|
labelButtonText.opacity = 0.8;
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
labelButton.color = "#808080";
|
||||||
|
labelButtonText.opacity = 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
45
components/LabelSubheader.qml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
// Copyright (c) 2014-2015, The Monero Project
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
|
// materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
|
// used to endorse or promote products derived from this software without specific
|
||||||
|
// prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
import QtQuick 2.0
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: item
|
||||||
|
fontSize: 17 * scaleRatio
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.top: item.bottom
|
||||||
|
anchors.topMargin: 4
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
height: 2
|
||||||
|
color: Style.dividerColor
|
||||||
|
opacity: Style.dividerOpacity
|
||||||
|
}
|
||||||
|
}
|
|
@ -27,54 +27,187 @@
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: item
|
id: item
|
||||||
property alias placeholderText: input.placeholderText
|
|
||||||
property alias text: input.text
|
property alias text: input.text
|
||||||
|
|
||||||
|
property alias placeholderText: placeholderLabel.text
|
||||||
|
property bool placeholderCenter: false
|
||||||
|
property string placeholderFontFamily: Style.fontRegular.name
|
||||||
|
property bool placeholderFontBold: false
|
||||||
|
property int placeholderFontSize: 18 * scaleRatio
|
||||||
|
property string placeholderColor: Style.defaultFontColor
|
||||||
|
property real placeholderOpacity: 0.25
|
||||||
|
|
||||||
property alias validator: input.validator
|
property alias validator: input.validator
|
||||||
property alias readOnly : input.readOnly
|
property alias readOnly : input.readOnly
|
||||||
property alias cursorPosition: input.cursorPosition
|
property alias cursorPosition: input.cursorPosition
|
||||||
property alias echoMode: input.echoMode
|
property alias echoMode: input.echoMode
|
||||||
|
property alias inlineButton: inlineButtonId
|
||||||
|
property alias inlineButtonText: inlineButtonId.text
|
||||||
|
property alias inlineIcon: inlineIcon.visible
|
||||||
|
property bool copyButton: false
|
||||||
|
property string borderColor: {
|
||||||
|
if(input.activeFocus){
|
||||||
|
return Qt.rgba(255, 255, 255, 0.35);
|
||||||
|
} else {
|
||||||
|
return Qt.rgba(255, 255, 255, 0.25);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
property bool borderDisabled: false
|
||||||
property int fontSize: 18 * scaleRatio
|
property int fontSize: 18 * scaleRatio
|
||||||
property bool showBorder: true
|
property bool showBorder: true
|
||||||
|
property bool fontBold: false
|
||||||
|
property alias fontColor: input.color
|
||||||
property bool error: false
|
property bool error: false
|
||||||
signal editingFinished()
|
property alias labelText: inputLabel.text
|
||||||
|
property alias labelColor: inputLabel.color
|
||||||
|
property alias labelTextFormat: inputLabel.textFormat
|
||||||
|
property string backgroundColor: "transparent"
|
||||||
|
property string tipText: ""
|
||||||
|
property int labelFontSize: 16 * scaleRatio
|
||||||
|
property bool labelFontBold: false
|
||||||
|
property alias labelWrapMode: inputLabel.wrapMode
|
||||||
|
property alias labelHorizontalAlignment: inputLabel.horizontalAlignment
|
||||||
|
property bool showingHeader: inputLabel.text !== "" || copyButton
|
||||||
|
property int inputHeight: 42 * scaleRatio
|
||||||
|
|
||||||
|
signal labelLinkActivated(); // input label, rich text <a> signal
|
||||||
|
signal editingFinished();
|
||||||
signal accepted();
|
signal accepted();
|
||||||
signal textUpdated();
|
signal textUpdated();
|
||||||
|
|
||||||
height: 37 * scaleRatio
|
height: showingHeader ? (inputLabel.height + inputItem.height + 2) * scaleRatio : 42 * scaleRatio
|
||||||
|
|
||||||
function getColor(error) {
|
onTextUpdated: {
|
||||||
if (error)
|
// check to remove placeholder text when there is content
|
||||||
return "#FFDDDD"
|
if(item.isEmpty()){
|
||||||
else
|
placeholderLabel.visible = true;
|
||||||
return "#FFFFFF"
|
} else {
|
||||||
|
placeholderLabel.visible = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
function isEmpty(){
|
||||||
visible: showBorder
|
var val = input.text;
|
||||||
anchors.fill: parent
|
if(val === "") {
|
||||||
anchors.bottomMargin: 1 * scaleRatio
|
return true;
|
||||||
color: "#DBDBDB"
|
}
|
||||||
//radius: 4
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Text {
|
||||||
anchors.fill: parent
|
id: inputLabel
|
||||||
anchors.topMargin: 1 * scaleRatio
|
anchors.top: parent.top
|
||||||
color: getColor(error)
|
anchors.left: parent.left
|
||||||
//radius: 4
|
anchors.topMargin: 2 * scaleRatio
|
||||||
|
font.family: Style.fontLight.name
|
||||||
|
font.pixelSize: labelFontSize
|
||||||
|
font.bold: labelFontBold
|
||||||
|
textFormat: Text.RichText
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
onLinkActivated: item.labelLinkActivated()
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.NoButton
|
||||||
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Input {
|
LabelButton {
|
||||||
id: input
|
id: copyButtonId
|
||||||
anchors.fill: parent
|
text: qsTr("Copy")
|
||||||
anchors.leftMargin: 4 * scaleRatio
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 30 * scaleRatio
|
onClicked: {
|
||||||
font.pixelSize: parent.fontSize
|
if (input.text.length > 0) {
|
||||||
onEditingFinished: item.editingFinished()
|
console.log("Copied to clipboard");
|
||||||
onAccepted: item.accepted();
|
clipboard.setText(input.text);
|
||||||
onTextChanged: item.textUpdated()
|
appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
visible: copyButton && input.text !== ""
|
||||||
|
}
|
||||||
|
|
||||||
|
Item{
|
||||||
|
id: inputItem
|
||||||
|
height: inputHeight * scaleRatio
|
||||||
|
anchors.top: showingHeader ? inputLabel.bottom : parent.top
|
||||||
|
anchors.topMargin: showingHeader ? 12 * scaleRatio : 2 * scaleRatio
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: placeholderLabel
|
||||||
|
visible: input.text ? false : true
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.horizontalCenter: placeholderCenter ? parent.horizontalCenter : undefined
|
||||||
|
anchors.left: placeholderCenter ? undefined : parent.left
|
||||||
|
anchors.leftMargin: {
|
||||||
|
if(placeholderCenter){
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
else if(inlineIcon.visible){ return 50 * scaleRatio; }
|
||||||
|
else { return 10 * scaleRatio; }
|
||||||
|
}
|
||||||
|
|
||||||
|
opacity: item.placeholderOpacity
|
||||||
|
color: item.placeholderColor
|
||||||
|
font.family: item.placeholderFontFamily
|
||||||
|
font.pixelSize: placeholderFontSize * scaleRatio
|
||||||
|
font.bold: item.placeholderFontBold
|
||||||
|
text: ""
|
||||||
|
z: 3
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.topMargin: 1 * scaleRatio
|
||||||
|
color: "transparent"
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: inputFill
|
||||||
|
color: backgroundColor
|
||||||
|
anchors.fill: parent
|
||||||
|
border.width: borderDisabled ? 0 : 1
|
||||||
|
border.color: borderColor
|
||||||
|
radius: 4
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: inlineIcon
|
||||||
|
width: 26 * scaleRatio
|
||||||
|
height: 26 * scaleRatio
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 8 * scaleRatio
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 12 * scaleRatio
|
||||||
|
source: "../images/moneroIcon-28x28.png"
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
Input {
|
||||||
|
id: input
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.leftMargin: inlineIcon.visible ? 38 : 0
|
||||||
|
font.pixelSize: item.fontSize
|
||||||
|
font.bold: item.fontBold
|
||||||
|
onEditingFinished: item.editingFinished()
|
||||||
|
onAccepted: item.accepted();
|
||||||
|
onTextChanged: item.textUpdated()
|
||||||
|
}
|
||||||
|
|
||||||
|
InlineButton {
|
||||||
|
id: inlineButtonId
|
||||||
|
visible: item.inlineButtonText ? true : false
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 8 * scaleRatio
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 6 * scaleRatio
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
140
components/LineEditMulti.qml
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
// Copyright (c) 2014-2015, The Monero Project
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
|
// materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
|
// used to endorse or promote products derived from this software without specific
|
||||||
|
// prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: lineditmulti
|
||||||
|
property alias text: multiLine.text
|
||||||
|
property alias placeholderText: placeholderLabel.text
|
||||||
|
property alias labelText: inputLabel.text
|
||||||
|
property alias error: multiLine.error
|
||||||
|
property alias readOnly: multiLine.readOnly
|
||||||
|
property alias addressValidation: multiLine.addressValidation
|
||||||
|
property alias labelButtonText: labelButton.text
|
||||||
|
property bool labelFontBold: false
|
||||||
|
property bool labelButtonVisible: false
|
||||||
|
property bool copyButton: false
|
||||||
|
property bool wrapAnywhere: true
|
||||||
|
property bool showingHeader: true
|
||||||
|
property bool showBorder: true
|
||||||
|
property bool fontBold: false
|
||||||
|
property int fontSize: 16 * scaleRatio
|
||||||
|
|
||||||
|
signal labelButtonClicked();
|
||||||
|
signal inputLabelLinkActivated();
|
||||||
|
|
||||||
|
spacing: 0
|
||||||
|
Rectangle {
|
||||||
|
id: inputLabelRect
|
||||||
|
color: "transparent"
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: (inputLabel.height + 10) * scaleRatio
|
||||||
|
visible: showingHeader ? true : false
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: inputLabel
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 16 * scaleRatio
|
||||||
|
font.bold: labelFontBold
|
||||||
|
textFormat: Text.RichText
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
onLinkActivated: inputLabelLinkActivated()
|
||||||
|
}
|
||||||
|
|
||||||
|
LabelButton {
|
||||||
|
id: labelButton
|
||||||
|
onClicked: labelButtonClicked()
|
||||||
|
visible: labelButtonVisible
|
||||||
|
}
|
||||||
|
|
||||||
|
LabelButton {
|
||||||
|
id: copyButtonId
|
||||||
|
visible: copyButton && multiLine.text !== ""
|
||||||
|
text: qsTr("Copy")
|
||||||
|
anchors.right: labelButton.visible ? inputLabel.right : parent.right
|
||||||
|
anchors.rightMargin: labelButton.visible? 4 : 0
|
||||||
|
onClicked: {
|
||||||
|
if (multiLine.text.length > 0) {
|
||||||
|
console.log("Copied to clipboard");
|
||||||
|
clipboard.setText(multiLine.text);
|
||||||
|
appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
InputMulti {
|
||||||
|
id: multiLine
|
||||||
|
readOnly: false
|
||||||
|
addressValidation: true
|
||||||
|
anchors.top: parent.showingHeader ? inputLabelRect.bottom : parent.top
|
||||||
|
Layout.fillWidth: true
|
||||||
|
topPadding: parent.showingHeader ? 10 * scaleRatio : 0
|
||||||
|
bottomPadding: 10 * scaleRatio
|
||||||
|
wrapAnywhere: parent.wrapAnywhere
|
||||||
|
fontSize: parent.fontSize
|
||||||
|
fontBold: parent.fontBold
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: placeholderLabel
|
||||||
|
visible: multiLine.text ? false : true
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 10 * scaleRatio
|
||||||
|
opacity: 0.25
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 18 * scaleRatio
|
||||||
|
text: ""
|
||||||
|
z: 3
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: "transparent"
|
||||||
|
border.width: 1
|
||||||
|
border.color: {
|
||||||
|
if(multiLine.error && multiLine.text !== ""){
|
||||||
|
return Qt.rgba(255, 0, 0, 0.45);
|
||||||
|
} else if(multiLine.activeFocus){
|
||||||
|
return Qt.rgba(255, 255, 255, 0.35);
|
||||||
|
} else {
|
||||||
|
return Qt.rgba(255, 255, 255, 0.25);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
radius: 4
|
||||||
|
anchors.fill: parent
|
||||||
|
visible: lineditmulti.showBorder
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -26,7 +26,8 @@
|
||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.5
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: button
|
id: button
|
||||||
|
@ -55,9 +56,91 @@ Rectangle {
|
||||||
return offset
|
return offset
|
||||||
}
|
}
|
||||||
|
|
||||||
color: checked ? "#FFFFFF" : "#1C1C1C"
|
color: "transparent"
|
||||||
property bool present: !under || under.checked || checked || under.numSelectedChildren > 0
|
property bool present: !under || under.checked || checked || under.numSelectedChildren > 0
|
||||||
height: present ? ((appWindow.height >= 800) ? 48 * scaleRatio : 36 * scaleRatio ) : 0
|
height: present ? ((appWindow.height >= 800) ? 44 * scaleRatio : 38 * scaleRatio ) : 0
|
||||||
|
|
||||||
|
// button gradient while checked
|
||||||
|
Image {
|
||||||
|
height: parent.height
|
||||||
|
width: 260
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: -20
|
||||||
|
anchors.leftMargin: parent.getOffset()
|
||||||
|
source: "../images/menuButtonGradient.png"
|
||||||
|
visible: button.checked
|
||||||
|
}
|
||||||
|
|
||||||
|
// button decorations that are subject to leftMargin offsets
|
||||||
|
Rectangle {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: parent.getOffset() + 20 * scaleRatio
|
||||||
|
height: parent.height
|
||||||
|
width: button.checked ? 20: 10
|
||||||
|
color: "#00000000"
|
||||||
|
|
||||||
|
// dot if unchecked
|
||||||
|
Rectangle {
|
||||||
|
id: dot
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: button.checked ? 20 * scaleRatio : 8 * scaleRatio
|
||||||
|
height: button.checked ? 20 * scaleRatio : 8 * scaleRatio
|
||||||
|
radius: button.checked ? 20 * scaleRatio : 4 * scaleRatio
|
||||||
|
color: button.dotColor
|
||||||
|
// arrow if checked
|
||||||
|
Image {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
anchors.left: parent.left
|
||||||
|
source: "../images/arrow-right-medium-white.png"
|
||||||
|
visible: button.checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// button text
|
||||||
|
Text {
|
||||||
|
id: label
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.left: parent.right
|
||||||
|
anchors.leftMargin: 8 * scaleRatio
|
||||||
|
font.family: Style.fontMedium.name
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16 * scaleRatio
|
||||||
|
color: "#FFFFFF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// menu button right arrow
|
||||||
|
Image {
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 20 * scaleRatio
|
||||||
|
anchors.leftMargin: parent.getOffset()
|
||||||
|
source: "../images/right.png"
|
||||||
|
opacity: button.checked ? 1.0 : 0.4
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: symbolText
|
||||||
|
anchors.centerIn: parent
|
||||||
|
font.pixelSize: 11 * scaleRatio
|
||||||
|
font.bold: true
|
||||||
|
color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color
|
||||||
|
visible: appWindow.ctrlPressed
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: buttonArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: {
|
||||||
|
if(parent.checked)
|
||||||
|
return
|
||||||
|
button.doClick()
|
||||||
|
parent.checked = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
transform: Scale {
|
transform: Scale {
|
||||||
yScale: button.present ? 1 : 0
|
yScale: button.present ? 1 : 0
|
||||||
|
@ -77,77 +160,4 @@ Rectangle {
|
||||||
// we get the value of checked before the change
|
// we get the value of checked before the change
|
||||||
ScriptAction { script: if (under) under.numSelectedChildren += checked > 0 ? -1 : 1 }
|
ScriptAction { script: if (under) under.numSelectedChildren += checked > 0 ? -1 : 1 }
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: parent.getOffset()
|
|
||||||
width: 50 * scaleRatio
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: dot
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: 14 * scaleRatio
|
|
||||||
height: width
|
|
||||||
radius: height / 2
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: 10 * scaleRatio
|
|
||||||
height: width
|
|
||||||
radius: height / 2
|
|
||||||
color: "#1C1C1C"
|
|
||||||
visible: !button.checked && !buttonArea.containsMouse
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: symbolText
|
|
||||||
anchors.centerIn: parent
|
|
||||||
font.pixelSize: 11 * scaleRatio
|
|
||||||
font.bold: true
|
|
||||||
color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color
|
|
||||||
visible: appWindow.ctrlPressed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
width: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
visible: parent.checked
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 20 * scaleRatio
|
|
||||||
anchors.leftMargin: parent.getOffset()
|
|
||||||
source: "../images/menuIndicator.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: label
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: parent.getOffset() + 50 * scaleRatio
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 16 * scaleRatio
|
|
||||||
color: parent.checked ? "#000000" : "#FFFFFF"
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: buttonArea
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onClicked: {
|
|
||||||
if(parent.checked)
|
|
||||||
return
|
|
||||||
button.doClick()
|
|
||||||
parent.checked = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,26 +27,15 @@
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
import moneroComponents.Wallet 1.0
|
import moneroComponents.Wallet 1.0
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: item
|
id: item
|
||||||
|
color: "transparent"
|
||||||
property var connected: Wallet.ConnectionStatus_Disconnected
|
property var connected: Wallet.ConnectionStatus_Disconnected
|
||||||
|
|
||||||
function getConnectionStatusImage(status) {
|
|
||||||
if (status == Wallet.ConnectionStatus_Connected)
|
|
||||||
return "../images/statusConnected.png"
|
|
||||||
else
|
|
||||||
return "../images/statusDisconnected.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
function getConnectionStatusColor(status) {
|
|
||||||
if (status == Wallet.ConnectionStatus_Connected)
|
|
||||||
return "#FF6C3B"
|
|
||||||
else
|
|
||||||
return "#AAAAAA"
|
|
||||||
}
|
|
||||||
|
|
||||||
function getConnectionStatusString(status) {
|
function getConnectionStatusString(status) {
|
||||||
if (status == Wallet.ConnectionStatus_Connected) {
|
if (status == Wallet.ConnectionStatus_Connected) {
|
||||||
if(!appWindow.daemonSynced)
|
if(!appWindow.daemonSynced)
|
||||||
|
@ -62,40 +51,64 @@ Rectangle {
|
||||||
return qsTr("Invalid connection status")
|
return qsTr("Invalid connection status")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.preferredHeight: 40 * scaleRatio
|
||||||
|
|
||||||
color: "#1C1C1C"
|
|
||||||
Row {
|
|
||||||
height: 60 * scaleRatio
|
|
||||||
Item {
|
Item {
|
||||||
id: iconItem
|
id: iconItem
|
||||||
anchors.bottom: parent.bottom
|
anchors.top: parent.top
|
||||||
width: 50 * scaleRatio
|
width: 40 * scaleRatio
|
||||||
height: 50 * scaleRatio
|
height: 40 * scaleRatio
|
||||||
|
opacity: {
|
||||||
|
if(item.connected == Wallet.ConnectionStatus_Connected){
|
||||||
|
return 1
|
||||||
|
} else {
|
||||||
|
return 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.centerIn: parent
|
anchors.top: parent.top
|
||||||
source: getConnectionStatusImage(item.connected)
|
anchors.topMargin: 6
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 11
|
||||||
|
source: {
|
||||||
|
if(item.connected == Wallet.ConnectionStatus_Connected){
|
||||||
|
return "../images/lightning.png"
|
||||||
|
} else {
|
||||||
|
return "../images/lightning-white.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Item {
|
||||||
anchors.bottom: parent.bottom
|
anchors.top: parent.top
|
||||||
height: 53 * scaleRatio
|
anchors.left: iconItem.right
|
||||||
spacing: 3 * scaleRatio
|
height: 40 * scaleRatio
|
||||||
|
width: 260 * scaleRatio
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
id: statusText
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
font.family: "Arial"
|
anchors.top: parent.top
|
||||||
font.pixelSize: 12 * scaleRatio
|
anchors.topMargin: 0
|
||||||
color: "#545454"
|
font.family: Style.fontMedium.name
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 13 * scaleRatio
|
||||||
|
color: "white"
|
||||||
|
opacity: 0.5
|
||||||
text: qsTr("Network status") + translationManager.emptyString
|
text: qsTr("Network status") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
id: statusTextVal
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
font.family: "Arial"
|
anchors.top: parent.top
|
||||||
font.pixelSize: 18 * scaleRatio
|
anchors.topMargin: 14
|
||||||
color: getConnectionStatusColor(item.connected)
|
font.family: Style.fontMedium.name
|
||||||
|
font.pixelSize: 20 * scaleRatio
|
||||||
|
color: "white"
|
||||||
text: getConnectionStatusString(item.connected) + translationManager.emptyString
|
text: getConnectionStatusString(item.connected) + translationManager.emptyString
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Controls.Styles 1.4
|
import QtQuick.Controls.Styles 1.4
|
||||||
|
@ -42,8 +42,8 @@ Item {
|
||||||
id: bg
|
id: bg
|
||||||
z: parent.z + 1
|
z: parent.z + 1
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: "white"
|
color: "black"
|
||||||
opacity: 0.9
|
opacity: 0.8
|
||||||
}
|
}
|
||||||
|
|
||||||
property alias password: passwordInput1.text
|
property alias password: passwordInput1.text
|
||||||
|
@ -93,57 +93,60 @@ Item {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: column
|
id: column
|
||||||
//anchors {fill: parent; margins: 16 }
|
|
||||||
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.maximumWidth: 400 * scaleRatio
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: qsTr("Please enter new password")
|
text: qsTr("Please enter new password")
|
||||||
Layout.alignment: Qt.AlignHCenter
|
anchors.left: parent.left
|
||||||
Layout.columnSpan: 2
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
font.pixelSize: 18 * scaleRatio
|
font.pixelSize: 16 * scaleRatio
|
||||||
font.family: "Arial"
|
font.family: Style.fontLight.name
|
||||||
color: "#555555"
|
|
||||||
|
color: Style.defaultFontColor
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id : passwordInput1
|
id : passwordInput1
|
||||||
|
Layout.topMargin: 6
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
anchors.left: parent.left
|
||||||
Layout.maximumWidth: 400 * scaleRatio
|
horizontalAlignment: TextInput.AlignLeft
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
|
||||||
verticalAlignment: TextInput.AlignVCenter
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
font.family: "Arial"
|
font.family: Style.fontLight.name
|
||||||
font.pixelSize: 32 * scaleRatio
|
font.pixelSize: 24 * scaleRatio
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
|
bottomPadding: 10
|
||||||
|
leftPadding: 10
|
||||||
|
topPadding: 10
|
||||||
|
color: Style.defaultFontColor
|
||||||
KeyNavigation.tab: passwordInput2
|
KeyNavigation.tab: passwordInput2
|
||||||
|
|
||||||
style: TextFieldStyle {
|
background: Rectangle {
|
||||||
renderType: Text.NativeRendering
|
radius: 2
|
||||||
textColor: "#35B05A"
|
border.color: Qt.rgba(255, 255, 255, 0.35)
|
||||||
passwordCharacter: "•"
|
border.width: 1
|
||||||
// no background
|
color: "black"
|
||||||
background: Rectangle {
|
|
||||||
radius: 0
|
Image {
|
||||||
border.width: 0
|
width: 12
|
||||||
|
height: 16
|
||||||
|
source: "../images/lockIcon.png"
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onEscapePressed: {
|
Keys.onEscapePressed: {
|
||||||
root.close()
|
root.close()
|
||||||
root.rejected()
|
root.rejected()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// underline
|
|
||||||
Rectangle {
|
|
||||||
height: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
anchors.bottomMargin: 3
|
|
||||||
Layout.maximumWidth: passwordInput1.width
|
|
||||||
}
|
|
||||||
// padding
|
// padding
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -155,37 +158,47 @@ Item {
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: qsTr("Please confirm new password")
|
text: qsTr("Please confirm new password")
|
||||||
Layout.alignment: Qt.AlignHCenter
|
anchors.left: parent.left
|
||||||
Layout.columnSpan: 2
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
font.pixelSize: 18 * scaleRatio
|
font.pixelSize: 16 * scaleRatio
|
||||||
font.family: "Arial"
|
font.family: Style.fontLight.name
|
||||||
color: "#555555"
|
|
||||||
|
color: Style.defaultFontColor
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id : passwordInput2
|
id : passwordInput2
|
||||||
|
Layout.topMargin: 6
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
anchors.left: parent.left
|
||||||
Layout.maximumWidth: 400 * scaleRatio
|
horizontalAlignment: TextInput.AlignLeft
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
|
||||||
verticalAlignment: TextInput.AlignVCenter
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
font.family: "Arial"
|
font.family: Style.fontLight.name
|
||||||
font.pixelSize: 32 * scaleRatio
|
font.pixelSize: 24 * scaleRatio
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
KeyNavigation.tab: okButton
|
KeyNavigation.tab: okButton
|
||||||
|
bottomPadding: 10
|
||||||
|
leftPadding: 10
|
||||||
|
topPadding: 10
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
|
||||||
style: TextFieldStyle {
|
background: Rectangle {
|
||||||
renderType: Text.NativeRendering
|
radius: 2
|
||||||
textColor: "#35B05A"
|
border.color: Qt.rgba(255, 255, 255, 0.35)
|
||||||
passwordCharacter: "•"
|
border.width: 1
|
||||||
// no background
|
color: "black"
|
||||||
background: Rectangle {
|
|
||||||
radius: 0
|
Image {
|
||||||
border.width: 0
|
width: 12
|
||||||
|
height: 16
|
||||||
|
source: "../images/lockIcon.png"
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
if (passwordInput1.text === passwordInput2.text) {
|
if (passwordInput1.text === passwordInput2.text) {
|
||||||
root.close()
|
root.close()
|
||||||
|
@ -198,15 +211,6 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// underline
|
|
||||||
Rectangle {
|
|
||||||
height: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
anchors.bottomMargin: 3
|
|
||||||
Layout.maximumWidth: passwordInput1.width
|
|
||||||
}
|
|
||||||
// padding
|
// padding
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -215,38 +219,32 @@ Item {
|
||||||
opacity: 0
|
opacity: 0
|
||||||
color: "black"
|
color: "black"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Ok/Cancel buttons
|
|
||||||
RowLayout {
|
|
||||||
id: buttons
|
|
||||||
spacing: 60 * scaleRatio
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
// Ok/Cancel buttons
|
||||||
id: cancelButton
|
RowLayout {
|
||||||
shadowReleasedColor: "#FF4304"
|
id: buttons
|
||||||
shadowPressedColor: "#B32D00"
|
spacing: 16 * scaleRatio
|
||||||
releasedColor: "#FF6C3C"
|
Layout.topMargin: 16
|
||||||
pressedColor: "#FF4304"
|
Layout.alignment: Qt.AlignRight
|
||||||
text: qsTr("Cancel") + translationManager.emptyString
|
|
||||||
KeyNavigation.tab: passwordInput1
|
MoneroComponents.StandardButton {
|
||||||
onClicked: {
|
id: cancelButton
|
||||||
root.close()
|
text: qsTr("Cancel") + translationManager.emptyString
|
||||||
root.rejected()
|
KeyNavigation.tab: passwordInput1
|
||||||
|
onClicked: {
|
||||||
|
root.close()
|
||||||
|
root.rejected()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
MoneroComponents.StandardButton {
|
||||||
MoneroComponents.StandardButton {
|
id: okButton
|
||||||
id: okButton
|
text: qsTr("Continue")
|
||||||
shadowReleasedColor: "#FF4304"
|
KeyNavigation.tab: cancelButton
|
||||||
shadowPressedColor: "#B32D00"
|
enabled: passwordInput1.text === passwordInput2.text
|
||||||
releasedColor: "#FF6C3C"
|
onClicked: {
|
||||||
pressedColor: "#FF4304"
|
root.close()
|
||||||
text: qsTr("Continue")
|
root.accepted()
|
||||||
KeyNavigation.tab: cancelButton
|
}
|
||||||
enabled: passwordInput1.text === passwordInput2.text
|
|
||||||
onClicked: {
|
|
||||||
root.close()
|
|
||||||
root.accepted()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Controls.Styles 1.4
|
import QtQuick.Controls.Styles 1.4
|
||||||
|
@ -38,13 +38,6 @@ import "../components" as MoneroComponents
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
visible: false
|
visible: false
|
||||||
Rectangle {
|
|
||||||
id: bg
|
|
||||||
z: parent.z + 1
|
|
||||||
anchors.fill: parent
|
|
||||||
color: "white"
|
|
||||||
opacity: 0.9
|
|
||||||
}
|
|
||||||
|
|
||||||
property alias password: passwordInput.text
|
property alias password: passwordInput.text
|
||||||
property string walletName
|
property string walletName
|
||||||
|
@ -61,7 +54,7 @@ Item {
|
||||||
titleBar.enabled = false
|
titleBar.enabled = false
|
||||||
show()
|
show()
|
||||||
root.visible = true;
|
root.visible = true;
|
||||||
passwordInput.focus = true
|
passwordInput.forceActiveFocus();
|
||||||
passwordInput.text = ""
|
passwordInput.text = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,42 +74,54 @@ Item {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: column
|
id: column
|
||||||
//anchors {fill: parent; margins: 16 }
|
|
||||||
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.maximumWidth: 400 * scaleRatio
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: root.walletName.length > 0 ? qsTr("Please enter wallet password for:<br>") + root.walletName : qsTr("Please enter wallet password")
|
text: qsTr("Please enter wallet password")
|
||||||
Layout.alignment: Qt.AlignHCenter
|
anchors.left: parent.left
|
||||||
Layout.columnSpan: 2
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
font.pixelSize: 18 * scaleRatio
|
font.pixelSize: 16 * scaleRatio
|
||||||
font.family: "Arial"
|
font.family: Style.fontLight.name
|
||||||
color: "#555555"
|
|
||||||
|
color: Style.defaultFontColor
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id : passwordInput
|
id : passwordInput
|
||||||
|
Layout.topMargin: 6
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
anchors.left: parent.left
|
||||||
Layout.maximumWidth: 400 * scaleRatio
|
horizontalAlignment: TextInput.AlignLeft
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
|
||||||
verticalAlignment: TextInput.AlignVCenter
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
font.family: "Arial"
|
font.family: Style.fontLight.name
|
||||||
font.pixelSize: 32 * scaleRatio
|
font.pixelSize: 24 * scaleRatio
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
KeyNavigation.tab: okButton
|
KeyNavigation.tab: okButton
|
||||||
|
bottomPadding: 10
|
||||||
|
leftPadding: 10
|
||||||
|
topPadding: 10
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
|
||||||
style: TextFieldStyle {
|
background: Rectangle {
|
||||||
renderType: Text.NativeRendering
|
radius: 2
|
||||||
textColor: "#35B05A"
|
border.color: Qt.rgba(255, 255, 255, 0.35)
|
||||||
passwordCharacter: "•"
|
border.width: 1
|
||||||
// no background
|
color: "black"
|
||||||
background: Rectangle {
|
|
||||||
radius: 0
|
Image {
|
||||||
border.width: 0
|
width: 12
|
||||||
|
height: 16
|
||||||
|
source: "../images/lockIcon.png"
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
root.close()
|
root.close()
|
||||||
root.accepted()
|
root.accepted()
|
||||||
|
@ -127,52 +132,45 @@ Item {
|
||||||
root.rejected()
|
root.rejected()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// underline
|
|
||||||
Rectangle {
|
|
||||||
height: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
anchors.bottomMargin: 3
|
|
||||||
Layout.maximumWidth: passwordInput.width
|
|
||||||
|
|
||||||
}
|
// Ok/Cancel buttons
|
||||||
}
|
RowLayout {
|
||||||
// Ok/Cancel buttons
|
id: buttons
|
||||||
RowLayout {
|
spacing: 16 * scaleRatio
|
||||||
id: buttons
|
Layout.topMargin: 16
|
||||||
spacing: 60 * scaleRatio
|
Layout.alignment: Qt.AlignRight
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: cancelButton
|
id: cancelButton
|
||||||
shadowReleasedColor: "#FF4304"
|
small: true
|
||||||
shadowPressedColor: "#B32D00"
|
text: qsTr("Cancel") + translationManager.emptyString
|
||||||
releasedColor: "#FF6C3C"
|
KeyNavigation.tab: passwordInput
|
||||||
pressedColor: "#FF4304"
|
onClicked: {
|
||||||
text: qsTr("Cancel") + translationManager.emptyString
|
root.close()
|
||||||
KeyNavigation.tab: passwordInput
|
root.rejected()
|
||||||
onClicked: {
|
}
|
||||||
root.close()
|
}
|
||||||
root.rejected()
|
|
||||||
}
|
MoneroComponents.StandardButton {
|
||||||
}
|
id: okButton
|
||||||
MoneroComponents.StandardButton {
|
small: true
|
||||||
id: okButton
|
text: qsTr("Continue")
|
||||||
shadowReleasedColor: "#FF4304"
|
KeyNavigation.tab: cancelButton
|
||||||
shadowPressedColor: "#B32D00"
|
onClicked: {
|
||||||
releasedColor: "#FF6C3C"
|
root.close()
|
||||||
pressedColor: "#FF4304"
|
root.accepted()
|
||||||
text: qsTr("Continue")
|
}
|
||||||
KeyNavigation.tab: cancelButton
|
|
||||||
onClicked: {
|
|
||||||
root.close()
|
|
||||||
root.accepted()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Rectangle {
|
||||||
|
id: bg
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
color: "black"
|
||||||
|
opacity: 0.8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,13 +28,15 @@
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import moneroComponents.Wallet 1.0
|
import moneroComponents.Wallet 1.0
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: item
|
id: item
|
||||||
property int fillLevel: 0
|
property int fillLevel: 0
|
||||||
property string syncType // Wallet or Daemon
|
property string syncType // Wallet or Daemon
|
||||||
property string syncText: qsTr("%1 blocks remaining: ").arg(syncType)
|
property string syncText: qsTr("%1 blocks remaining: ").arg(syncType)
|
||||||
color: "#1C1C1C"
|
visible: false
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
function updateProgress(currentBlock,targetBlock, blocksToSync, statusTxt){
|
function updateProgress(currentBlock,targetBlock, blocksToSync, statusTxt){
|
||||||
if(targetBlock > 0) {
|
if(targetBlock > 0) {
|
||||||
|
@ -50,33 +52,58 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
anchors.top: item.top
|
||||||
|
anchors.topMargin: 10 * scaleRatio
|
||||||
anchors.leftMargin: 15 * scaleRatio
|
anchors.leftMargin: 15 * scaleRatio
|
||||||
anchors.rightMargin: 15 * scaleRatio
|
anchors.rightMargin: 15 * scaleRatio
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: progressText
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 6
|
||||||
|
font.family: Style.fontMedium.name
|
||||||
|
font.pixelSize: 13 * scaleRatio
|
||||||
|
font.bold: true
|
||||||
|
color: "white"
|
||||||
|
text: qsTr("Synchronizing %1").arg(syncType)
|
||||||
|
height: 18 * scaleRatio
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: progressTextValue
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 6
|
||||||
|
anchors.right: parent.right
|
||||||
|
font.family: Style.fontMedium.name
|
||||||
|
font.pixelSize: 13 * scaleRatio
|
||||||
|
font.bold: true
|
||||||
|
color: "white"
|
||||||
|
height:18 * scaleRatio
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: bar
|
id: bar
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: progressText.bottom
|
||||||
height: 22 * scaleRatio
|
anchors.topMargin: 4
|
||||||
radius: 2 * scaleRatio
|
height: 8 * scaleRatio
|
||||||
color: "#FFFFFF"
|
radius: 8 * scaleRatio
|
||||||
|
color: "#333333" // progressbar bg
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: fillRect
|
id: fillRect
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.margins: 2 * scaleRatio
|
|
||||||
height: bar.height
|
height: bar.height
|
||||||
property int maxWidth: parent.width - 4 * scaleRatio
|
property int maxWidth: bar.width - 4 * scaleRatio
|
||||||
width: (maxWidth * fillLevel) / 100
|
width: (maxWidth * fillLevel) / 100
|
||||||
color: {
|
radius: 8
|
||||||
if(item.fillLevel < 99 ) return "#FF6C3C"
|
// could change color based on progressbar status; if(item.fillLevel < 99 )
|
||||||
//if(item.fillLevel < 99) return "#FFE00A"
|
color: "#FA6800"
|
||||||
return "#36B25C"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -84,16 +111,6 @@ Rectangle {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 8 * scaleRatio
|
anchors.leftMargin: 8 * scaleRatio
|
||||||
|
|
||||||
Text {
|
|
||||||
id:progressText
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 12 * scaleRatio
|
|
||||||
color: "#000"
|
|
||||||
text: qsTr("Synchronizing %1").arg(syncType)
|
|
||||||
height:18 * scaleRatio
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,25 @@ import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: (isMobile) ? 1 : 2
|
columns: (isMobile) ? 1 : 2
|
||||||
|
columnSpacing: 32
|
||||||
id: root
|
id: root
|
||||||
property alias daemonAddrText: daemonAddr.text
|
property alias daemonAddrText: daemonAddr.text
|
||||||
property alias daemonPortText: daemonPort.text
|
property alias daemonPortText: daemonPort.text
|
||||||
|
property alias daemonAddrLabelText: daemonAddr.labelText
|
||||||
|
property alias daemonPortLabelText: daemonPort.labelText
|
||||||
|
|
||||||
|
// TODO: LEGACY; remove these placeHolder variables when
|
||||||
|
// the wizards get redesigned to the black-theme
|
||||||
|
property string placeholderFontFamily: Style.fontRegular.name
|
||||||
|
property bool placeholderFontBold: false
|
||||||
|
property int placeholderFontSize: 18 * scaleRatio
|
||||||
|
property string placeholderColor: Style.defaultFontColor
|
||||||
|
property real placeholderOpacity: 0.25
|
||||||
|
|
||||||
|
property string lineEditBorderColor: Qt.rgba(0, 0, 0, 0.15)
|
||||||
|
property string lineEditBackgroundColor: "white"
|
||||||
|
property string lineEditFontColor: "black"
|
||||||
|
property bool lineEditFontBold: true
|
||||||
|
|
||||||
signal editingFinished()
|
signal editingFinished()
|
||||||
|
|
||||||
|
@ -47,14 +63,31 @@ GridLayout {
|
||||||
id: daemonAddr
|
id: daemonAddr
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: qsTr("Remote Node Hostname / IP") + translationManager.emptyString
|
placeholderText: qsTr("Remote Node Hostname / IP") + translationManager.emptyString
|
||||||
|
placeholderFontFamily: root.placeholderFontFamily
|
||||||
|
placeholderFontBold: root.placeholderFontBold
|
||||||
|
placeholderFontSize: root.placeholderFontSize
|
||||||
|
placeholderColor: root.placeholderColor
|
||||||
|
placeholderOpacity: root.placeholderOpacity
|
||||||
onEditingFinished: root.editingFinished()
|
onEditingFinished: root.editingFinished()
|
||||||
|
borderColor: lineEditBorderColor
|
||||||
|
backgroundColor: lineEditBackgroundColor
|
||||||
|
fontColor: lineEditFontColor
|
||||||
|
fontBold: lineEditFontBold
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LineEdit {
|
LineEdit {
|
||||||
id: daemonPort
|
id: daemonPort
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: qsTr("Port") + translationManager.emptyString
|
placeholderText: qsTr("Port") + translationManager.emptyString
|
||||||
|
placeholderFontFamily: root.placeholderFontFamily
|
||||||
|
placeholderFontBold: root.placeholderFontBold
|
||||||
|
placeholderFontSize: root.placeholderFontSize
|
||||||
|
placeholderColor: root.placeholderColor
|
||||||
|
placeholderOpacity: root.placeholderOpacity
|
||||||
onEditingFinished: root.editingFinished()
|
onEditingFinished: root.editingFinished()
|
||||||
|
borderColor: lineEditBorderColor
|
||||||
|
backgroundColor: lineEditBackgroundColor
|
||||||
|
fontColor: lineEditFontColor
|
||||||
|
fontBold: lineEditFontBold
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: scroll
|
id: scroll
|
||||||
|
|
||||||
width: 15
|
width: 4
|
||||||
height: {
|
height: {
|
||||||
var t = (flickable.height * flickable.height) / flickable.contentHeight
|
var t = (flickable.height * flickable.height) / flickable.contentHeight
|
||||||
return t < 20 ? 20 : t
|
return t < 20 ? 20 : t
|
||||||
|
@ -62,7 +62,7 @@ Item {
|
||||||
visible: flickable.contentHeight > flickable.height
|
visible: flickable.contentHeight > flickable.height
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
NumberAnimation { duration: 200; easing.type: Easing.InQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|
|
@ -28,22 +28,25 @@
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: button
|
id: button
|
||||||
height: 37 * scaleRatio
|
property string rightIcon: ""
|
||||||
property string shadowPressedColor: "#B32D00"
|
|
||||||
property string shadowReleasedColor: "#FF4304"
|
|
||||||
property string pressedColor: "#FF4304"
|
|
||||||
property string releasedColor: "#FF6C3C"
|
|
||||||
property string icon: ""
|
property string icon: ""
|
||||||
property string textColor: "#FFFFFF"
|
property string textColor: button.enabled? Style.buttonTextColor: Style.buttonTextColorDisabled
|
||||||
property int fontSize: 12 * scaleRatio
|
property bool small: false
|
||||||
property alias text: label.text
|
property alias text: label.text
|
||||||
|
property int fontSize: {
|
||||||
|
if(small) return 14 * scaleRatio;
|
||||||
|
else return 16 * scaleRatio;
|
||||||
|
}
|
||||||
signal clicked()
|
signal clicked()
|
||||||
|
|
||||||
// Dynamic label width
|
// Dynamic height/width
|
||||||
Layout.minimumWidth: (label.contentWidth > 50)? label.contentWidth + 10 : 60
|
Layout.minimumWidth: (label.contentWidth > 50)? label.contentWidth + 22 : 60
|
||||||
|
height: small ? 30 * scaleRatio : 36 * scaleRatio
|
||||||
|
|
||||||
|
|
||||||
function doClick() {
|
function doClick() {
|
||||||
// Android workaround
|
// Android workaround
|
||||||
|
@ -55,30 +58,27 @@ Item {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
height: parent.height - 1
|
height: parent.height - 1
|
||||||
y: buttonArea.pressed ? 0 : 1
|
radius: 3
|
||||||
//radius: 4
|
color: parent.enabled ? Style.buttonBackgroundColor : Style.buttonBackgroundColorDisabled
|
||||||
color: {
|
|
||||||
parent.enabled ? (buttonArea.pressed ? parent.shadowPressedColor : parent.shadowReleasedColor)
|
|
||||||
: Qt.lighter(parent.shadowReleasedColor)
|
|
||||||
}
|
|
||||||
border.color: Qt.darker(parent.releasedColor)
|
|
||||||
border.width: parent.focus ? 1 : 0
|
border.width: parent.focus ? 1 : 0
|
||||||
|
|
||||||
}
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
Rectangle {
|
propagateComposedEvents: true
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
height: parent.height - 1
|
|
||||||
y: buttonArea.pressed ? 1 : 0
|
|
||||||
color: {
|
|
||||||
parent.enabled ? (buttonArea.pressed ? parent.pressedColor : parent.releasedColor)
|
|
||||||
: Qt.lighter(parent.releasedColor)
|
|
||||||
|
|
||||||
|
// possibly do some hover effects here
|
||||||
|
onEntered: {
|
||||||
|
// if(button.enabled) parent.color = Style.buttonBackgroundColorHover;
|
||||||
|
// else parent.color = Style.buttonBackgroundColorDisabledHover;
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
// if(button.enabled) parent.color = Style.buttonBackgroundColor;
|
||||||
|
// else parent.color = Style.buttonBackgroundColorDisabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//radius: 4
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
@ -87,12 +87,11 @@ Item {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
font.family: "Arial"
|
font.family: Style.fontBold.name
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: button.fontSize
|
font.pixelSize: buttonArea.pressed ? button.fontSize - 1 : button.fontSize
|
||||||
color: parent.textColor
|
color: parent.textColor
|
||||||
visible: parent.icon === ""
|
visible: parent.icon === ""
|
||||||
// font.capitalization : Font.Capitalize
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
@ -105,6 +104,7 @@ Item {
|
||||||
id: buttonArea
|
id: buttonArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: doClick()
|
onClicked: doClick()
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onSpacePressed: doClick()
|
Keys.onSpacePressed: doClick()
|
||||||
|
|
|
@ -27,17 +27,19 @@
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Controls.Styles 1.4
|
import QtQuick.Controls.Styles 1.4
|
||||||
import QtQuick.Window 2.0
|
import QtQuick.Window 2.0
|
||||||
|
|
||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
color: "white"
|
color: "transparent"
|
||||||
visible: false
|
visible: false
|
||||||
property alias title: dialogTitle.text
|
property alias title: dialogTitle.text
|
||||||
property alias text: dialogContent.text
|
property alias text: dialogContent.text
|
||||||
|
@ -55,6 +57,14 @@ Rectangle {
|
||||||
signal rejected()
|
signal rejected()
|
||||||
signal closeCallback();
|
signal closeCallback();
|
||||||
|
|
||||||
|
Image {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
source: "../images/middlePanelBg.jpg"
|
||||||
|
}
|
||||||
|
|
||||||
// Make window draggable
|
// Make window draggable
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -68,7 +78,7 @@ Rectangle {
|
||||||
// Center
|
// Center
|
||||||
if(!isMobile) {
|
if(!isMobile) {
|
||||||
root.x = parent.width/2 - root.width/2
|
root.x = parent.width/2 - root.width/2
|
||||||
root.y = screenHeight/2 - root.height/2
|
root.y = 100
|
||||||
}
|
}
|
||||||
show()
|
show()
|
||||||
root.z = 11
|
root.z = 11
|
||||||
|
@ -81,13 +91,13 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: implement without hardcoding sizes
|
// TODO: implement without hardcoding sizes
|
||||||
width: isMobile ? screenWidth : 480
|
width: isMobile ? screenWidth : 520
|
||||||
height: isMobile ? screenHeight : 280
|
height: isMobile ? screenHeight : 380
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
spacing: 10
|
spacing: 10
|
||||||
anchors { fill: parent; margins: 35 }
|
anchors { fill: parent; margins: 15 }
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: column
|
id: column
|
||||||
|
@ -97,9 +107,9 @@ Rectangle {
|
||||||
Label {
|
Label {
|
||||||
id: dialogTitle
|
id: dialogTitle
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
font.pixelSize: 18 * scaleRatio
|
fontSize: 18 * scaleRatio
|
||||||
font.family: "Arial"
|
fontFamily: "Arial"
|
||||||
color: "#555555"
|
color: Style.defaultFontColor
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -109,12 +119,14 @@ Rectangle {
|
||||||
id : dialogContent
|
id : dialogContent
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
font.family: "Arial"
|
renderType: Text.QtRendering
|
||||||
|
font.family: Style.fontLight.name
|
||||||
textFormat: TextEdit.AutoText
|
textFormat: TextEdit.AutoText
|
||||||
readOnly: true
|
readOnly: true
|
||||||
font.pixelSize: 12 * scaleRatio
|
font.pixelSize: 14 * scaleRatio
|
||||||
selectByMouse: false
|
selectByMouse: false
|
||||||
wrapMode: TextEdit.Wrap
|
wrapMode: TextEdit.Wrap
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -140,10 +152,6 @@ Rectangle {
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: cancelButton
|
id: cancelButton
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
text: qsTr("Cancel") + translationManager.emptyString
|
text: qsTr("Cancel") + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.close()
|
root.close()
|
||||||
|
@ -153,10 +161,6 @@ Rectangle {
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: okButton
|
id: okButton
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
text: qsTr("OK")
|
text: qsTr("OK")
|
||||||
KeyNavigation.tab: cancelButton
|
KeyNavigation.tab: cancelButton
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -168,6 +172,38 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// window borders
|
||||||
|
Rectangle{
|
||||||
|
width: 1
|
||||||
|
color: Style.grey
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
width: 1
|
||||||
|
color: Style.grey
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
height: 1
|
||||||
|
color: Style.grey
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
height: 1
|
||||||
|
color: Style.grey
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: dropdown
|
id: dropdown
|
||||||
|
@ -38,11 +39,17 @@ Item {
|
||||||
property string textColor: "#FFFFFF"
|
property string textColor: "#FFFFFF"
|
||||||
property alias currentIndex: column.currentIndex
|
property alias currentIndex: column.currentIndex
|
||||||
property bool expanded: false
|
property bool expanded: false
|
||||||
|
property int dropdownHeight: 42
|
||||||
|
property int fontHeaderSize: 16 * scaleRatio
|
||||||
|
property int fontItemSize: 14 * scaleRatio
|
||||||
|
property string colorHeaderBackground: "transparent"
|
||||||
|
property bool headerBorder: true
|
||||||
|
property bool headerFontBold: false
|
||||||
|
|
||||||
|
height: dropdownHeight
|
||||||
|
|
||||||
signal changed();
|
signal changed();
|
||||||
|
|
||||||
height: 37 * scaleRatio
|
|
||||||
|
|
||||||
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
|
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
|
||||||
function hide() { dropdown.expanded = false }
|
function hide() { dropdown.expanded = false }
|
||||||
function containsPoint(px, py) {
|
function containsPoint(px, py) {
|
||||||
|
@ -60,7 +67,6 @@ Item {
|
||||||
// Workaroud for suspected memory leak in 5.8 causing malloc crash on app exit
|
// Workaroud for suspected memory leak in 5.8 causing malloc crash on app exit
|
||||||
function update() {
|
function update() {
|
||||||
firstColText.text = column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column1) + translationManager.emptyString : ""
|
firstColText.text = column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column1) + translationManager.emptyString : ""
|
||||||
secondColText.text = column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column2) + translationManager.emptyString : ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -68,42 +74,14 @@ Item {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
height: 37 * scaleRatio
|
height: dropdown.dropdownHeight
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.left: parent.left
|
color: dropdown.colorHeaderBackground
|
||||||
anchors.right: parent.right
|
border.width: dropdown.headerBorder ? 1 : 0
|
||||||
height: parent.height - 1
|
border.color: Qt.rgba(1, 1, 1, 0.25)
|
||||||
y: dropdown.expanded || droplist.height > 0 ? 0 : 1
|
radius: 4
|
||||||
color: dropdown.expanded || droplist.height > 0 ? dropdown.shadowPressedColor : dropdown.shadowReleasedColor
|
anchors.fill: parent
|
||||||
//radius: 4
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
height: parent.height - 1
|
|
||||||
y: dropdown.expanded || droplist.height > 0 ? 1 : 0
|
|
||||||
color: dropdown.expanded || droplist.height > 0 ? dropdown.pressedColor : dropdown.releasedColor
|
|
||||||
//radius: 4
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
height: 3 * scaleRatio
|
|
||||||
width: 3 * scaleRatio
|
|
||||||
color: dropdown.pressedColor
|
|
||||||
visible: dropdown.expanded || droplist.height > 0
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
height: 3 * scaleRatio
|
|
||||||
width: 3 * scaleRatio
|
|
||||||
color: dropdown.pressedColor
|
|
||||||
visible: dropdown.expanded || droplist.height > 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
@ -112,31 +90,9 @@ Item {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 12 * scaleRatio
|
anchors.leftMargin: 12 * scaleRatio
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
font.family: "Arial"
|
font.family: Style.fontRegular.name
|
||||||
font.bold: true
|
font.bold: dropdown.headerFontBold
|
||||||
font.pixelSize: 12 * scaleRatio
|
font.pixelSize: dropdown.fontHeaderSize
|
||||||
color: "#FFFFFF"
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: secondColText
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.right: separator.left
|
|
||||||
anchors.rightMargin: 12 * scaleRatio
|
|
||||||
width: dropdown.expanded ? w : (separator.x - 12) - (firstColText.x + firstColText.width + 5)
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 12 * scaleRatio
|
|
||||||
color: "#FFFFFF"
|
|
||||||
property int w: 0
|
|
||||||
Component.onCompleted: w = implicitWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: separator
|
|
||||||
anchors.right: dropIndicator.left
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
height: 18 * scaleRatio
|
|
||||||
width: 1
|
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,6 +114,8 @@ Item {
|
||||||
id: dropArea
|
id: dropArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: dropdown.expanded = !dropdown.expanded
|
onClicked: dropdown.expanded = !dropdown.expanded
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,24 +169,24 @@ Item {
|
||||||
property string stringSent: qsTr("Sent") + translationManager.emptyString
|
property string stringSent: qsTr("Sent") + translationManager.emptyString
|
||||||
property string stringReceived: qsTr("Received") + translationManager.emptyString
|
property string stringReceived: qsTr("Received") + translationManager.emptyString
|
||||||
|
|
||||||
|
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
height: 30 * scaleRatio
|
height: (dropdown.dropdownHeight * 0.75) * scaleRatio
|
||||||
//radius: index === repeater.count - 1 ? 4 : 0
|
//radius: index === repeater.count - 1 ? 4 : 0
|
||||||
color: itemArea.containsMouse || index === column.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor
|
color: itemArea.containsMouse || index === column.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
id: col1Text
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: col2Text.left
|
anchors.right: col2Text.left
|
||||||
anchors.leftMargin: 12 * scaleRatio
|
anchors.leftMargin: 12 * scaleRatio
|
||||||
anchors.rightMargin: column2.length > 0 ? 12 * scaleRatio: 0
|
anchors.rightMargin: 0
|
||||||
font.family: "Arial"
|
font.family: Style.fontRegular.name
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: 12 * scaleRatio
|
font.pixelSize: fontItemSize
|
||||||
color: "#FFFFFF"
|
color: itemArea.containsMouse || index === column.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF"
|
||||||
text: qsTr(column1) + translationManager.emptyString
|
text: qsTr(column1) + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,10 +195,10 @@ Item {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 45 * scaleRatio
|
anchors.rightMargin: 45 * scaleRatio
|
||||||
font.family: "Arial"
|
font.family: Style.fontRegular.name
|
||||||
font.pixelSize: 12 * scaleRatio
|
font.pixelSize: 14 * scaleRatio
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
text: column2
|
text: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -261,6 +219,8 @@ Item {
|
||||||
id: itemArea
|
id: itemArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
dropdown.expanded = false
|
dropdown.expanded = false
|
||||||
column.currentIndex = index
|
column.currentIndex = index
|
||||||
|
|
29
components/Style.qml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
pragma Singleton
|
||||||
|
|
||||||
|
import QtQuick 2.5
|
||||||
|
|
||||||
|
QtObject {
|
||||||
|
property QtObject fontMedium: FontLoader { id: _fontMedium; source: "qrc:/fonts/SFUIDisplay-Medium.otf"; }
|
||||||
|
property QtObject fontBold: FontLoader { id: _fontBold; source: "qrc:/fonts/SFUIDisplay-Bold.otf"; }
|
||||||
|
property QtObject fontLight: FontLoader { id: _fontLight; source: "qrc:/fonts/SFUIDisplay-Light.otf"; }
|
||||||
|
property QtObject fontRegular: FontLoader { id: _fontRegular; source: "qrc:/fonts/SFUIDisplay-Regular.otf"; }
|
||||||
|
|
||||||
|
property string grey: "#404040"
|
||||||
|
|
||||||
|
property string defaultFontColor: "white"
|
||||||
|
property string greyFontColor: "#808080"
|
||||||
|
property string dimmedFontColor: "#BBBBBB"
|
||||||
|
property string inputBoxBackground: "black"
|
||||||
|
property string inputBoxBackgroundError: "#FFDDDD"
|
||||||
|
property string inputBoxColor: "white"
|
||||||
|
property string legacy_placeholderFontColor: "#BABABA"
|
||||||
|
|
||||||
|
property string buttonBackgroundColor: "#FA6800"
|
||||||
|
property string buttonBackgroundColorHover: "#E65E00"
|
||||||
|
property string buttonBackgroundColorDisabled: "#707070"
|
||||||
|
property string buttonBackgroundColorDisabledHover: "#808080"
|
||||||
|
property string buttonTextColor: "white"
|
||||||
|
property string buttonTextColorDisabled: "black"
|
||||||
|
property string dividerColor: "white"
|
||||||
|
property real dividerOpacity: 0.25
|
||||||
|
}
|
|
@ -28,40 +28,59 @@
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import moneroComponents.Clipboard 1.0
|
import moneroComponents.Clipboard 1.0
|
||||||
|
import "../components"
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: listView
|
id: listView
|
||||||
clip: true
|
clip: true
|
||||||
boundsBehavior: ListView.StopAtBounds
|
boundsBehavior: ListView.StopAtBounds
|
||||||
highlightMoveDuration: 0
|
highlightMoveDuration: 0
|
||||||
|
highlightFollowsCurrentItem: true
|
||||||
|
anchors.topMargin: 0
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
id: delegate
|
id: delegate
|
||||||
height: 64
|
height: 80
|
||||||
|
color: 'transparent';
|
||||||
|
anchors.topMargin: 0
|
||||||
width: listView.width
|
width: listView.width
|
||||||
|
clip: true
|
||||||
|
|
||||||
LineEdit {
|
LineEditMulti {
|
||||||
id: addressLine
|
id: addressLine
|
||||||
fontSize: 12
|
|
||||||
|
fontSize: 14
|
||||||
readOnly: true
|
readOnly: true
|
||||||
width: parent.width
|
width: parent.width
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: 5
|
anchors.leftMargin: 10
|
||||||
onTextChanged: cursorPosition = 0
|
anchors.topMargin: 12
|
||||||
|
anchors.rightMargin: 54
|
||||||
|
anchors.bottomMargin: 0
|
||||||
text: address
|
text: address
|
||||||
showBorder: false
|
|
||||||
|
|
||||||
IconButton {
|
showingHeader: false
|
||||||
id: clipboardButton
|
showBorder: false
|
||||||
imageSource: "../images/copyToClipboard.png"
|
addressValidation: false
|
||||||
onClicked: {
|
}
|
||||||
console.log(addressLine.text + " copied to clipboard");
|
|
||||||
clipboard.setText(addressLine.text);
|
IconButton {
|
||||||
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3);
|
id: clipboardButton
|
||||||
}
|
imageSource: "../images/copyToClipboard.png"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
console.log(addressLine.text + " copied to clipboard");
|
||||||
|
clipboard.setText(addressLine.text);
|
||||||
|
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 0
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
@ -85,7 +104,7 @@ ListView {
|
||||||
font.family: "Arial"
|
font.family: "Arial"
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
color: "#444444"
|
color: Style.greyFontColor
|
||||||
text: label
|
text: label
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,14 +115,46 @@ ListView {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: clipboardButton.width
|
anchors.rightMargin: clipboardButton.width
|
||||||
onClicked: listView.currentIndex = index
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: {
|
||||||
|
listView.currentIndex = index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
width: 1
|
||||||
|
color: Style.grey
|
||||||
|
z: 6
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
width: 1
|
||||||
|
color: Style.grey
|
||||||
|
z: 6
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
color: Style.grey
|
||||||
|
height: 1
|
||||||
|
z: 6
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: 3
|
||||||
|
color: 'white'
|
||||||
|
visible: listView.currentIndex == index
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
highlight: Rectangle {
|
|
||||||
height: 64
|
|
||||||
color: '#FF4304'
|
|
||||||
opacity: 0.2
|
|
||||||
z: 2
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,26 +36,40 @@ Rectangle {
|
||||||
property int offset: 0
|
property int offset: 0
|
||||||
|
|
||||||
height: 31
|
height: 31
|
||||||
color: "#FFFFFF"
|
color: "transparent"
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
width: 1
|
||||||
|
color: "#808080"
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
width: 1
|
||||||
|
color: "#808080"
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
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
|
||||||
height: 1
|
height: 1
|
||||||
color: "#DBDBDB"
|
color: "#808080"
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: row
|
id: row
|
||||||
anchors.horizontalCenter: header.offset !== 0 ? undefined: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.left: header.offset !== 0 ? parent.left : undefined
|
|
||||||
anchors.leftMargin: header.offset
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
height: 31
|
height: 31
|
||||||
width: 1
|
width: 1
|
||||||
color: "#DBDBDB"
|
color: "#808080"
|
||||||
}
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
@ -70,6 +84,7 @@ Rectangle {
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
id: delegate
|
id: delegate
|
||||||
property bool desc: false
|
property bool desc: false
|
||||||
|
color: "transparent"
|
||||||
height: 31
|
height: 31
|
||||||
width: columnWidth
|
width: columnWidth
|
||||||
|
|
||||||
|
@ -86,7 +101,7 @@ Rectangle {
|
||||||
color: {
|
color: {
|
||||||
if(delegateArea.pressed)
|
if(delegateArea.pressed)
|
||||||
return "#FF4304"
|
return "#FF4304"
|
||||||
return index === header.activeSortColumn || delegateArea.containsMouse ? "#FF6C3C" : "#4A4949"
|
return index === header.activeSortColumn || delegateArea.containsMouse ? "white" : "#808080"
|
||||||
}
|
}
|
||||||
text: qsTr(columnName) + translationManager.emptyString
|
text: qsTr(columnName) + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
@ -95,6 +110,7 @@ Rectangle {
|
||||||
id: delegateArea
|
id: delegateArea
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
delegate.desc = !delegate.desc
|
delegate.desc = !delegate.desc
|
||||||
header.activeSortColumn = index
|
header.activeSortColumn = index
|
||||||
|
@ -170,7 +186,7 @@ Rectangle {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
height: 1
|
height: 1
|
||||||
color: index === header.activeSortColumn ? "#FFFFFF" : "#DBDBDB"
|
color: "transparent"
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -178,7 +194,7 @@ Rectangle {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
width: 1
|
width: 1
|
||||||
color: "#DBDBDB"
|
color: "#808080"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
TextEdit {
|
TextEdit {
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
readOnly: true
|
readOnly: true
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: delegateItem
|
id: delegateItem
|
||||||
|
@ -50,7 +52,7 @@ Item {
|
||||||
font.family: "Arial"
|
font.family: "Arial"
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: 12 * scaleRatio
|
font.pixelSize: 12 * scaleRatio
|
||||||
color: "#4A4949"
|
color: Style.defaultFontColor
|
||||||
text: {
|
text: {
|
||||||
if(currentIndex === 0) return qsTr("Default") + translationManager.emptyString
|
if(currentIndex === 0) return qsTr("Default") + translationManager.emptyString
|
||||||
if(currentIndex === 13) return qsTr("High") + translationManager.emptyString
|
if(currentIndex === 13) return qsTr("High") + translationManager.emptyString
|
||||||
|
|
|
@ -32,50 +32,78 @@ import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: titleBar
|
id: titleBar
|
||||||
color: "#000000"
|
|
||||||
property int mouseX: 0
|
property int mouseX: 0
|
||||||
property bool containsMouse: false
|
property bool containsMouse: false
|
||||||
property alias basicButtonVisible: goToBasicVersionButton.visible
|
property alias basicButtonVisible: goToBasicVersionButton.visible
|
||||||
property bool customDecorations: true
|
property bool customDecorations: true
|
||||||
signal goToBasicVersion(bool yes)
|
signal goToBasicVersion(bool yes)
|
||||||
height: customDecorations && !isMobile ? 30 : 0
|
height: customDecorations && !isMobile ? 50 : 0
|
||||||
y: -height
|
y: -height
|
||||||
property string title
|
property string title
|
||||||
property alias maximizeButtonVisible: maximizeButton.visible
|
property alias maximizeButtonVisible: maximizeButton.visible
|
||||||
z: 1
|
z: 1
|
||||||
|
|
||||||
Text {
|
Item {
|
||||||
anchors.centerIn: parent
|
id: test
|
||||||
font.family: "Arial"
|
width: parent.width
|
||||||
font.pixelSize: 15
|
height: 50
|
||||||
color: "#FFFFFF"
|
z: 1
|
||||||
text: titleBar.title
|
|
||||||
visible: customDecorations
|
// use jpg for gradiency
|
||||||
|
Image {
|
||||||
|
anchors.fill: parent
|
||||||
|
height: parent.height
|
||||||
|
width: parent.width
|
||||||
|
source: "../images/titlebarGradient.jpg"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Item{
|
||||||
|
id: titlebarlogo
|
||||||
|
width: 125
|
||||||
|
height: 50
|
||||||
|
anchors.centerIn: parent
|
||||||
|
visible: customDecorations
|
||||||
|
z: 1
|
||||||
|
|
||||||
|
Image {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 11
|
||||||
|
width: 125
|
||||||
|
height: 28
|
||||||
|
source: "../images/titlebarLogo.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// collapse left panel
|
||||||
|
Rectangle {
|
||||||
id: goToBasicVersionButton
|
id: goToBasicVersionButton
|
||||||
property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width
|
property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width
|
||||||
property bool checked: false
|
property bool checked: false
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
color: "#FFE00A"
|
color: "transparent"
|
||||||
height: 30 * scaleRatio
|
height: 50 * scaleRatio
|
||||||
width: height
|
width: height
|
||||||
visible: isMobile
|
visible: isMobile
|
||||||
|
z: 2
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
width: parent.width * 2/3;
|
width: 14
|
||||||
height: width;
|
height: 14
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
source: "../images/menu.png"
|
source: "../images/expand.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: basicMouseArea
|
id: basicMouseArea
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: goToBasicVersionButton.color = "#262626";
|
||||||
|
onExited: goToBasicVersionButton.color = "transparent";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
releaseFocus()
|
releaseFocus()
|
||||||
parent.checked = !parent.checked
|
parent.checked = !parent.checked
|
||||||
|
@ -90,22 +118,28 @@ Rectangle {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
visible: parent.customDecorations
|
visible: parent.customDecorations
|
||||||
|
z: 2
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width && titleBar.containsMouse
|
id: whatIsAreaButton
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: height
|
width: 42
|
||||||
color: containsMouse ? "#6B0072" : "#000000"
|
color: containsMouse ? "#6B0072" : "#00000000"
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
source: "../images/helpIcon.png"
|
width: 9
|
||||||
|
height: 16
|
||||||
|
source: "../images/question.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: whatIsArea
|
id: whatIsArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: whatIsAreaButton.color = "#262626";
|
||||||
|
onExited: whatIsAreaButton.color = "transparent";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -113,20 +147,24 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width && titleBar.containsMouse
|
id: minimizeButton
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: height
|
width: 42
|
||||||
color: containsMouse ? "#3665B3" : "#000000"
|
color: "transparent"
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
source: "../images/minimizeIcon.png"
|
source: "../images/minimize.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: minimizeArea
|
id: minimizeArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: minimizeButton.color = "#262626";
|
||||||
|
onExited: minimizeButton.color = "transparent";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
appWindow.visibility = Window.Minimized
|
appWindow.visibility = Window.Minimized
|
||||||
}
|
}
|
||||||
|
@ -135,22 +173,26 @@ Rectangle {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: maximizeButton
|
id: maximizeButton
|
||||||
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width && titleBar.containsMouse
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: height
|
width: 42
|
||||||
color: containsMouse ? "#FF6C3C" : "#000000"
|
color: "transparent";
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
height: 16
|
||||||
|
width: 16
|
||||||
source: appWindow.visibility === Window.FullScreen ? "../images/backToWindowIcon.png" :
|
source: appWindow.visibility === Window.FullScreen ? "../images/backToWindowIcon.png" :
|
||||||
"../images/maximizeIcon.png"
|
"../images/fullscreen.png"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: maximizeArea
|
id: maximizeArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: maximizeButton.color = "#262626";
|
||||||
|
onExited: maximizeButton.color = "transparent";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
appWindow.visibility = appWindow.visibility !== Window.FullScreen ? Window.FullScreen :
|
appWindow.visibility = appWindow.visibility !== Window.FullScreen ? Window.FullScreen :
|
||||||
Window.Windowed
|
Window.Windowed
|
||||||
|
@ -159,20 +201,26 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width && titleBar.containsMouse
|
id: closeButton
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: height
|
width: 42
|
||||||
color: containsMouse ? "#E04343" : "#000000"
|
color: containsMouse ? "#E04343" : "#00000000"
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
source: "../images/closeIcon.png"
|
width: 16
|
||||||
|
height: 16
|
||||||
|
source: "../images/close.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: appWindow.close();
|
onClicked: appWindow.close();
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: closeButton.color = "#262626";
|
||||||
|
onExited: closeButton.color = "transparent";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1
components/qmldir
Normal file
|
@ -0,0 +1 @@
|
||||||
|
singleton Style 1.0 Style.qml
|
BIN
fonts/SFUIDisplay-Bold.otf
Normal file
BIN
fonts/SFUIDisplay-Light.otf
Normal file
BIN
fonts/SFUIDisplay-Medium.otf
Normal file
BIN
fonts/SFUIDisplay-Regular.otf
Normal file
BIN
images/arrow-right-medium-white.png
Normal file
After Width: | Height: | Size: 191 B |
BIN
images/card-background.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
images/checkedBlackIcon.png
Executable file
After Width: | Height: | Size: 15 KiB |
BIN
images/checkedIcon-black.png
Executable file
After Width: | Height: | Size: 18 KiB |
BIN
images/close.png
Normal file
After Width: | Height: | Size: 280 B |
BIN
images/downArrow.png
Normal file
After Width: | Height: | Size: 284 B |
BIN
images/expand.png
Normal file
After Width: | Height: | Size: 238 B |
BIN
images/fullscreen.png
Normal file
After Width: | Height: | Size: 185 B |
BIN
images/historyBorderRadius.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
images/leftPanelBg.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
images/lightning-white.png
Normal file
After Width: | Height: | Size: 362 B |
BIN
images/lightning.png
Normal file
After Width: | Height: | Size: 552 B |
BIN
images/menuArrow.png
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
images/menuButtonGradient.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
images/middlePanelBg.jpg
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
images/minimize.png
Normal file
After Width: | Height: | Size: 125 B |
BIN
images/moneroIcon-28x28.png
Normal file
After Width: | Height: | Size: 792 B |
BIN
images/moneroIcon-trans28x28.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
images/moneroIcon-trans56x56.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
images/moneroIcon-trans84x84.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
images/moneroLogo_white.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
images/question.png
Normal file
After Width: | Height: | Size: 334 B |
BIN
images/right.png
Normal file
After Width: | Height: | Size: 122 B |
BIN
images/rightArrow.png
Normal file
After Width: | Height: | Size: 437 B |
BIN
images/titlebarGradient.jpg
Normal file
After Width: | Height: | Size: 760 B |
BIN
images/titlebarLogo.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
images/upArrow-green.png
Normal file
After Width: | Height: | Size: 350 B |
BIN
images/warning.png
Executable file
After Width: | Height: | Size: 19 KiB |
57
js/TxUtils.js
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
function destinationsToAmount(destinations){
|
||||||
|
// Gets amount from destinations line
|
||||||
|
// input: "20.000000000000: 9tLGyK277MnYrDc7Vzi6TB1pJvstFoviziFwsqQNFbwA9rvg5RxYVYjEezFKDjvDHgAzTELJhJHVx6JAaWZKeVqSUZkXeKk"
|
||||||
|
// returns: 20.000000000000
|
||||||
|
return destinations.split(" ")[0].split(":")[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
function destinationsToAddress(destinations){
|
||||||
|
var address = destinations.split(" ")[1];
|
||||||
|
if(address === undefined) return ""
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
|
function addressTruncate(address){
|
||||||
|
return address.substring(0, 6) + "..." + address.substring(address.length-6);
|
||||||
|
}
|
||||||
|
|
||||||
|
function check256(str, length) {
|
||||||
|
if (str.length != length)
|
||||||
|
return false;
|
||||||
|
for (var i = 0; i < length; ++i) {
|
||||||
|
if (str[i] >= '0' && str[i] <= '9')
|
||||||
|
continue;
|
||||||
|
if (str[i] >= 'a' && str[i] <= 'z')
|
||||||
|
continue;
|
||||||
|
if (str[i] >= 'A' && str[i] <= 'Z')
|
||||||
|
continue;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkAddress(address, testnet) {
|
||||||
|
return walletManager.addressValid(address, testnet)
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkTxID(txid) {
|
||||||
|
return check256(txid, 64)
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkSignature(signature) {
|
||||||
|
if (signature.indexOf("OutProofV") === 0) {
|
||||||
|
if ((signature.length - 10) % 132 != 0)
|
||||||
|
return false;
|
||||||
|
return check256(signature, signature.length);
|
||||||
|
} else if (signature.indexOf("InProofV") === 0) {
|
||||||
|
if ((signature.length - 9) % 132 != 0)
|
||||||
|
return false;
|
||||||
|
return check256(signature, signature.length);
|
||||||
|
} else if (signature.indexOf("SpendProofV") === 0) {
|
||||||
|
if ((signature.length - 12) % 88 != 0)
|
||||||
|
return false;
|
||||||
|
return check256(signature, signature.length);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
67
main.qml
|
@ -73,7 +73,7 @@ ApplicationWindow {
|
||||||
property bool remoteNodeConnected: false
|
property bool remoteNodeConnected: false
|
||||||
property bool androidCloseTapped: false;
|
property bool androidCloseTapped: false;
|
||||||
// Default daemon addresses
|
// Default daemon addresses
|
||||||
readonly property string localDaemonAddress : persistentSettings.nettype === NetworkType.MAINNET ? "localhost:18081" : persistentSettings.nettype === NetworkType.TESTNET ? "localhost:28081" : "localhost:38081"
|
readonly property string localDaemonAddress : persistentSettings.nettype == NetworkType.MAINNET ? "localhost:18081" : persistentSettings.nettype == NetworkType.TESTNET ? "localhost:28081" : "localhost:38081"
|
||||||
property string currentDaemonAddress;
|
property string currentDaemonAddress;
|
||||||
property bool startLocalNodeCancelled: false
|
property bool startLocalNodeCancelled: false
|
||||||
|
|
||||||
|
@ -232,12 +232,15 @@ ApplicationWindow {
|
||||||
if(isIOS)
|
if(isIOS)
|
||||||
wallet_path = moneroAccountsDir + wallet_path;
|
wallet_path = moneroAccountsDir + wallet_path;
|
||||||
// console.log("opening wallet at: ", wallet_path, "with password: ", appWindow.walletPassword);
|
// console.log("opening wallet at: ", wallet_path, "with password: ", appWindow.walletPassword);
|
||||||
console.log("opening wallet at: ", wallet_path, ", network type: ", persistentSettings.nettype === NetworkType.MAINNET ? "mainnet" : persistentSettings.nettype === NetworkType.TESTNET ? "testnet" : "stagenet");
|
console.log("opening wallet at: ", wallet_path, ", network type: ", persistentSettings.nettype == NetworkType.MAINNET ? "mainnet" : persistentSettings.nettype == NetworkType.TESTNET ? "testnet" : "stagenet");
|
||||||
walletManager.openWalletAsync(wallet_path, walletPassword,
|
walletManager.openWalletAsync(wallet_path, walletPassword,
|
||||||
persistentSettings.nettype);
|
persistentSettings.nettype);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hide titlebar based on persistentSettings.customDecorations
|
||||||
|
titleBar.visible = persistentSettings.customDecorations;
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeWallet() {
|
function closeWallet() {
|
||||||
|
|
||||||
// Disconnect all listeners
|
// Disconnect all listeners
|
||||||
|
@ -263,6 +266,28 @@ ApplicationWindow {
|
||||||
|
|
||||||
function connectWallet(wallet) {
|
function connectWallet(wallet) {
|
||||||
currentWallet = wallet
|
currentWallet = wallet
|
||||||
|
|
||||||
|
// TODO:
|
||||||
|
// When the wallet variable is undefined, it yields a zero balance.
|
||||||
|
// This can scare users, restart the GUI (as a quick fix).
|
||||||
|
//
|
||||||
|
// To reproduce, follow these steps:
|
||||||
|
// 1) Open the GUI, load up a wallet that has a balance
|
||||||
|
// 2) Settings -> close wallet
|
||||||
|
// 3) Create a new wallet
|
||||||
|
// 4) Settings -> close wallet
|
||||||
|
// 5) Open the wallet from step 1
|
||||||
|
|
||||||
|
if(!wallet || wallet === undefined || wallet.path === undefined){
|
||||||
|
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
||||||
|
informationPopup.text = qsTr("Couldn't open wallet: ") + 'please restart GUI.';
|
||||||
|
informationPopup.icon = StandardIcon.Critical
|
||||||
|
informationPopup.open()
|
||||||
|
informationPopup.onCloseCallback = function() {
|
||||||
|
appWindow.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
walletName = usefulName(wallet.path)
|
walletName = usefulName(wallet.path)
|
||||||
updateSyncing(false)
|
updateSyncing(false)
|
||||||
|
|
||||||
|
@ -539,7 +564,7 @@ ApplicationWindow {
|
||||||
|
|
||||||
function onWalletMoneySent(txId, amount) {
|
function onWalletMoneySent(txId, amount) {
|
||||||
// refresh transaction history here
|
// refresh transaction history here
|
||||||
console.log("money sent found")
|
console.log("monero sent found")
|
||||||
currentWallet.refresh()
|
currentWallet.refresh()
|
||||||
currentWallet.history.refresh(currentWallet.currentSubaddressAccount) // this will refresh model
|
currentWallet.history.refresh(currentWallet.currentSubaddressAccount) // this will refresh model
|
||||||
}
|
}
|
||||||
|
@ -585,11 +610,8 @@ ApplicationWindow {
|
||||||
+ ", fee: " + walletManager.displayAmount(transaction.fee));
|
+ ", fee: " + walletManager.displayAmount(transaction.fee));
|
||||||
|
|
||||||
// here we show confirmation popup;
|
// here we show confirmation popup;
|
||||||
|
transactionConfirmationPopup.title = qsTr("Please confirm transaction:\n") + translationManager.emptyString;
|
||||||
transactionConfirmationPopup.title = qsTr("Confirmation") + translationManager.emptyString
|
transactionConfirmationPopup.text = "";
|
||||||
transactionConfirmationPopup.text = qsTr("Please confirm transaction:\n");
|
|
||||||
for (var i = 0; i < transaction.subaddrIndices.length; ++i)
|
|
||||||
transactionConfirmationPopup.text += qsTr("\nSpending address index: ") + transaction.subaddrIndices[i]
|
|
||||||
transactionConfirmationPopup.text +=
|
transactionConfirmationPopup.text +=
|
||||||
(address === "" ? "" : (qsTr("\n\nAddress: ") + address))
|
(address === "" ? "" : (qsTr("\n\nAddress: ") + address))
|
||||||
+ (paymentId === "" ? "" : (qsTr("\nPayment ID: ") + paymentId))
|
+ (paymentId === "" ? "" : (qsTr("\nPayment ID: ") + paymentId))
|
||||||
|
@ -598,7 +620,12 @@ ApplicationWindow {
|
||||||
+ qsTr("\n\nRingsize: ") + (mixinCount + 1)
|
+ qsTr("\n\nRingsize: ") + (mixinCount + 1)
|
||||||
+ qsTr("\n\Number of transactions: ") + transaction.txCount
|
+ qsTr("\n\Number of transactions: ") + transaction.txCount
|
||||||
+ (transactionDescription === "" ? "" : (qsTr("\n\nDescription: ") + transactionDescription))
|
+ (transactionDescription === "" ? "" : (qsTr("\n\nDescription: ") + transactionDescription))
|
||||||
+ translationManager.emptyString
|
|
||||||
|
for (var i = 0; i < transaction.subaddrIndices.length; ++i){
|
||||||
|
transactionConfirmationPopup.text += qsTr("\nSpending address index: ") + transaction.subaddrIndices[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
transactionConfirmationPopup.text += translationManager.emptyString;
|
||||||
transactionConfirmationPopup.icon = StandardIcon.Question
|
transactionConfirmationPopup.icon = StandardIcon.Question
|
||||||
transactionConfirmationPopup.open()
|
transactionConfirmationPopup.open()
|
||||||
}
|
}
|
||||||
|
@ -751,7 +778,7 @@ ApplicationWindow {
|
||||||
txid_text += ", "
|
txid_text += ", "
|
||||||
txid_text += txid[i]
|
txid_text += txid[i]
|
||||||
}
|
}
|
||||||
informationPopup.text = (viewOnly)? qsTr("Transaction saved to file: %1").arg(path) : qsTr("Money sent successfully: %1 transaction(s) ").arg(txid.length) + txid_text + translationManager.emptyString
|
informationPopup.text = (viewOnly)? qsTr("Transaction saved to file: %1").arg(path) : qsTr("Monero sent successfully: %1 transaction(s) ").arg(txid.length) + txid_text + translationManager.emptyString
|
||||||
informationPopup.icon = StandardIcon.Information
|
informationPopup.icon = StandardIcon.Information
|
||||||
if (transactionDescription.length > 0) {
|
if (transactionDescription.length > 0) {
|
||||||
for (var i = 0; i < txid.length; ++i)
|
for (var i = 0; i < txid.length; ++i)
|
||||||
|
@ -911,11 +938,14 @@ ApplicationWindow {
|
||||||
x = 0
|
x = 0
|
||||||
if (y < 0)
|
if (y < 0)
|
||||||
y = 0
|
y = 0
|
||||||
persistentSettings.customDecorations = custom
|
persistentSettings.customDecorations = custom;
|
||||||
|
titleBar.visible = custom; // hides custom titlebar based on customDecorations
|
||||||
|
|
||||||
if (custom)
|
if (custom)
|
||||||
appWindow.flags = Qt.FramelessWindowHint | Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint
|
appWindow.flags = Qt.FramelessWindowHint | Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint;
|
||||||
else
|
else
|
||||||
appWindow.flags = Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint | Qt.WindowTitleHint | Qt.WindowMaximizeButtonHint
|
appWindow.flags = Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint | Qt.WindowTitleHint | Qt.WindowMaximizeButtonHint;
|
||||||
|
|
||||||
appWindow.hide()
|
appWindow.hide()
|
||||||
appWindow.x = x
|
appWindow.x = x
|
||||||
appWindow.y = y
|
appWindow.y = y
|
||||||
|
@ -988,7 +1018,7 @@ ApplicationWindow {
|
||||||
property bool allow_background_mining : false
|
property bool allow_background_mining : false
|
||||||
property bool miningIgnoreBattery : true
|
property bool miningIgnoreBattery : true
|
||||||
property var nettype: NetworkType.MAINNET
|
property var nettype: NetworkType.MAINNET
|
||||||
property string daemon_address: nettype === NetworkType.TESTNET ? "localhost:28081" : nettype === NetworkType.STAGENET ? "localhost:38081" : "localhost:18081"
|
property string daemon_address: nettype == NetworkType.TESTNET ? "localhost:28081" : nettype == NetworkType.STAGENET ? "localhost:38081" : "localhost:18081"
|
||||||
property string payment_id
|
property string payment_id
|
||||||
property int restore_height : 0
|
property int restore_height : 0
|
||||||
property bool is_recovering : false
|
property bool is_recovering : false
|
||||||
|
@ -1533,6 +1563,15 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.left: parent.left
|
||||||
|
height:1
|
||||||
|
color: "#2F2F2F"
|
||||||
|
z: 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// new ToolTip
|
// new ToolTip
|
||||||
|
|
|
@ -276,6 +276,7 @@ linux {
|
||||||
-lboost_chrono \
|
-lboost_chrono \
|
||||||
-lboost_program_options \
|
-lboost_program_options \
|
||||||
-lssl \
|
-lssl \
|
||||||
|
-llmdb \
|
||||||
-lcrypto
|
-lcrypto
|
||||||
|
|
||||||
if(!android) {
|
if(!android) {
|
||||||
|
|
|
@ -34,30 +34,21 @@ import moneroComponents.AddressBookModel 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
color: "#F0EEEE"
|
color: "transparent"
|
||||||
property var model
|
property var model
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.margins: 17 * scaleRatio
|
id: columnLayout
|
||||||
|
anchors.margins: (isMobile)? 17 : 40
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
spacing: 10 * scaleRatio
|
spacing: 26 * scaleRatio
|
||||||
|
|
||||||
Label {
|
|
||||||
id: addressLabel
|
|
||||||
anchors.left: parent.left
|
|
||||||
text: qsTr("Address") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: qrfinderButton
|
id: qrfinderButton
|
||||||
text: qsTr("Qr Code") + translationManager.emptyString
|
text: qsTr("Qr Code") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
visible : appWindow.qrScannerEnabled
|
visible : appWindow.qrScannerEnabled
|
||||||
enabled : visible
|
enabled : visible
|
||||||
width: visible ? 60 * scaleRatio : 0
|
width: visible ? 60 * scaleRatio : 0
|
||||||
|
@ -70,32 +61,25 @@ Rectangle {
|
||||||
LineEdit {
|
LineEdit {
|
||||||
Layout.fillWidth: true;
|
Layout.fillWidth: true;
|
||||||
id: addressLine
|
id: addressLine
|
||||||
|
labelText: qsTr("Address") + translationManager.emptyString
|
||||||
error: true;
|
error: true;
|
||||||
placeholderText: qsTr("4...") + translationManager.emptyString
|
placeholderText: qsTr("4...") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
|
||||||
id: paymentIdLabel
|
|
||||||
text: qsTr("Payment ID <font size='2'>(Optional)</font>") + translationManager.emptyString
|
|
||||||
tipText: qsTr("<b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during the transfer")
|
|
||||||
+ translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
LineEdit {
|
LineEdit {
|
||||||
id: paymentIdLine
|
id: paymentIdLine
|
||||||
Layout.fillWidth: true;
|
Layout.fillWidth: true;
|
||||||
|
labelText: qsTr("Payment ID <font size='2'>(Optional)</font>") + translationManager.emptyString
|
||||||
placeholderText: qsTr("Paste 64 hexadecimal characters") + translationManager.emptyString
|
placeholderText: qsTr("Paste 64 hexadecimal characters") + translationManager.emptyString
|
||||||
}
|
// tipText: qsTr("<b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during the transfer")
|
||||||
|
// + translationManager.emptyString
|
||||||
Label {
|
|
||||||
id: descriptionLabel
|
|
||||||
text: qsTr("Description <font size='2'>(Optional)</font>") + translationManager.emptyString
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LineEdit {
|
LineEdit {
|
||||||
id: descriptionLine
|
id: descriptionLine
|
||||||
Layout.fillWidth: true;
|
Layout.fillWidth: true;
|
||||||
|
labelText: qsTr("Description <font size='2'>(Optional)</font>") + translationManager.emptyString
|
||||||
placeholderText: qsTr("Give this entry a name or description") + translationManager.emptyString
|
placeholderText: qsTr("Give this entry a name or description") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,10 +88,6 @@ Rectangle {
|
||||||
id: addButton
|
id: addButton
|
||||||
Layout.bottomMargin: 17 * scaleRatio
|
Layout.bottomMargin: 17 * scaleRatio
|
||||||
StandardButton {
|
StandardButton {
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
text: qsTr("Add") + translationManager.emptyString
|
text: qsTr("Add") + translationManager.emptyString
|
||||||
enabled: checkInformation(addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype)
|
enabled: checkInformation(addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype)
|
||||||
|
|
||||||
|
@ -132,29 +112,23 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: tableRect
|
id: tableRect
|
||||||
|
anchors.top: columnLayout.bottom
|
||||||
|
anchors.leftMargin: (isMobile)? 17 : 40
|
||||||
|
anchors.rightMargin: (isMobile)? 17 : 40
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
height: parent.height - addButton.y - addButton.height - 36 * scaleRatio
|
height: parent.height - addButton.y - addButton.height - 36 * scaleRatio
|
||||||
color: "#FFFFFF"
|
color: "transparent"
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation { duration: 200; easing.type: Easing.InQuad }
|
NumberAnimation { duration: 200; easing.type: Easing.InQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
height: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
}
|
|
||||||
|
|
||||||
Scroll {
|
Scroll {
|
||||||
id: flickableScroll
|
id: flickableScroll
|
||||||
anchors.right: table.right
|
anchors.right: table.right
|
||||||
|
@ -170,8 +144,6 @@ Rectangle {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.leftMargin: 14
|
|
||||||
anchors.rightMargin: 14
|
|
||||||
onContentYChanged: flickableScroll.flickableContentYChanged()
|
onContentYChanged: flickableScroll.flickableContentYChanged()
|
||||||
model: root.model
|
model: root.model
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
|
import QtQuick.Dialogs 1.2
|
||||||
import moneroComponents.Wallet 1.0
|
import moneroComponents.Wallet 1.0
|
||||||
import moneroComponents.WalletManager 1.0
|
import moneroComponents.WalletManager 1.0
|
||||||
import moneroComponents.TransactionHistory 1.0
|
import moneroComponents.TransactionHistory 1.0
|
||||||
|
@ -37,15 +38,16 @@ import moneroComponents.TransactionHistoryModel 1.0
|
||||||
import "../components"
|
import "../components"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: mainLayout
|
||||||
property var model
|
property var model
|
||||||
|
property int tableHeight: !isMobile ? table.contentHeight : tableMobile.contentHeight
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: d
|
id: d
|
||||||
property bool initialized: false
|
property bool initialized: false
|
||||||
}
|
}
|
||||||
|
|
||||||
color: "#F0EEEE"
|
color: "transparent"
|
||||||
|
|
||||||
function getSelectedAmount() {
|
function getSelectedAmount() {
|
||||||
if (typeof model === 'undefined' || model == null)
|
if (typeof model === 'undefined' || model == null)
|
||||||
|
@ -81,182 +83,25 @@ Rectangle {
|
||||||
|
|
||||||
onModelChanged: {
|
onModelChanged: {
|
||||||
if (typeof model !== 'undefined' && model != null) {
|
if (typeof model !== 'undefined' && model != null) {
|
||||||
|
|
||||||
selectedAmount.text = getSelectedAmount()
|
|
||||||
|
|
||||||
if (!d.initialized) {
|
if (!d.initialized) {
|
||||||
// setup date filter scope according to real transactions
|
// setup date filter scope according to real transactions
|
||||||
fromDatePicker.currentDate = model.transactionHistory.firstDateTime
|
fromDatePicker.currentDate = model.transactionHistory.firstDateTime
|
||||||
toDatePicker.currentDate = model.transactionHistory.lastDateTime
|
toDatePicker.currentDate = model.transactionHistory.lastDateTime
|
||||||
|
|
||||||
/* Default sorting by timestamp desc */
|
|
||||||
/* Sort indicator on table header */
|
|
||||||
/* index of 'sort by blockheight' column */
|
|
||||||
header.activeSortColumn = 2
|
|
||||||
/* Sorting model */
|
|
||||||
|
|
||||||
model.sortRole = TransactionHistoryModel.TransactionBlockHeightRole
|
model.sortRole = TransactionHistoryModel.TransactionBlockHeightRole
|
||||||
model.sort(0, Qt.DescendingOrder);
|
model.sort(0, Qt.DescendingOrder);
|
||||||
d.initialized = true
|
d.initialized = true
|
||||||
// TODO: public interface for 'Header' item that will cause 'sortRequest' signal
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFilterChanged() {
|
function onFilterChanged() {
|
||||||
|
// set datepicker error states
|
||||||
var datesValid = fromDatePicker.currentDate <= toDatePicker.currentDate
|
var datesValid = fromDatePicker.currentDate <= toDatePicker.currentDate
|
||||||
var amountsValid = amountFromLine.text === "" ? true :
|
fromDatePicker.error = !datesValid;
|
||||||
amountToLine.text === "" ? true:
|
toDatePicker.error = !datesValid;
|
||||||
parseFloat(amountFromLine.text) <= parseFloat(amountToLine.text)
|
|
||||||
|
|
||||||
// reset error state if amount filter valid
|
|
||||||
if (amountsValid) {
|
|
||||||
amountFromLine.error = amountToLine.error = false
|
|
||||||
}
|
|
||||||
|
|
||||||
filterButton.enabled = datesValid && amountsValid
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Text {
|
|
||||||
visible: !isMobile
|
|
||||||
id: filterHeaderText
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.topMargin: 17
|
|
||||||
|
|
||||||
elide: Text.ElideRight
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 18
|
|
||||||
color: "#4A4949"
|
|
||||||
text: qsTr("Filter transaction history") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
visible: !isMobile
|
|
||||||
id: selectedAmount
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.rightMargin: 17
|
|
||||||
anchors.topMargin: 17
|
|
||||||
text: getSelectedAmount()
|
|
||||||
fontSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
// Filter by string
|
|
||||||
LineEdit {
|
|
||||||
visible: !isMobile
|
|
||||||
id: searchLine
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: filterHeaderText.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.rightMargin: 17
|
|
||||||
anchors.topMargin: 5
|
|
||||||
placeholderText: qsTr("Type for incremental search...") + translationManager.emptyString
|
|
||||||
onTextChanged: {
|
|
||||||
model.searchFilter = searchLine.text
|
|
||||||
selectedAmount.text = getSelectedAmount()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Filter by description input (not implemented yet)
|
|
||||||
/*
|
|
||||||
Label {
|
|
||||||
id: descriptionLabel
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: searchLine.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.topMargin: 17
|
|
||||||
text: qsTr("Description <font size='2'>(Local database)</font>") + translationManager.emptyString
|
|
||||||
fontSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
LineEdit {
|
|
||||||
id: descriptionLine
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: descriptionLabel.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.rightMargin: 17
|
|
||||||
anchors.topMargin: 5
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// DateFrom picker
|
|
||||||
Label {
|
|
||||||
visible: !isMobile
|
|
||||||
id: dateFromText
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: searchLine.bottom // descriptionLine.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.topMargin: 17
|
|
||||||
width: 156
|
|
||||||
text: qsTr("Date from") + translationManager.emptyString
|
|
||||||
fontSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
DatePicker {
|
|
||||||
visible: !isMobile
|
|
||||||
id: fromDatePicker
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: dateFromText.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.topMargin: 5
|
|
||||||
z: 2
|
|
||||||
onCurrentDateChanged: {
|
|
||||||
error = currentDate > toDatePicker.currentDate
|
|
||||||
onFilterChanged()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DateTo picker
|
|
||||||
Label {
|
|
||||||
visible: !isMobile
|
|
||||||
id: dateToText
|
|
||||||
anchors.left: dateFromText.right
|
|
||||||
anchors.top: searchLine.bottom //descriptionLine.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.topMargin: 17
|
|
||||||
text: qsTr("To") + translationManager.emptyString
|
|
||||||
fontSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
DatePicker {
|
|
||||||
visible: !isMobile
|
|
||||||
id: toDatePicker
|
|
||||||
anchors.left: fromDatePicker.right
|
|
||||||
anchors.top: dateToText.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.topMargin: 5
|
|
||||||
z: 2
|
|
||||||
onCurrentDateChanged: {
|
|
||||||
error = currentDate < fromDatePicker.currentDate
|
|
||||||
onFilterChanged()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
StandardButton {
|
|
||||||
visible: !isMobile
|
|
||||||
id: filterButton
|
|
||||||
anchors.bottom: toDatePicker.bottom
|
|
||||||
anchors.left: toDatePicker.right
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
width: 60
|
|
||||||
text: qsTr("Filter") + translationManager.emptyString
|
|
||||||
shadowReleasedColor: "#4D0051"
|
|
||||||
shadowPressedColor: "#2D002F"
|
|
||||||
releasedColor: "#6B0072"
|
|
||||||
pressedColor: "#4D0051"
|
|
||||||
onClicked: {
|
|
||||||
// Apply filter here;
|
|
||||||
|
|
||||||
|
if(datesValid){
|
||||||
resetFilter(model)
|
resetFilter(model)
|
||||||
|
|
||||||
if (fromDatePicker.currentDate > toDatePicker.currentDate) {
|
if (fromDatePicker.currentDate > toDatePicker.currentDate) {
|
||||||
|
@ -266,281 +111,254 @@ Rectangle {
|
||||||
model.dateToFilter = toDatePicker.currentDate
|
model.dateToFilter = toDatePicker.currentDate
|
||||||
}
|
}
|
||||||
|
|
||||||
if (advancedFilteringCheckBox.checked) {
|
model.searchFilter = searchLine.text;
|
||||||
if (amountFromLine.text.length) {
|
tableHeader.visible = model.rowCount() > 0;
|
||||||
model.amountFromFilter = parseFloat(amountFromLine.text)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (amountToLine.text.length) {
|
|
||||||
model.amountToFilter = parseFloat(amountToLine.text)
|
|
||||||
}
|
|
||||||
|
|
||||||
var directionFilter = transactionsModel.get(transactionTypeDropdown.currentIndex).value
|
|
||||||
console.log("Direction filter: " + directionFilter)
|
|
||||||
model.directionFilter = directionFilter
|
|
||||||
}
|
|
||||||
|
|
||||||
selectedAmount.text = getSelectedAmount()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
Rectangle{
|
||||||
visible: !isMobile
|
id: rootLayout
|
||||||
id: advancedFilteringCheckBox
|
visible: false
|
||||||
text: qsTr("Advanced filtering") + translationManager.emptyString
|
|
||||||
anchors.left: filterButton.right
|
|
||||||
anchors.bottom: filterButton.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
onClicked: {
|
|
||||||
if(checked) tableRect.height = Qt.binding(function(){ return tableRect.collapsedHeight })
|
|
||||||
else tableRect.height = Qt.binding(function(){ return tableRect.middleHeight })
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
ColumnLayout {
|
||||||
visible: !isMobile
|
id: pageRoot
|
||||||
id: transactionTypeText
|
anchors.margins: isMobile ? 17 : 20 * scaleRatio
|
||||||
|
anchors.topMargin: isMobile ? 0 : 40 * scaleRatio
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: fromDatePicker.bottom
|
anchors.top: parent.top
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.topMargin: 17
|
|
||||||
width: 156
|
|
||||||
text: qsTr("Type of transaction") + translationManager.emptyString
|
|
||||||
fontSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
ListModel {
|
|
||||||
id: transactionsModel
|
|
||||||
ListElement { column1: "All"; column2: ""; value: TransactionInfo.Direction_Both }
|
|
||||||
ListElement { column1: "Sent"; column2: ""; value: TransactionInfo.Direction_Out }
|
|
||||||
ListElement { column1: "Received"; column2: ""; value: TransactionInfo.Direction_In }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
StandardDropdown {
|
|
||||||
visible: !isMobile
|
|
||||||
id: transactionTypeDropdown
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: transactionTypeText.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.topMargin: 5
|
|
||||||
width: 156
|
|
||||||
shadowReleasedColor: "#4D0051"
|
|
||||||
shadowPressedColor: "#2D002F"
|
|
||||||
releasedColor: "#6B0072"
|
|
||||||
pressedColor: "#4D0051"
|
|
||||||
dataModel: transactionsModel
|
|
||||||
z: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
visible: !isMobile
|
|
||||||
id: amountFromText
|
|
||||||
anchors.left: transactionTypeText.right
|
|
||||||
anchors.top: fromDatePicker.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.topMargin: 17
|
|
||||||
width: 156
|
|
||||||
text: qsTr("Amount from") + translationManager.emptyString
|
|
||||||
fontSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
LineEdit {
|
|
||||||
visible: !isMobile
|
|
||||||
id: amountFromLine
|
|
||||||
anchors.left: transactionTypeDropdown.right
|
|
||||||
anchors.top: amountFromText.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.topMargin: 5
|
|
||||||
width: 156
|
|
||||||
validator: DoubleValidator {
|
|
||||||
locale: "C"
|
|
||||||
notation: DoubleValidator.StandardNotation
|
|
||||||
bottom: 0
|
|
||||||
}
|
|
||||||
onTextChanged: {
|
|
||||||
// indicating error
|
|
||||||
amountFromLine.error = amountFromLine.text === "" ? false : parseFloat(amountFromLine.text) > parseFloat(amountToLine.text)
|
|
||||||
onFilterChanged()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
visible: !isMobile
|
|
||||||
id: amountToText
|
|
||||||
anchors.left: amountFromText.right
|
|
||||||
anchors.top: fromDatePicker.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.topMargin: 17
|
|
||||||
width: 156
|
|
||||||
text: qsTr("To") + translationManager.emptyString
|
|
||||||
fontSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
LineEdit {
|
|
||||||
visible: !isMobile
|
|
||||||
id: amountToLine
|
|
||||||
anchors.left: amountFromLine.right
|
|
||||||
anchors.top: amountToText.bottom
|
|
||||||
anchors.leftMargin: 17
|
|
||||||
anchors.topMargin: 5
|
|
||||||
width: 156
|
|
||||||
validator: DoubleValidator {
|
|
||||||
locale: "C"
|
|
||||||
notation: DoubleValidator.StandardNotation
|
|
||||||
bottom: 0.0
|
|
||||||
}
|
|
||||||
|
|
||||||
onTextChanged: {
|
|
||||||
// indicating error
|
|
||||||
amountToLine.error = amountToLine.text === "" ? false : parseFloat(amountFromLine.text) > parseFloat(amountToLine.text)
|
|
||||||
onFilterChanged()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
visible: !isMobile
|
|
||||||
id: expandItem
|
|
||||||
property bool expanded: false
|
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: tableRect.top
|
|
||||||
width: 34
|
|
||||||
height: 34
|
|
||||||
|
|
||||||
Image {
|
spacing: 0
|
||||||
anchors.centerIn: parent
|
|
||||||
source: "../images/expandTable.png"
|
|
||||||
rotation: parent.expanded ? 180 : 0
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
GridLayout {
|
||||||
anchors.fill: parent
|
property int column_width: {
|
||||||
onClicked: {
|
if(!isMobile){
|
||||||
parent.expanded = !parent.expanded
|
return (parent.width / 2) - 20;
|
||||||
if (advancedFilteringCheckBox.checked) {
|
|
||||||
tableRect.height = Qt.binding(function() { return parent.expanded ? tableRect.expandedHeight : tableRect.collapsedHeight })
|
|
||||||
} else {
|
} else {
|
||||||
tableRect.height = Qt.binding(function() { return parent.expanded ? tableRect.expandedHeight : tableRect.middleHeight })
|
return parent.width - 20;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
columns: 2
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
visible: !isMobile
|
||||||
|
Layout.preferredWidth: parent.column_width
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.preferredWidth: parent.column_width
|
||||||
|
LineEdit {
|
||||||
|
id: searchLine
|
||||||
|
fontSize: 14 * scaleRatio
|
||||||
|
inputHeight: 28 * scaleRatio
|
||||||
|
borderDisabled: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
backgroundColor: "#404040"
|
||||||
|
placeholderText: qsTr("Search") + translationManager.emptyString
|
||||||
|
placeholderCenter: true
|
||||||
|
onTextChanged: {
|
||||||
|
onFilterChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
GridLayout {
|
||||||
id: tableRect
|
z: 6
|
||||||
property int expandedHeight: parent.height - filterHeaderText.y - filterHeaderText.height - 5
|
columns: (isMobile)? 1 : 3
|
||||||
property int middleHeight: parent.height - fromDatePicker.y - fromDatePicker.height - 17
|
Layout.fillWidth: true
|
||||||
property int collapsedHeight: parent.height - transactionTypeDropdown.y - transactionTypeDropdown.height - 17
|
columnSpacing: 22 * scaleRatio
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
// anchors.top: parent.top
|
|
||||||
color: "#FFFFFF"
|
|
||||||
z: 1
|
|
||||||
|
|
||||||
height: (isMobile)? parent.height : middleHeight
|
|
||||||
onHeightChanged: {
|
|
||||||
if(height === middleHeight) z = 1
|
|
||||||
else if(height === collapsedHeight) z = 0
|
|
||||||
else z = 3
|
|
||||||
}
|
|
||||||
|
|
||||||
Behavior on height {
|
|
||||||
NumberAnimation { duration: 200; easing.type: Easing.InQuad }
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
height: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
}
|
|
||||||
|
|
||||||
ListModel {
|
|
||||||
id: columnsModel
|
|
||||||
property int pidWidth: 127 * scaleRatio
|
|
||||||
ListElement { columnName: "Payment ID"; columnWidth: 127 }
|
|
||||||
ListElement { columnName: "Date"; columnWidth: 100 }
|
|
||||||
ListElement { columnName: "Block height"; columnWidth: 150 }
|
|
||||||
ListElement { columnName: "Amount"; columnWidth: 148 }
|
|
||||||
// ListElement { columnName: "Description"; columnWidth: 148 }
|
|
||||||
}
|
|
||||||
|
|
||||||
TableHeader {
|
|
||||||
id: header
|
|
||||||
visible: !isMobile
|
visible: !isMobile
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
ColumnLayout {
|
||||||
anchors.top: parent.top
|
Layout.fillWidth: true
|
||||||
anchors.topMargin: 17 * scaleRatio
|
|
||||||
anchors.leftMargin: 14 * scaleRatio
|
RowLayout {
|
||||||
anchors.rightMargin: 14 * scaleRatio
|
Layout.fillWidth: true
|
||||||
dataModel: columnsModel
|
id: fromDateRow
|
||||||
offset: 20
|
Layout.minimumWidth: 150 * scaleRatio
|
||||||
onSortRequest: {
|
|
||||||
console.log("column: " + column + " desc: " + desc)
|
DatePicker {
|
||||||
switch (column) {
|
visible: !isMobile
|
||||||
case 0:
|
|
||||||
// Payment ID
|
id: fromDatePicker
|
||||||
model.sortRole = TransactionHistoryModel.TransactionPaymentIdRole
|
Layout.fillWidth: true
|
||||||
break;
|
width: 100 * scaleRatio
|
||||||
case 1:
|
inputLabel.text: "Date from"
|
||||||
// Date (actually sort by timestamp as we want to have transactions sorted within one day as well);
|
|
||||||
model.sortRole = TransactionHistoryModel.TransactionTimeStampRole
|
onCurrentDateChanged: {
|
||||||
break;
|
onFilterChanged()
|
||||||
case 2:
|
}
|
||||||
// BlockHeight;
|
}
|
||||||
model.sortRole = TransactionHistoryModel.TransactionBlockHeightRole
|
}
|
||||||
break;
|
}
|
||||||
case 3:
|
|
||||||
// Amount;
|
ColumnLayout {
|
||||||
model.sortRole = TransactionHistoryModel.TransactionAmountRole
|
Layout.fillWidth: true
|
||||||
break;
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
id: toDateRow
|
||||||
|
Layout.minimumWidth: 150 * scaleRatio
|
||||||
|
|
||||||
|
DatePicker {
|
||||||
|
visible: !isMobile
|
||||||
|
|
||||||
|
id: toDatePicker
|
||||||
|
Layout.fillWidth: true
|
||||||
|
width: 100 * scaleRatio
|
||||||
|
inputLabel.text: "Date to"
|
||||||
|
|
||||||
|
onCurrentDateChanged: {
|
||||||
|
onFilterChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: transactionPriority
|
||||||
|
Layout.minimumWidth: 120 * scaleRatio
|
||||||
|
text: qsTr("Sort") + translationManager.emptyString
|
||||||
|
fontSize: 14
|
||||||
|
}
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: priorityModelV5
|
||||||
|
|
||||||
|
ListElement { column1: qsTr("Block height") ; column2: "";}
|
||||||
|
ListElement { column1: qsTr("Date") ; column2: ""; }
|
||||||
|
}
|
||||||
|
|
||||||
|
StandardDropdown {
|
||||||
|
id: priorityDropdown
|
||||||
|
anchors.topMargin: 2 * scaleRatio
|
||||||
|
fontHeaderSize: 14 * scaleRatio
|
||||||
|
dropdownHeight: 28 * scaleRatio
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
shadowReleasedColor: "#FF4304"
|
||||||
|
shadowPressedColor: "#B32D00"
|
||||||
|
releasedColor: "#404040"
|
||||||
|
pressedColor: "#202020"
|
||||||
|
colorHeaderBackground: "#404040"
|
||||||
|
|
||||||
|
onChanged: {
|
||||||
|
switch(priorityDropdown.currentIndex){
|
||||||
|
case 0:
|
||||||
|
// block sort
|
||||||
|
model.sortRole = TransactionHistoryModel.TransactionBlockHeightRole;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// amount sort
|
||||||
|
model.sortRole = TransactionHistoryModel.TransactionDateRole;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
model.sort(0, Qt.DescendingOrder);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
model.sort(0, desc ? Qt.DescendingOrder : Qt.AscendingOrder)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Scroll {
|
GridLayout {
|
||||||
id: flickableScroll
|
Layout.topMargin: 20
|
||||||
visible: !isMobile
|
visible: table.count === 0
|
||||||
anchors.right: table.right
|
|
||||||
anchors.rightMargin: !isMobile ? -14 * scaleRatio : 0
|
Label {
|
||||||
anchors.top: table.top
|
fontSize: 16 * scaleRatio
|
||||||
anchors.bottom: table.bottom
|
text: qsTr("No history...") + translationManager.emptyString
|
||||||
flickable: table
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HistoryTable {
|
GridLayout {
|
||||||
id: table
|
id: tableHeader
|
||||||
visible: !isMobile
|
columns: 1
|
||||||
anchors.left: parent.left
|
columnSpacing: 0
|
||||||
anchors.right: parent.right
|
rowSpacing: 0
|
||||||
anchors.top: header.bottom
|
Layout.topMargin: 20
|
||||||
anchors.bottom: parent.bottom
|
Layout.fillWidth: true
|
||||||
anchors.leftMargin: 14 * scaleRatio
|
|
||||||
anchors.rightMargin: 14 * scaleRatio
|
|
||||||
onContentYChanged: flickableScroll.flickableContentYChanged()
|
|
||||||
model: !isMobile ? root.model : null
|
|
||||||
addressBookModel: null
|
|
||||||
}
|
|
||||||
|
|
||||||
HistoryTableMobile {
|
RowLayout{
|
||||||
id: tableMobile
|
Layout.preferredHeight: 10
|
||||||
visible: isMobile
|
Layout.fillWidth: true
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
Rectangle {
|
||||||
anchors.top: parent.top
|
id: header
|
||||||
anchors.bottom: parent.bottom
|
Layout.fillWidth: true
|
||||||
onContentYChanged: flickableScroll.flickableContentYChanged()
|
visible: table.count > 0
|
||||||
model: isMobile ? root.model : null
|
|
||||||
addressBookModel: null
|
height: 10
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 10
|
||||||
|
anchors.leftMargin: 10
|
||||||
|
|
||||||
|
height: 1
|
||||||
|
color: "#404040"
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
|
||||||
|
width: 10
|
||||||
|
height: 10
|
||||||
|
|
||||||
|
source: "../images/historyBorderRadius.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
width: 10
|
||||||
|
height: 10
|
||||||
|
|
||||||
|
source: "../images/historyBorderRadius.png"
|
||||||
|
rotation: 90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.preferredHeight: isMobile ? tableMobile.contentHeight : table.contentHeight
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
|
||||||
|
HistoryTable {
|
||||||
|
id: table
|
||||||
|
visible: !isMobile
|
||||||
|
onContentYChanged: flickableScroll.flickableContentYChanged()
|
||||||
|
model: !isMobile ? mainLayout.model : null
|
||||||
|
addressBookModel: null
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
HistoryTableMobile {
|
||||||
|
id: tableMobile
|
||||||
|
visible: isMobile
|
||||||
|
onContentYChanged: flickableScroll.flickableContentYChanged()
|
||||||
|
model: isMobile ? mainLayout.model : null
|
||||||
|
addressBookModel: null
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -548,8 +366,11 @@ Rectangle {
|
||||||
if(currentWallet != null && typeof currentWallet.history !== "undefined" ) {
|
if(currentWallet != null && typeof currentWallet.history !== "undefined" ) {
|
||||||
currentWallet.history.refresh(currentWallet.currentSubaddressAccount)
|
currentWallet.history.refresh(currentWallet.currentSubaddressAccount)
|
||||||
table.addressBookModel = currentWallet ? currentWallet.addressBookModel : null
|
table.addressBookModel = currentWallet ? currentWallet.addressBookModel : null
|
||||||
transactionTypeDropdown.update()
|
//transactionTypeDropdown.update()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priorityDropdown.dataModel = priorityModelV5;
|
||||||
|
priorityDropdown.currentIndex = 0;
|
||||||
|
priorityDropdown.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,73 +31,76 @@ import QtQuick.Controls 1.4
|
||||||
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 "../version.js" as Version
|
|
||||||
|
|
||||||
|
|
||||||
import "../components"
|
|
||||||
import moneroComponents.Clipboard 1.0
|
import moneroComponents.Clipboard 1.0
|
||||||
|
import "../version.js" as Version
|
||||||
|
import "../components"
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
property bool viewOnly: false
|
property bool viewOnly: false
|
||||||
id: page
|
id: page
|
||||||
|
|
||||||
color: "#F0EEEE"
|
color: "transparent"
|
||||||
|
|
||||||
Clipboard { id: clipboard }
|
Clipboard { id: clipboard }
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
anchors.margins: 17 * scaleRatio
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
spacing: 20 * scaleRatio
|
|
||||||
|
anchors.margins: (isMobile)? 17 : 20
|
||||||
|
anchors.topMargin: 40 * scaleRatio
|
||||||
|
|
||||||
|
spacing: 30 * scaleRatio
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
//! Manage wallet
|
//! Manage wallet
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
fontSize: 22 * scaleRatio
|
||||||
|
Layout.topMargin: 10 * scaleRatio
|
||||||
text: qsTr("Mnemonic seed") + translationManager.emptyString
|
text: qsTr("Mnemonic seed") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
height: 1
|
height: 2
|
||||||
color: "#DEDEDE"
|
color: Style.dividerColor
|
||||||
|
opacity: Style.dividerOpacity
|
||||||
|
Layout.bottomMargin: 10 * scaleRatio
|
||||||
}
|
}
|
||||||
TextEdit {
|
|
||||||
|
LineEditMulti{
|
||||||
id: seedText
|
id: seedText
|
||||||
wrapMode: TextEdit.Wrap
|
spacing: 0
|
||||||
Layout.fillWidth: true;
|
copyButton: true
|
||||||
font.pixelSize: 14 * scaleRatio
|
addressValidation: false
|
||||||
readOnly: true
|
readOnly: true
|
||||||
MouseArea {
|
wrapAnywhere: false
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: {
|
|
||||||
appWindow.showStatusMessage(qsTr("Double tap to copy"),3)
|
|
||||||
}
|
|
||||||
onDoubleClicked: {
|
|
||||||
parent.selectAll()
|
|
||||||
parent.copy()
|
|
||||||
parent.deselect()
|
|
||||||
console.log("copied to clipboard");
|
|
||||||
appWindow.showStatusMessage(qsTr("Seed copied to clipboard"),3)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
fontSize: 22 * scaleRatio
|
||||||
|
Layout.topMargin: 10 * scaleRatio
|
||||||
text: qsTr("Keys") + translationManager.emptyString
|
text: qsTr("Keys") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
height: 1
|
height: 2
|
||||||
color: "#DEDEDE"
|
color: Style.dividerColor
|
||||||
|
opacity: Style.dividerOpacity
|
||||||
|
Layout.bottomMargin: 10 * scaleRatio
|
||||||
}
|
}
|
||||||
TextEdit {
|
TextEdit {
|
||||||
id: keysText
|
id: keysText
|
||||||
|
@ -106,6 +109,7 @@ Rectangle {
|
||||||
font.pixelSize: 14 * scaleRatio
|
font.pixelSize: 14 * scaleRatio
|
||||||
textFormat: TextEdit.RichText
|
textFormat: TextEdit.RichText
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
color: Style.defaultFontColor
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -124,21 +128,26 @@ Rectangle {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
fontSize: 22 * scaleRatio
|
||||||
|
Layout.topMargin: 10 * scaleRatio
|
||||||
text: qsTr("Export wallet") + translationManager.emptyString
|
text: qsTr("Export wallet") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
height: 1
|
height: 2
|
||||||
color: "#DEDEDE"
|
color: Style.dividerColor
|
||||||
|
opacity: Style.dividerOpacity
|
||||||
|
Layout.bottomMargin: 10 * scaleRatio
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
enabled: !fullWalletQRCode.visible
|
enabled: !fullWalletQRCode.visible
|
||||||
id: showFullQr
|
id: showFullQr
|
||||||
|
small: true
|
||||||
text: qsTr("Spendable Wallet") + translationManager.emptyString
|
text: qsTr("Spendable Wallet") + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
viewOnlyQRCode.visible = false
|
viewOnlyQRCode.visible = false
|
||||||
|
@ -147,6 +156,7 @@ Rectangle {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
enabled: fullWalletQRCode.visible
|
enabled: fullWalletQRCode.visible
|
||||||
id: showViewOnlyQr
|
id: showViewOnlyQr
|
||||||
|
small: true
|
||||||
text: qsTr("View Only Wallet") + translationManager.emptyString
|
text: qsTr("View Only Wallet") + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
viewOnlyQRCode.visible = true
|
viewOnlyQRCode.visible = true
|
||||||
|
@ -155,7 +165,6 @@ Rectangle {
|
||||||
Layout.bottomMargin: 30 * scaleRatio
|
Layout.bottomMargin: 30 * scaleRatio
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
visible: !viewOnlyQRCode.visible
|
visible: !viewOnlyQRCode.visible
|
||||||
id: fullWalletQRCode
|
id: fullWalletQRCode
|
||||||
|
@ -178,6 +187,7 @@ Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: 16 * scaleRatio
|
font.pixelSize: 16 * scaleRatio
|
||||||
|
color: Style.defaultFontColor
|
||||||
text: (viewOnlyQRCode.visible) ? qsTr("View Only Wallet") + translationManager.emptyString : qsTr("Spendable Wallet") + translationManager.emptyString
|
text: (viewOnlyQRCode.visible) ? qsTr("View Only Wallet") + translationManager.emptyString : qsTr("Spendable Wallet") + translationManager.emptyString
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ import moneroComponents.Wallet 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
color: "#F0EEEE"
|
color: "transparent"
|
||||||
property var currentHashRate: 0
|
property var currentHashRate: 0
|
||||||
|
|
||||||
/* main layout */
|
/* main layout */
|
||||||
|
@ -74,13 +74,16 @@ Rectangle {
|
||||||
text: qsTr("Mining with your computer helps strengthen the Monero network. The more that people mine, the harder it is for the network to be attacked, and every little bit helps.<br> <br>Mining also gives you a small chance to earn some Monero. Your computer will create hashes looking for block solutions. If you find a block, you will get the associated reward. Good luck!") + translationManager.emptyString
|
text: qsTr("Mining with your computer helps strengthen the Monero network. The more that people mine, the harder it is for the network to be attacked, and every little bit helps.<br> <br>Mining also gives you a small chance to earn some Monero. Your computer will create hashes looking for block solutions. If you find a block, you will get the associated reward. Good luck!") + translationManager.emptyString
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 14 * scaleRatio
|
||||||
|
color: Style.defaultFontColor
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: soloMinerThreadsRow
|
id: soloMinerThreadsRow
|
||||||
Label {
|
Label {
|
||||||
id: soloMinerThreadsLabel
|
id: soloMinerThreadsLabel
|
||||||
color: "#4A4949"
|
color: Style.defaultFontColor
|
||||||
text: qsTr("CPU threads") + translationManager.emptyString
|
text: qsTr("CPU threads") + translationManager.emptyString
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
Layout.preferredWidth: 120
|
Layout.preferredWidth: 120
|
||||||
|
@ -102,8 +105,6 @@ Rectangle {
|
||||||
checked: persistentSettings.allow_background_mining
|
checked: persistentSettings.allow_background_mining
|
||||||
onClicked: {persistentSettings.allow_background_mining = checked}
|
onClicked: {persistentSettings.allow_background_mining = checked}
|
||||||
text: qsTr("Background mining (experimental)") + translationManager.emptyString
|
text: qsTr("Background mining (experimental)") + translationManager.emptyString
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -118,15 +119,13 @@ Rectangle {
|
||||||
checked: !persistentSettings.miningIgnoreBattery
|
checked: !persistentSettings.miningIgnoreBattery
|
||||||
onClicked: {persistentSettings.miningIgnoreBattery = !checked}
|
onClicked: {persistentSettings.miningIgnoreBattery = !checked}
|
||||||
text: qsTr("Enable mining when running on battery") + translationManager.emptyString
|
text: qsTr("Enable mining when running on battery") + translationManager.emptyString
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Label {
|
Label {
|
||||||
id: manageSoloMinerLabel
|
id: manageSoloMinerLabel
|
||||||
color: "#4A4949"
|
color: Style.defaultFontColor
|
||||||
text: qsTr("Manage miner") + translationManager.emptyString
|
text: qsTr("Manage miner") + translationManager.emptyString
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
}
|
}
|
||||||
|
@ -136,11 +135,8 @@ Rectangle {
|
||||||
//enabled: !walletManager.isMining()
|
//enabled: !walletManager.isMining()
|
||||||
id: startSoloMinerButton
|
id: startSoloMinerButton
|
||||||
width: 110
|
width: 110
|
||||||
|
small: true
|
||||||
text: qsTr("Start mining") + translationManager.emptyString
|
text: qsTr("Start mining") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var success = walletManager.startMining(appWindow.currentWallet.address(0, 0), soloMinerThreadsLine.text, persistentSettings.allow_background_mining, persistentSettings.miningIgnoreBattery)
|
var success = walletManager.startMining(appWindow.currentWallet.address(0, 0), soloMinerThreadsLine.text, persistentSettings.allow_background_mining, persistentSettings.miningIgnoreBattery)
|
||||||
if (success) {
|
if (success) {
|
||||||
|
@ -161,11 +157,8 @@ Rectangle {
|
||||||
//enabled: walletManager.isMining()
|
//enabled: walletManager.isMining()
|
||||||
id: stopSoloMinerButton
|
id: stopSoloMinerButton
|
||||||
width: 110
|
width: 110
|
||||||
|
small: true
|
||||||
text: qsTr("Stop mining") + translationManager.emptyString
|
text: qsTr("Stop mining") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
walletManager.stopMining()
|
walletManager.stopMining()
|
||||||
update()
|
update()
|
||||||
|
@ -177,6 +170,7 @@ Rectangle {
|
||||||
Text {
|
Text {
|
||||||
id: statusText
|
id: statusText
|
||||||
text: qsTr("Status: not mining")
|
text: qsTr("Status: not mining")
|
||||||
|
color: Style.defaultFontColor
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.2
|
||||||
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
|
||||||
|
@ -43,7 +43,7 @@ import moneroComponents.SubaddressModel 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: pageReceive
|
id: pageReceive
|
||||||
color: "#F0EEEE"
|
color: "transparent"
|
||||||
property var model
|
property var model
|
||||||
property var current_address
|
property var current_address
|
||||||
property alias addressText : pageReceive.current_address
|
property alias addressText : pageReceive.current_address
|
||||||
|
@ -142,7 +142,6 @@ Rectangle {
|
||||||
|
|
||||||
Clipboard { id: clipboard }
|
Clipboard { id: clipboard }
|
||||||
|
|
||||||
|
|
||||||
/* main layout */
|
/* main layout */
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
|
@ -159,9 +158,9 @@ Rectangle {
|
||||||
property int lineEditFontSize: 12 * scaleRatio
|
property int lineEditFontSize: 12 * scaleRatio
|
||||||
property int qrCodeSize: 240 * scaleRatio
|
property int qrCodeSize: 240 * scaleRatio
|
||||||
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: addressRow
|
id: addressRow
|
||||||
|
spacing: 0
|
||||||
Label {
|
Label {
|
||||||
id: addressLabel
|
id: addressLabel
|
||||||
text: qsTr("Addresses") + translationManager.emptyString
|
text: qsTr("Addresses") + translationManager.emptyString
|
||||||
|
@ -169,10 +168,54 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: tableRect
|
id: header
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 200
|
Layout.topMargin: 10
|
||||||
color: "#FFFFFF"
|
visible: table.count > 0
|
||||||
|
|
||||||
|
height: 10
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 10
|
||||||
|
anchors.leftMargin: 10
|
||||||
|
|
||||||
|
height: 1
|
||||||
|
color: "#404040"
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
|
||||||
|
width: 10
|
||||||
|
height: 10
|
||||||
|
|
||||||
|
source: "../images/historyBorderRadius.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
width: 10
|
||||||
|
height: 10
|
||||||
|
|
||||||
|
source: "../images/historyBorderRadius.png"
|
||||||
|
rotation: 90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: tableRect
|
||||||
|
property int table_max_height: 260
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: table.contentHeight < table_max_height ? table.contentHeight : table_max_height
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
Scroll {
|
Scroll {
|
||||||
id: flickableScroll
|
id: flickableScroll
|
||||||
anchors.right: table.right
|
anchors.right: table.right
|
||||||
|
@ -180,6 +223,7 @@ Rectangle {
|
||||||
anchors.bottom: table.bottom
|
anchors.bottom: table.bottom
|
||||||
flickable: table
|
flickable: table
|
||||||
}
|
}
|
||||||
|
|
||||||
SubaddressTable {
|
SubaddressTable {
|
||||||
id: table
|
id: table
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -192,11 +236,10 @@ Rectangle {
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 20
|
spacing: 20
|
||||||
|
Layout.topMargin: 20
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
shadowReleasedColor: "#FF4304"
|
small: true
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
text: qsTr("Create new address") + translationManager.emptyString;
|
text: qsTr("Create new address") + translationManager.emptyString;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
inputDialog.labelText = qsTr("Set the label of the new address:") + translationManager.emptyString
|
inputDialog.labelText = qsTr("Set the label of the new address:") + translationManager.emptyString
|
||||||
|
@ -210,10 +253,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StandardButton {
|
StandardButton {
|
||||||
shadowReleasedColor: "#FF4304"
|
small: true
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: table.currentIndex > 0
|
enabled: table.currentIndex > 0
|
||||||
text: qsTr("Rename") + translationManager.emptyString;
|
text: qsTr("Rename") + translationManager.emptyString;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -240,7 +280,6 @@ Rectangle {
|
||||||
|
|
||||||
LineEdit {
|
LineEdit {
|
||||||
id: amountLine
|
id: amountLine
|
||||||
fontSize: mainLayout.lineEditFontSize
|
|
||||||
placeholderText: qsTr("Amount to receive") + translationManager.emptyString
|
placeholderText: qsTr("Amount to receive") + translationManager.emptyString
|
||||||
readOnly: false
|
readOnly: false
|
||||||
width: mainLayout.editWidth
|
width: mainLayout.editWidth
|
||||||
|
@ -255,7 +294,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
ColumnLayout {
|
||||||
id: trackingRow
|
id: trackingRow
|
||||||
visible: !isAndroid && !isIOS
|
visible: !isAndroid && !isIOS
|
||||||
Label {
|
Label {
|
||||||
|
@ -288,15 +327,14 @@ Rectangle {
|
||||||
|
|
||||||
TextEdit {
|
TextEdit {
|
||||||
id: trackingLine
|
id: trackingLine
|
||||||
anchors.top: trackingRow.top
|
|
||||||
textFormat: Text.RichText
|
|
||||||
text: ""
|
|
||||||
readOnly: true
|
readOnly: true
|
||||||
width: mainLayout.editWidth
|
width: mainLayout.editWidth
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
textFormat: Text.RichText
|
||||||
|
text: ""
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
color: 'white'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog {
|
MessageDialog {
|
||||||
|
|
|
@ -41,48 +41,58 @@ Rectangle {
|
||||||
property bool viewOnly: false
|
property bool viewOnly: false
|
||||||
id: page
|
id: page
|
||||||
|
|
||||||
color: "#F0EEEE"
|
color: "transparent"
|
||||||
|
|
||||||
|
// fires on every page load
|
||||||
|
function onPageCompleted() {
|
||||||
|
console.log("Settings page loaded");
|
||||||
|
|
||||||
|
if(typeof daemonManager != "undefined"){
|
||||||
|
appWindow.daemonRunning = daemonManager.running(persistentSettings.testnet);
|
||||||
|
}
|
||||||
|
|
||||||
|
logLevelDropdown.update()
|
||||||
|
}
|
||||||
|
|
||||||
Clipboard { id: clipboard }
|
Clipboard { id: clipboard }
|
||||||
|
|
||||||
function initSettings() {
|
|
||||||
//runs on every page load
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
anchors.margins: 17 * scaleRatio
|
anchors.margins: (isMobile)? 17 : 40
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
spacing: 10 * scaleRatio
|
spacing: 26 * scaleRatio
|
||||||
|
|
||||||
//! Manage wallet
|
//! Manage wallet
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
Label {
|
Label {
|
||||||
id: manageWalletLabel
|
id: manageWalletLabel
|
||||||
|
fontSize: 22 * scaleRatio
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: "#4A4949"
|
|
||||||
text: qsTr("Manage wallet") + translationManager.emptyString
|
text: qsTr("Manage wallet") + translationManager.emptyString
|
||||||
Layout.topMargin: 10 * scaleRatio
|
Layout.topMargin: 10 * scaleRatio
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
anchors.top: manageWalletLabel.bottom
|
||||||
height: 1
|
anchors.topMargin: 4
|
||||||
color: "#DEDEDE"
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 2
|
||||||
|
color: Style.dividerColor
|
||||||
|
opacity: Style.dividerOpacity
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: (isMobile)? 1 : 4
|
columns: (isMobile)? 1 : 4
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: closeWalletButton
|
id: closeWalletButton
|
||||||
|
small: true
|
||||||
text: qsTr("Close wallet") + translationManager.emptyString
|
text: qsTr("Close wallet") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
visible: true
|
visible: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("closing wallet button clicked")
|
console.log("closing wallet button clicked")
|
||||||
|
@ -91,13 +101,10 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
enabled: !viewOnly
|
|
||||||
id: createViewOnlyWalletButton
|
id: createViewOnlyWalletButton
|
||||||
|
enabled: !viewOnly
|
||||||
|
small: true
|
||||||
text: qsTr("Create view only wallet") + translationManager.emptyString
|
text: qsTr("Create view only wallet") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
visible: true
|
visible: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
wizard.openCreateViewOnlyWalletPage();
|
wizard.openCreateViewOnlyWalletPage();
|
||||||
|
@ -141,12 +148,9 @@ Rectangle {
|
||||||
*/
|
*/
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: rescanSpentButton
|
id: rescanSpentButton
|
||||||
|
small: true
|
||||||
enabled: !persistentSettings.useRemoteNode
|
enabled: !persistentSettings.useRemoteNode
|
||||||
text: qsTr("Rescan wallet balance") + translationManager.emptyString
|
text: qsTr("Rescan wallet balance") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (!currentWallet.rescanSpent()) {
|
if (!currentWallet.rescanSpent()) {
|
||||||
console.error("Error: ", currentWallet.errorString);
|
console.error("Error: ", currentWallet.errorString);
|
||||||
|
@ -164,14 +168,15 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: changePasswordButton
|
id: changePasswordButton
|
||||||
|
small: true
|
||||||
text: qsTr("Change password") + translationManager.emptyString
|
text: qsTr("Change password") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
passwordDialog.onAcceptedCallback = function() {
|
passwordDialog.onAcceptedCallback = function() {
|
||||||
if(appWindow.walletPassword === passwordDialog.password){
|
if(appWindow.walletPassword === passwordDialog.password){
|
||||||
|
@ -193,16 +198,20 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
LabelSubheader {
|
||||||
|
text: qsTr("Wallet mode") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: remoteDisconnect
|
id: remoteDisconnect
|
||||||
|
small: true
|
||||||
enabled: persistentSettings.useRemoteNode
|
enabled: persistentSettings.useRemoteNode
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: false
|
||||||
text: qsTr("Local Node") + translationManager.emptyString
|
text: qsTr("Local Node") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
appWindow.disconnectRemoteNode();
|
appWindow.disconnectRemoteNode();
|
||||||
}
|
}
|
||||||
|
@ -210,185 +219,51 @@ Rectangle {
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: remoteConnect
|
id: remoteConnect
|
||||||
|
small: true
|
||||||
enabled: !persistentSettings.useRemoteNode
|
enabled: !persistentSettings.useRemoteNode
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: false
|
||||||
text: qsTr("Remote Node") + translationManager.emptyString
|
text: qsTr("Remote Node") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
appWindow.connectRemoteNode();
|
appWindow.connectRemoteNode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Manage daemon
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
visible: !isMobile
|
visible: !isMobile && !persistentSettings.useRemoteNode
|
||||||
Layout.topMargin: 20
|
|
||||||
Label {
|
|
||||||
id: manageDaemonLabel
|
|
||||||
color: "#4A4949"
|
|
||||||
text: qsTr("Manage Daemon") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
CheckBox {
|
|
||||||
id: daemonAdvanced
|
|
||||||
Layout.leftMargin: 15
|
|
||||||
text: qsTr("Show advanced") + translationManager.emptyString
|
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle {
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
height: 1
|
|
||||||
color: "#DEDEDE"
|
|
||||||
}
|
|
||||||
|
|
||||||
GridLayout {
|
LabelSubheader {
|
||||||
visible: !isMobile && !persistentSettings.useRemoteNode
|
text: qsTr("Bootstrap node") + translationManager.emptyString
|
||||||
id: daemonStatusRow
|
|
||||||
columns: (isMobile) ? 2 : 4
|
|
||||||
StandardButton {
|
|
||||||
visible: !appWindow.daemonRunning
|
|
||||||
id: startDaemonButton
|
|
||||||
text: qsTr("Start Local Node") + translationManager.emptyString
|
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
onClicked: {
|
|
||||||
// Update bootstrap daemon address
|
|
||||||
persistentSettings.bootstrapNodeAddress = bootstrapNodeEdit.daemonAddrText ? bootstrapNodeEdit.getAddress() : "";
|
|
||||||
|
|
||||||
// Set current daemon address to local
|
|
||||||
appWindow.currentDaemonAddress = appWindow.localDaemonAddress
|
|
||||||
appWindow.startDaemon(daemonFlags.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StandardButton {
|
|
||||||
visible: appWindow.daemonRunning
|
|
||||||
id: stopDaemonButton
|
|
||||||
text: qsTr("Stop Local Node") + translationManager.emptyString
|
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
onClicked: {
|
|
||||||
appWindow.stopDaemon()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StandardButton {
|
|
||||||
visible: true
|
|
||||||
id: daemonStatusButton
|
|
||||||
text: qsTr("Show status") + translationManager.emptyString
|
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
onClicked: {
|
|
||||||
daemonManager.sendCommand("status",currentWallet.nettype);
|
|
||||||
daemonConsolePopup.open();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: blockchainFolderRow
|
|
||||||
visible: !isMobile && !persistentSettings.useRemoteNode
|
|
||||||
Label {
|
|
||||||
id: blockchainFolderLabel
|
|
||||||
color: "#4A4949"
|
|
||||||
text: qsTr("Blockchain location") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
LineEdit {
|
|
||||||
id: blockchainFolder
|
|
||||||
Layout.preferredWidth: 200
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: persistentSettings.blockchainDataDir
|
|
||||||
placeholderText: qsTr("(optional)") + translationManager.emptyString
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: {
|
|
||||||
mouse.accepted = false
|
|
||||||
if(persistentSettings.blockchainDataDir != "")
|
|
||||||
blockchainFileDialog.folder = "file://" + persistentSettings.blockchainDataDir
|
|
||||||
blockchainFileDialog.open()
|
|
||||||
blockchainFolder.focus = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
visible: daemonAdvanced.checked && !isMobile && !persistentSettings.useRemoteNode
|
|
||||||
id: daemonFlagsRow
|
|
||||||
Label {
|
|
||||||
id: daemonFlagsLabel
|
|
||||||
color: "#4A4949"
|
|
||||||
text: qsTr("Local daemon startup flags") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
LineEdit {
|
|
||||||
id: daemonFlags
|
|
||||||
Layout.preferredWidth: 200
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: appWindow.persistentSettings.daemonFlags;
|
|
||||||
placeholderText: qsTr("(optional)") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
visible: (daemonAdvanced.checked || isMobile) && persistentSettings.useRemoteNode
|
|
||||||
Label {
|
|
||||||
id: daemonLoginLabel
|
|
||||||
Layout.fillWidth: true
|
|
||||||
color: "#4A4949"
|
|
||||||
text: qsTr("Node login (optional)") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
visible: (daemonAdvanced.checked || isMobile) && persistentSettings.useRemoteNode
|
|
||||||
LineEdit {
|
|
||||||
id: daemonUsername
|
|
||||||
Layout.preferredWidth: 100 * scaleRatio
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: persistentSettings.daemonUsername
|
|
||||||
placeholderText: qsTr("Username") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LineEdit {
|
|
||||||
id: daemonPassword
|
|
||||||
Layout.preferredWidth: 100 * scaleRatio
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: persistentSettings.daemonPassword
|
|
||||||
placeholderText: qsTr("Password") + translationManager.emptyString
|
|
||||||
echoMode: TextInput.Password
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
visible: !isMobile && !persistentSettings.useRemoteNode
|
visible: !isMobile && !persistentSettings.useRemoteNode
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Label {
|
Layout.fillWidth: true
|
||||||
color: "#4A4949"
|
|
||||||
text: qsTr("Bootstrap node (leave blank if not wanted)") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
RemoteNodeEdit {
|
RemoteNodeEdit {
|
||||||
id: bootstrapNodeEdit
|
id: bootstrapNodeEdit
|
||||||
Layout.minimumWidth: 100 * scaleRatio
|
Layout.minimumWidth: 100 * scaleRatio
|
||||||
|
Layout.bottomMargin: 20 * scaleRatio
|
||||||
|
|
||||||
|
lineEditBackgroundColor: "transparent"
|
||||||
|
lineEditFontColor: "white"
|
||||||
|
lineEditBorderColor: Qt.rgba(255, 255, 255, 0.35)
|
||||||
|
|
||||||
|
daemonAddrLabelText: qsTr("Address")
|
||||||
|
daemonPortLabelText: qsTr("Port")
|
||||||
daemonAddrText: persistentSettings.bootstrapNodeAddress.split(":")[0].trim()
|
daemonAddrText: persistentSettings.bootstrapNodeAddress.split(":")[0].trim()
|
||||||
daemonPortText: (persistentSettings.bootstrapNodeAddress.split(":")[1].trim() == "") ? "18081" : persistentSettings.bootstrapNodeAddress.split(":")[1]
|
daemonPortText: {
|
||||||
|
var node_split = persistentSettings.bootstrapNodeAddress.split(":");
|
||||||
|
if(node_split.length == 2){
|
||||||
|
(node_split[1].trim() == "") ? "18081" : node_split[1];
|
||||||
|
} else {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
}
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
persistentSettings.bootstrapNodeAddress = daemonAddrText ? bootstrapNodeEdit.getAddress() : "";
|
persistentSettings.bootstrapNodeAddress = daemonAddrText ? bootstrapNodeEdit.getAddress() : "";
|
||||||
console.log("setting bootstrap node to " + persistentSettings.bootstrapNodeAddress)
|
console.log("setting bootstrap node to " + persistentSettings.bootstrapNodeAddress)
|
||||||
|
@ -400,13 +275,19 @@ Rectangle {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
visible: persistentSettings.useRemoteNode
|
visible: persistentSettings.useRemoteNode
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Label {
|
Layout.fillWidth: true
|
||||||
color: "#4A4949"
|
|
||||||
text: qsTr("Remote node") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
RemoteNodeEdit {
|
RemoteNodeEdit {
|
||||||
id: remoteNodeEdit
|
id: remoteNodeEdit
|
||||||
Layout.minimumWidth: 100 * scaleRatio
|
Layout.minimumWidth: 100 * scaleRatio
|
||||||
|
|
||||||
|
lineEditBackgroundColor: "transparent"
|
||||||
|
lineEditFontColor: "white"
|
||||||
|
lineEditBorderColor: Qt.rgba(255, 255, 255, 0.35)
|
||||||
|
|
||||||
|
daemonAddrLabelText: qsTr("Address")
|
||||||
|
daemonPortLabelText: qsTr("Port")
|
||||||
|
|
||||||
property var rna: persistentSettings.remoteNodeAddress
|
property var rna: persistentSettings.remoteNodeAddress
|
||||||
daemonAddrText: rna.search(":") != -1 ? rna.split(":")[0].trim() : ""
|
daemonAddrText: rna.search(":") != -1 ? rna.split(":")[0].trim() : ""
|
||||||
daemonPortText: rna.search(":") != -1 ? (rna.split(":")[1].trim() == "") ? "18081" : rna.split(":")[1] : ""
|
daemonPortText: rna.search(":") != -1 ? (rna.split(":")[1].trim() == "") ? "18081" : rna.split(":")[1] : ""
|
||||||
|
@ -415,43 +296,203 @@ Rectangle {
|
||||||
console.log("setting remote node to " + persistentSettings.remoteNodeAddress)
|
console.log("setting remote node to " + persistentSettings.remoteNodeAddress)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout{
|
||||||
|
visible: persistentSettings.useRemoteNode
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
StandardButton {
|
||||||
|
id: remoteNodeSave
|
||||||
|
small: true
|
||||||
|
text: qsTr("Connect") + translationManager.emptyString
|
||||||
|
onClicked: {
|
||||||
|
// Update daemon login
|
||||||
|
persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress();
|
||||||
|
persistentSettings.daemonUsername = daemonUsername.text;
|
||||||
|
persistentSettings.daemonPassword = daemonPassword.text;
|
||||||
|
persistentSettings.useRemoteNode = true
|
||||||
|
|
||||||
|
currentWallet.setDaemonLogin(persistentSettings.daemonUsername, persistentSettings.daemonPassword);
|
||||||
|
|
||||||
|
appWindow.connectRemoteNode()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Manage daemon
|
||||||
|
RowLayout {
|
||||||
|
visible: !isMobile
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: manageDaemonLabel
|
||||||
|
fontSize: 22 * scaleRatio
|
||||||
|
text: qsTr("Manage Daemon") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.top: manageDaemonLabel.bottom
|
||||||
|
anchors.topMargin: 4
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 2
|
||||||
|
color: Style.dividerColor
|
||||||
|
opacity: Style.dividerOpacity
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GridLayout {
|
||||||
|
visible: !isMobile && !persistentSettings.useRemoteNode
|
||||||
|
id: daemonStatusRow
|
||||||
|
columns: (isMobile) ? 2 : 4
|
||||||
|
StandardButton {
|
||||||
|
id: startDaemonButton
|
||||||
|
small: true
|
||||||
|
visible: !appWindow.daemonRunning
|
||||||
|
text: qsTr("Start Local Node") + translationManager.emptyString
|
||||||
|
onClicked: {
|
||||||
|
// Update bootstrap daemon address
|
||||||
|
persistentSettings.bootstrapNodeAddress = bootstrapNodeEdit.daemonAddrText ? bootstrapNodeEdit.getAddress() : "";
|
||||||
|
|
||||||
|
// Set current daemon address to local
|
||||||
|
appWindow.currentDaemonAddress = appWindow.localDaemonAddress;
|
||||||
|
appWindow.startDaemon(daemonFlags.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StandardButton {
|
||||||
|
id: stopDaemonButton
|
||||||
|
small: true
|
||||||
|
visible: appWindow.daemonRunning
|
||||||
|
text: qsTr("Stop Local Node") + translationManager.emptyString
|
||||||
|
onClicked: {
|
||||||
|
appWindow.stopDaemon()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StandardButton {
|
||||||
|
id: daemonStatusButton
|
||||||
|
small: true
|
||||||
|
visible: true
|
||||||
|
text: qsTr("Show status") + translationManager.emptyString
|
||||||
|
onClicked: {
|
||||||
|
daemonManager.sendCommand("status",currentWallet.nettype);
|
||||||
|
daemonConsolePopup.open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: blockchainFolderRow
|
||||||
|
visible: !isMobile && !persistentSettings.useRemoteNode
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.bottomMargin: 14 * scaleRatio
|
||||||
|
|
||||||
|
LabelSubheader {
|
||||||
|
text: qsTr("Blockchain location") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
visible: persistentSettings.blockchainDataDir.length > 0
|
||||||
|
|
||||||
|
LineEdit {
|
||||||
|
id: blockchainFolder
|
||||||
|
Layout.preferredWidth: 200
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: persistentSettings.blockchainDataDir;
|
||||||
|
placeholderText: qsTr("(optional)") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 8
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: remoteNodeSave
|
id: blockchainFolderButton
|
||||||
text: qsTr("Connect") + translationManager.emptyString
|
small: true
|
||||||
shadowReleasedColor: "#FF4304"
|
visible: true
|
||||||
shadowPressedColor: "#B32D00"
|
text: qsTr("Change location") + translationManager.emptyString
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
// Update daemon login
|
//mouse.accepted = false
|
||||||
persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress();
|
if(persistentSettings.blockchainDataDir != "")
|
||||||
persistentSettings.daemonUsername = daemonUsername.text;
|
blockchainFileDialog.folder = "file://" + persistentSettings.blockchainDataDir
|
||||||
persistentSettings.daemonPassword = daemonPassword.text;
|
blockchainFileDialog.open()
|
||||||
persistentSettings.useRemoteNode = true
|
blockchainFolder.focus = true
|
||||||
|
|
||||||
currentWallet.setDaemonLogin(persistentSettings.daemonUsername, persistentSettings.daemonPassword);
|
|
||||||
|
|
||||||
appWindow.connectRemoteNode()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout{
|
||||||
|
CheckBox {
|
||||||
|
id: daemonAdvanced
|
||||||
|
text: qsTr("Show advanced") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
visible: daemonAdvanced.checked && !isMobile && !persistentSettings.useRemoteNode
|
||||||
|
id: daemonFlagsRow
|
||||||
|
|
||||||
|
LineEdit {
|
||||||
|
id: daemonFlags
|
||||||
|
Layout.preferredWidth: 200
|
||||||
|
Layout.fillWidth: true
|
||||||
|
labelText: qsTr("Local daemon startup flags") + translationManager.emptyString
|
||||||
|
text: appWindow.persistentSettings.daemonFlags;
|
||||||
|
placeholderText: qsTr("(optional)") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
visible: (daemonAdvanced.checked || isMobile) && persistentSettings.useRemoteNode
|
||||||
|
GridLayout {
|
||||||
|
columns: (isMobile) ? 1 : 2
|
||||||
|
columnSpacing: 32
|
||||||
|
|
||||||
|
LineEdit {
|
||||||
|
id: daemonUsername
|
||||||
|
Layout.fillWidth: true
|
||||||
|
labelText: "Daemon username"
|
||||||
|
text: persistentSettings.daemonUsername
|
||||||
|
placeholderText: qsTr("Username") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
|
LineEdit {
|
||||||
|
id: daemonPassword
|
||||||
|
Layout.fillWidth: true
|
||||||
|
labelText: "Daemon password"
|
||||||
|
text: persistentSettings.daemonPassword
|
||||||
|
placeholderText: qsTr("Password") + translationManager.emptyString
|
||||||
|
echoMode: TextInput.Password
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
visible: !isMobile
|
visible: !isMobile
|
||||||
Label {
|
Label {
|
||||||
color: "#4A4949"
|
id: layoutSettingsLabel
|
||||||
|
fontSize: 22 * scaleRatio
|
||||||
text: qsTr("Layout settings") + translationManager.emptyString
|
text: qsTr("Layout settings") + translationManager.emptyString
|
||||||
anchors.topMargin: 30 * scaleRatio
|
|
||||||
Layout.topMargin: 30 * scaleRatio
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: !isMobile
|
anchors.top: layoutSettingsLabel.bottom
|
||||||
Layout.fillWidth: true
|
anchors.topMargin: 4
|
||||||
height: 1
|
anchors.left: parent.left
|
||||||
color: "#DEDEDE"
|
anchors.right: parent.right
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 2
|
||||||
|
color: Style.dividerColor
|
||||||
|
opacity: Style.dividerOpacity
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -461,8 +502,6 @@ Rectangle {
|
||||||
checked: persistentSettings.customDecorations
|
checked: persistentSettings.customDecorations
|
||||||
onClicked: appWindow.setCustomWindowDecorations(checked)
|
onClicked: appWindow.setCustomWindowDecorations(checked)
|
||||||
text: qsTr("Custom decorations") + translationManager.emptyString
|
text: qsTr("Custom decorations") + translationManager.emptyString
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -470,41 +509,84 @@ Rectangle {
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Label {
|
Label {
|
||||||
color: "#4A4949"
|
id: logLevelLabel
|
||||||
|
fontSize: 22 * scaleRatio
|
||||||
text: qsTr("Log level") + translationManager.emptyString
|
text: qsTr("Log level") + translationManager.emptyString
|
||||||
anchors.topMargin: 30 * scaleRatio
|
|
||||||
Layout.topMargin: 30 * scaleRatio
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
height: 1
|
|
||||||
color: "#DEDEDE"
|
|
||||||
}
|
|
||||||
ColumnLayout {
|
|
||||||
ComboBox {
|
|
||||||
id: logLevel
|
|
||||||
model: [0,1,2,3,4,"custom"]
|
|
||||||
currentIndex : appWindow.persistentSettings.logLevel;
|
|
||||||
onCurrentIndexChanged: {
|
|
||||||
if (currentIndex == 5) {
|
|
||||||
console.log("log categories changed: ", logCategories.text);
|
|
||||||
walletManager.setLogCategories(logCategories.text);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log("log level changed: ",currentIndex);
|
|
||||||
walletManager.setLogLevel(currentIndex);
|
|
||||||
}
|
|
||||||
appWindow.persistentSettings.logLevel = currentIndex;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.top: logLevelLabel.bottom
|
||||||
|
anchors.topMargin: 4
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 2
|
||||||
|
color: Style.dividerColor
|
||||||
|
opacity: Style.dividerOpacity
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GridLayout {
|
||||||
|
columns: (isMobile)? 1 : 3
|
||||||
|
Layout.fillWidth: true
|
||||||
|
columnSpacing: 32
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: 0
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: logLevel
|
||||||
|
ListElement { name: "wow"; column1: "0"; }
|
||||||
|
ListElement { column1: "1"; }
|
||||||
|
ListElement { column1: "2"; }
|
||||||
|
ListElement { column1: "3"; }
|
||||||
|
ListElement { column1: "4"; }
|
||||||
|
ListElement { column1: "custom"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
StandardDropdown {
|
||||||
|
id: logLevelDropdown
|
||||||
|
dataModel: logLevel
|
||||||
|
currentIndex: appWindow.persistentSettings.logLevel;
|
||||||
|
onChanged: {
|
||||||
|
if (currentIndex == 5) {
|
||||||
|
console.log("log categories changed: ", logCategories.text);
|
||||||
|
walletManager.setLogCategories(logCategories.text);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log("log level changed: ",currentIndex);
|
||||||
|
walletManager.setLogLevel(currentIndex);
|
||||||
|
}
|
||||||
|
appWindow.persistentSettings.logLevel = currentIndex;
|
||||||
|
}
|
||||||
|
Layout.fillWidth: true
|
||||||
|
shadowReleasedColor: "#FF4304"
|
||||||
|
shadowPressedColor: "#B32D00"
|
||||||
|
releasedColor: "#363636"
|
||||||
|
pressedColor: "#202020"
|
||||||
|
}
|
||||||
|
// Make sure dropdown is on top
|
||||||
|
z: parent.z + 30
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
LineEdit {
|
LineEdit {
|
||||||
id: logCategories
|
id: logCategories
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: appWindow.persistentSettings.logCategories
|
text: appWindow.persistentSettings.logCategories
|
||||||
|
labelText: "Log Categories"
|
||||||
placeholderText: qsTr("(e.g. *:WARNING,net.p2p:DEBUG)") + translationManager.emptyString
|
placeholderText: qsTr("(e.g. *:WARNING,net.p2p:DEBUG)") + translationManager.emptyString
|
||||||
enabled: logLevel.currentIndex == 5
|
enabled: logLevelDropdown.currentIndex === 5
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
if(enabled) {
|
if(enabled) {
|
||||||
console.log("log categories changed: ", text);
|
console.log("log categories changed: ", text);
|
||||||
|
@ -518,31 +600,41 @@ Rectangle {
|
||||||
// Version
|
// Version
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Label {
|
Label {
|
||||||
color: "#4A4949"
|
id: debugLabel
|
||||||
text: qsTr("Debug info") + translationManager.emptyString
|
text: qsTr("Debug info") + translationManager.emptyString
|
||||||
fontSize: 16
|
fontSize: 22
|
||||||
anchors.topMargin: 30 * scaleRatio
|
anchors.topMargin: 30 * scaleRatio
|
||||||
Layout.topMargin: 30 * scaleRatio
|
Layout.topMargin: 30 * scaleRatio
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.top: debugLabel.bottom
|
||||||
|
anchors.topMargin: 4
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 2
|
||||||
|
color: Style.dividerColor
|
||||||
|
opacity: Style.dividerOpacity
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
height: 1
|
|
||||||
color: "#DEDEDE"
|
|
||||||
}
|
|
||||||
TextBlock {
|
TextBlock {
|
||||||
Layout.topMargin: 8
|
Layout.topMargin: 8
|
||||||
|
font.pixelSize: 14
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("GUI version: ") + Version.GUI_VERSION + translationManager.emptyString
|
text: qsTr("GUI version: ") + Version.GUI_VERSION + translationManager.emptyString
|
||||||
}
|
}
|
||||||
TextBlock {
|
TextBlock {
|
||||||
id: guiMoneroVersion
|
id: guiMoneroVersion
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
font.pixelSize: 14
|
||||||
text: qsTr("Embedded Monero version: ") + Version.GUI_MONERO_VERSION + translationManager.emptyString
|
text: qsTr("Embedded Monero version: ") + Version.GUI_MONERO_VERSION + translationManager.emptyString
|
||||||
}
|
}
|
||||||
TextBlock {
|
TextBlock {
|
||||||
id: restoreHeightText
|
id: restoreHeightText
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
font.pixelSize: 14
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
property var txt: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C}</style>" + qsTr("Wallet creation height: ") + (currentWallet ? currentWallet.walletCreationHeight : "") + translationManager.emptyString
|
property var txt: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C}</style>" + qsTr("Wallet creation height: ") + (currentWallet ? currentWallet.walletCreationHeight : "") + translationManager.emptyString
|
||||||
property var linkTxt: qsTr(" <a href='#'>(Click to change)</a>") + translationManager.emptyString
|
property var linkTxt: qsTr(" <a href='#'>(Click to change)</a>") + translationManager.emptyString
|
||||||
|
@ -569,13 +661,10 @@ Rectangle {
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: restoreHeightSave
|
id: restoreHeightSave
|
||||||
|
small: true
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: false
|
||||||
Layout.leftMargin: 30
|
Layout.leftMargin: 30
|
||||||
text: qsTr("Save") + translationManager.emptyString
|
text: qsTr("Save") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
currentWallet.walletCreationHeight = restoreHeight.text
|
currentWallet.walletCreationHeight = restoreHeight.text
|
||||||
|
@ -613,14 +702,17 @@ Rectangle {
|
||||||
|
|
||||||
TextBlock {
|
TextBlock {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
font.pixelSize: 14
|
||||||
text: (!currentWallet) ? "" : qsTr("Wallet log path: ") + currentWallet.walletLogPath + translationManager.emptyString
|
text: (!currentWallet) ? "" : qsTr("Wallet log path: ") + currentWallet.walletLogPath + translationManager.emptyString
|
||||||
}
|
}
|
||||||
TextBlock {
|
TextBlock {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
font.pixelSize: 14
|
||||||
text: qsTr("Wallet Name: ") + walletName + translationManager.emptyString
|
text: qsTr("Wallet Name: ") + walletName + translationManager.emptyString
|
||||||
}
|
}
|
||||||
TextBlock {
|
TextBlock {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
font.pixelSize: 14
|
||||||
text: (!currentWallet) ? "" : qsTr("Daemon log path: ") + currentWallet.daemonLogPath + translationManager.emptyString
|
text: (!currentWallet) ? "" : qsTr("Daemon log path: ") + currentWallet.daemonLogPath + translationManager.emptyString
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -644,7 +736,8 @@ Rectangle {
|
||||||
folder: "file://" + persistentSettings.blockchainDataDir
|
folder: "file://" + persistentSettings.blockchainDataDir
|
||||||
|
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
var dataDir = walletManager.urlToLocalPath(blockchainFileDialog.fileUrl)
|
var dataDir = walletManager.urlToLocalPath(blockchainFileDialog.fileUrl);
|
||||||
|
console.log(dataDir);
|
||||||
var validator = daemonManager.validateDataDir(dataDir);
|
var validator = daemonManager.validateDataDir(dataDir);
|
||||||
if(!validator.valid) {
|
if(!validator.valid) {
|
||||||
|
|
||||||
|
@ -691,16 +784,6 @@ Rectangle {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// fires on every page load
|
|
||||||
function onPageCompleted() {
|
|
||||||
console.log("Settings page loaded");
|
|
||||||
initSettings();
|
|
||||||
|
|
||||||
|
|
||||||
if(typeof daemonManager != "undefined")
|
|
||||||
appWindow.daemonRunning = daemonManager.running(persistentSettings.nettype)
|
|
||||||
}
|
|
||||||
|
|
||||||
// fires only once
|
// fires only once
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if(typeof daemonManager != "undefined")
|
if(typeof daemonManager != "undefined")
|
||||||
|
|
|
@ -37,7 +37,7 @@ import moneroComponents.Clipboard 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
||||||
color: "#F0EEEE"
|
color: "transparent"
|
||||||
|
|
||||||
Clipboard { id: clipboard }
|
Clipboard { id: clipboard }
|
||||||
|
|
||||||
|
@ -90,6 +90,7 @@ Rectangle {
|
||||||
"This database is meant for use by Monero wallets as well as wallets from Monero clones which reuse the Monero keys.") + translationManager.emptyString
|
"This database is meant for use by Monero wallets as well as wallets from Monero clones which reuse the Monero keys.") + translationManager.emptyString
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
Layout.fillWidth: true;
|
Layout.fillWidth: true;
|
||||||
|
color: Style.defaultFontColor
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
@ -117,6 +118,7 @@ Rectangle {
|
||||||
sharedRingDBDialog.icon = StandardIcon.Information
|
sharedRingDBDialog.icon = StandardIcon.Information
|
||||||
sharedRingDBDialog.open()
|
sharedRingDBDialog.open()
|
||||||
}
|
}
|
||||||
|
color: Style.defaultFontColor
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -140,11 +142,8 @@ Rectangle {
|
||||||
id: selectBlackballFileButton
|
id: selectBlackballFileButton
|
||||||
anchors.rightMargin: 17 * scaleRatio
|
anchors.rightMargin: 17 * scaleRatio
|
||||||
text: qsTr("Select") + translationManager.emptyString
|
text: qsTr("Select") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: true
|
enabled: true
|
||||||
|
small: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
loadBlackballFileDialog.open()
|
loadBlackballFileDialog.open()
|
||||||
}
|
}
|
||||||
|
@ -172,10 +171,7 @@ Rectangle {
|
||||||
id: loadBlackballFileButton
|
id: loadBlackballFileButton
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Load") + translationManager.emptyString
|
text: qsTr("Load") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
small: true
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: !!appWindow.currentWallet
|
enabled: !!appWindow.currentWallet
|
||||||
onClicked: appWindow.currentWallet.blackballOutputs(walletManager.urlToLocalPath(loadBlackballFileDialog.fileUrl), true)
|
onClicked: appWindow.currentWallet.blackballOutputs(walletManager.urlToLocalPath(loadBlackballFileDialog.fileUrl), true)
|
||||||
}
|
}
|
||||||
|
@ -209,10 +205,7 @@ Rectangle {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: blackballButton
|
id: blackballButton
|
||||||
text: qsTr("Blackball") + translationManager.emptyString
|
text: qsTr("Blackball") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
small: true
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: !!appWindow.currentWallet && validHex32(blackballOutputLine.text)
|
enabled: !!appWindow.currentWallet && validHex32(blackballOutputLine.text)
|
||||||
onClicked: appWindow.currentWallet.blackballOutput(blackballOutputLine.text)
|
onClicked: appWindow.currentWallet.blackballOutput(blackballOutputLine.text)
|
||||||
}
|
}
|
||||||
|
@ -221,10 +214,7 @@ Rectangle {
|
||||||
id: unblackballButton
|
id: unblackballButton
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Unblackball") + translationManager.emptyString
|
text: qsTr("Unblackball") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
small: true
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: !!appWindow.currentWallet && validHex32(blackballOutputLine.text)
|
enabled: !!appWindow.currentWallet && validHex32(blackballOutputLine.text)
|
||||||
onClicked: appWindow.currentWallet.unblackballOutput(blackballOutputLine.text)
|
onClicked: appWindow.currentWallet.unblackballOutput(blackballOutputLine.text)
|
||||||
}
|
}
|
||||||
|
@ -255,6 +245,7 @@ Rectangle {
|
||||||
sharedRingDBDialog.icon = StandardIcon.Information
|
sharedRingDBDialog.icon = StandardIcon.Information
|
||||||
sharedRingDBDialog.open()
|
sharedRingDBDialog.open()
|
||||||
}
|
}
|
||||||
|
color: Style.defaultFontColor
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -281,10 +272,7 @@ Rectangle {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: getRingButton
|
id: getRingButton
|
||||||
text: qsTr("Get Ring") + translationManager.emptyString
|
text: qsTr("Get Ring") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
small: true
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: !!appWindow.currentWallet && validHex32(keyImageLine.text)
|
enabled: !!appWindow.currentWallet && validHex32(keyImageLine.text)
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var ring = appWindow.currentWallet.getRing(keyImageLine.text)
|
var ring = appWindow.currentWallet.getRing(keyImageLine.text)
|
||||||
|
@ -322,7 +310,7 @@ Rectangle {
|
||||||
id: setRingRelative
|
id: setRingRelative
|
||||||
checked: true
|
checked: true
|
||||||
text: qsTr("Relative") + translationManager.emptyString
|
text: qsTr("Relative") + translationManager.emptyString
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
checkedIcon: "../images/checkedBlackIcon.png"
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||||
}
|
}
|
||||||
LineEdit {
|
LineEdit {
|
||||||
|
@ -344,10 +332,6 @@ Rectangle {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: setRingButton
|
id: setRingButton
|
||||||
text: qsTr("Set Ring") + translationManager.emptyString
|
text: qsTr("Set Ring") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: !!appWindow.currentWallet && validHex32(keyImageLine.text) && validRing(setRingLine.text.trim(), setRingRelative.checked)
|
enabled: !!appWindow.currentWallet && validHex32(keyImageLine.text) && validRing(setRingLine.text.trim(), setRingRelative.checked)
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var outs = setRingLine.text.trim()
|
var outs = setRingLine.text.trim()
|
||||||
|
@ -360,7 +344,7 @@ Rectangle {
|
||||||
id: segregatePreForkOutputs
|
id: segregatePreForkOutputs
|
||||||
checked: persistentSettings.segregatePreForkOutputs
|
checked: persistentSettings.segregatePreForkOutputs
|
||||||
text: qsTr("I intend to spend on key-reusing fork(s)") + translationManager.emptyString
|
text: qsTr("I intend to spend on key-reusing fork(s)") + translationManager.emptyString
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
checkedIcon: "../images/checkedBlackIcon.png"
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
persistentSettings.segregatePreForkOutputs = segregatePreForkOutputs.checked
|
persistentSettings.segregatePreForkOutputs = segregatePreForkOutputs.checked
|
||||||
|
@ -373,7 +357,7 @@ Rectangle {
|
||||||
id: keyReuseMitigation2
|
id: keyReuseMitigation2
|
||||||
checked: persistentSettings.keyReuseMitigation2
|
checked: persistentSettings.keyReuseMitigation2
|
||||||
text: qsTr("I might want to spend on key-reusing fork(s)") + translationManager.emptyString
|
text: qsTr("I might want to spend on key-reusing fork(s)") + translationManager.emptyString
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
checkedIcon: "../images/checkedBlackIcon.png"
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
persistentSettings.keyReuseMitigation2 = keyReuseMitigation2.checked
|
persistentSettings.keyReuseMitigation2 = keyReuseMitigation2.checked
|
||||||
|
|
468
pages/Sign.qml
|
@ -39,14 +39,10 @@ import moneroComponents.WalletManager 1.0
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
|
|
||||||
color: "#F0EEEE"
|
color: "transparent"
|
||||||
|
|
||||||
Clipboard { id: clipboard }
|
Clipboard { id: clipboard }
|
||||||
|
|
||||||
function checkAddress(address, nettype) {
|
|
||||||
return walletManager.addressValid(address, nettype)
|
|
||||||
}
|
|
||||||
|
|
||||||
MessageDialog {
|
MessageDialog {
|
||||||
// dynamically change onclose handler
|
// dynamically change onclose handler
|
||||||
property var onCloseCallback
|
property var onCloseCallback
|
||||||
|
@ -88,322 +84,215 @@ Rectangle {
|
||||||
|
|
||||||
// sign / verify
|
// sign / verify
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.margins: 17 * scaleRatio
|
anchors.top: parent.top
|
||||||
|
anchors.margins: 40 * scaleRatio
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
|
|
||||||
spacing: 20 * scaleRatio
|
spacing: 20 * scaleRatio
|
||||||
|
|
||||||
// sign
|
// sign
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: signBox
|
id: signBox
|
||||||
|
anchors.left: parent.left
|
||||||
RowLayout {
|
anchors.right: parent.right
|
||||||
|
spacing: 20 * scaleRatio
|
||||||
Text {
|
|
||||||
text: qsTr("Sign a message or file contents with your address:") + translationManager.emptyString
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
font.pixelSize: 14 * scaleRatio
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: signMessageLabel
|
id: signTitleLabel
|
||||||
text: qsTr("Either message:") + translationManager.emptyString
|
fontSize: 24 * scaleRatio
|
||||||
|
text: qsTr("Sign") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
Text {
|
||||||
|
text: qsTr("This page lets you sign/verify a message (or file contents) with your address.") + translationManager.emptyString
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 14 * scaleRatio
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout{
|
||||||
id: signMessageRow
|
id: signMessageRow
|
||||||
anchors.topMargin: 17
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
LineEdit {
|
RowLayout {
|
||||||
id: signMessageLine
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: signMessageButton.left
|
|
||||||
placeholderText: qsTr("Message to sign") + translationManager.emptyString;
|
|
||||||
readOnly: false
|
|
||||||
onTextChanged: signSignatureLine.text = ""
|
|
||||||
|
|
||||||
IconButton {
|
|
||||||
imageSource: "../images/copyToClipboard.png"
|
|
||||||
onClicked: {
|
|
||||||
if (signMessageLine.text.length > 0) {
|
|
||||||
clipboard.setText(signMessageLine.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StandardButton {
|
|
||||||
id: signMessageButton
|
|
||||||
anchors.right: parent.right
|
|
||||||
text: qsTr("Sign") + translationManager.emptyString
|
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: true
|
|
||||||
onClicked: {
|
|
||||||
var signature = appWindow.currentWallet.signMessage(signMessageLine.text, false)
|
|
||||||
signSignatureLine.text = signature
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: signMessageFileLabel
|
|
||||||
text: qsTr("Or file:") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: signFileRow
|
|
||||||
anchors.topMargin: 17
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
FileDialog {
|
|
||||||
id: signFileDialog
|
|
||||||
title: qsTr("Please choose a file to sign") + translationManager.emptyString;
|
|
||||||
folder: "file://"
|
|
||||||
nameFilters: [ "*"]
|
|
||||||
|
|
||||||
onAccepted: {
|
|
||||||
signFileLine.text = walletManager.urlToLocalPath(signFileDialog.fileUrl)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StandardButton {
|
|
||||||
id: loadFileToSignButton
|
|
||||||
anchors.rightMargin: 17 * scaleRatio
|
|
||||||
text: qsTr("Select") + translationManager.emptyString
|
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: true
|
|
||||||
onClicked: {
|
|
||||||
signFileDialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
LineEdit {
|
|
||||||
id: signFileLine
|
|
||||||
anchors.left: loadFileToSignButton.right
|
|
||||||
anchors.right: signFileButton.left
|
|
||||||
placeholderText: qsTr("Filename with message to sign") + translationManager.emptyString;
|
|
||||||
readOnly: false
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onTextChanged: signSignatureLine.text = ""
|
|
||||||
|
|
||||||
IconButton {
|
LineEdit {
|
||||||
imageSource: "../images/copyToClipboard.png"
|
id: signMessageLine
|
||||||
onClicked: {
|
Layout.fillWidth: true
|
||||||
if (signFileLine.text.length > 0) {
|
placeholderText: qsTr("Message to sign") + translationManager.emptyString;
|
||||||
clipboard.setText(signFileLine.text)
|
labelText: qsTr("Message") + translationManager.emptyString;
|
||||||
}
|
readOnly: false
|
||||||
}
|
onTextChanged: signSignatureLine.text = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardButton {
|
RowLayout{
|
||||||
id: signFileButton
|
Layout.fillWidth: true
|
||||||
anchors.right: parent.right
|
Layout.topMargin: 18
|
||||||
text: qsTr("Sign") + translationManager.emptyString
|
|
||||||
shadowReleasedColor: "#FF4304"
|
StandardButton {
|
||||||
shadowPressedColor: "#B32D00"
|
id: signMessageButton
|
||||||
releasedColor: "#FF6C3C"
|
text: qsTr("Sign") + translationManager.emptyString
|
||||||
pressedColor: "#FF4304"
|
enabled: signMessageLine.text !== ''
|
||||||
enabled: true
|
small: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var signature = appWindow.currentWallet.signMessage(signFileLine.text, true)
|
var signature = appWindow.currentWallet.signMessage(signMessageLine.text, false)
|
||||||
signSignatureLine.text = signature
|
signSignatureLine.text = signature
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: signFileRow
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
LineEdit {
|
||||||
|
id: signFileLine
|
||||||
|
labelText: "Message from file"
|
||||||
|
placeholderText: qsTr("Path to file") + translationManager.emptyString;
|
||||||
|
readOnly: false
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onTextChanged: signSignatureLine.text = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 18
|
||||||
|
|
||||||
|
StandardButton {
|
||||||
|
id: loadFileToSignButton
|
||||||
|
small: true
|
||||||
|
text: qsTr("Browse") + translationManager.emptyString
|
||||||
|
enabled: true
|
||||||
|
onClicked: {
|
||||||
|
signFileDialog.open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StandardButton {
|
||||||
|
id: signFileButton
|
||||||
|
small: true
|
||||||
|
anchors.left: loadFileToSignButton.right
|
||||||
|
anchors.leftMargin: 20
|
||||||
|
text: qsTr("Sign") + translationManager.emptyString
|
||||||
|
enabled: signFileLine.text !== ''
|
||||||
|
onClicked: {
|
||||||
|
var signature = appWindow.currentWallet.signMessage(signFileLine.text, true);
|
||||||
|
signSignatureLine.text = signature;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: signSignatureRow
|
id: signSignatureRow
|
||||||
anchors.topMargin: 17 * scaleRatio
|
|
||||||
|
|
||||||
Label {
|
RowLayout {
|
||||||
id: signSignatureLabel
|
LineEdit {
|
||||||
text: qsTr("Signature") + translationManager.emptyString
|
id: signSignatureLine
|
||||||
}
|
labelText: qsTr("Signature")
|
||||||
|
placeholderText: qsTr("Signature") + translationManager.emptyString;
|
||||||
LineEdit {
|
readOnly: true
|
||||||
id: signSignatureLine
|
Layout.fillWidth: true
|
||||||
placeholderText: qsTr("Signature") + translationManager.emptyString;
|
copyButton: true
|
||||||
readOnly: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
IconButton {
|
|
||||||
imageSource: "../images/copyToClipboard.png"
|
|
||||||
onClicked: {
|
|
||||||
if (signSignatureLine.text.length > 0) {
|
|
||||||
clipboard.setText(signSignatureLine.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// verify
|
|
||||||
ColumnLayout {
|
|
||||||
id: verifyBox
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Text {
|
|
||||||
text: qsTr("Verify a message or file signature from an address:") + translationManager.emptyString
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
font.pixelSize: 14 * scaleRatio
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: verifyMessageLabel
|
|
||||||
text: qsTr("Either message:") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: verifyMessageRow
|
|
||||||
anchors.topMargin: 17 * scaleRatio
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
LineEdit {
|
|
||||||
id: verifyMessageLine
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: verifyMessageButton.left
|
|
||||||
placeholderText: qsTr("Message to verify") + translationManager.emptyString;
|
|
||||||
readOnly: false
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
IconButton {
|
|
||||||
imageSource: "../images/copyToClipboard.png"
|
|
||||||
onClicked: {
|
|
||||||
if (verifyMessageLine.text.length > 0) {
|
|
||||||
clipboard.setText(verifyMessageLine.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StandardButton {
|
|
||||||
id: verifyMessageButton
|
|
||||||
anchors.right: parent.right
|
|
||||||
text: qsTr("Verify") + translationManager.emptyString
|
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: true
|
|
||||||
onClicked: {
|
|
||||||
var verified = appWindow.currentWallet.verifySignedMessage(verifyMessageLine.text, verifyAddressLine.text, verifySignatureLine.text, false)
|
|
||||||
displayVerificationResult(verified)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: verifyMessageFileLabel
|
id: verifyTitleLabel
|
||||||
text: qsTr("Or file:") + translationManager.emptyString
|
fontSize: 24 * scaleRatio
|
||||||
|
Layout.topMargin: 40
|
||||||
|
text: qsTr("Verify") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
ColumnLayout {
|
||||||
id: verifyFileRow
|
RowLayout {
|
||||||
anchors.topMargin: 17 * scaleRatio
|
id: verifyMessageRow
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
FileDialog {
|
LineEdit {
|
||||||
id: verifyFileDialog
|
id: verifyMessageLine
|
||||||
title: qsTr("Please choose a file to verify") + translationManager.emptyString;
|
Layout.fillWidth: true
|
||||||
folder: "file://"
|
labelText: qsTr("Verify message")
|
||||||
nameFilters: [ "*"]
|
placeholderText: qsTr("Message to verify") + translationManager.emptyString;
|
||||||
|
readOnly: false
|
||||||
onAccepted: {
|
|
||||||
verifyFileLine.text = walletManager.urlToLocalPath(verifyFileDialog.fileUrl)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardButton {
|
RowLayout{
|
||||||
id: loadFileToVerifyButton
|
|
||||||
anchors.rightMargin: 17 * scaleRatio
|
|
||||||
text: qsTr("Select") + translationManager.emptyString
|
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: true
|
|
||||||
onClicked: {
|
|
||||||
verifyFileDialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
LineEdit {
|
|
||||||
id: verifyFileLine
|
|
||||||
anchors.left: loadFileToVerifyButton.right
|
|
||||||
anchors.right: verifyFileButton.left
|
|
||||||
placeholderText: qsTr("Filename with message to verify") + translationManager.emptyString;
|
|
||||||
readOnly: false
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 18
|
||||||
|
|
||||||
IconButton {
|
StandardButton {
|
||||||
imageSource: "../images/copyToClipboard.png"
|
id: verifyMessageButton
|
||||||
|
small: true
|
||||||
|
text: qsTr("Verify") + translationManager.emptyString
|
||||||
|
enabled: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (verifyFileLine.text.length > 0) {
|
var verified = appWindow.currentWallet.verifySignedMessage(verifyMessageLine.text, verifyAddressLine.text, verifySignatureLine.text, false)
|
||||||
clipboard.setText(verifyFileLine.text)
|
displayVerificationResult(verified)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StandardButton {
|
ColumnLayout {
|
||||||
id: verifyFileButton
|
RowLayout {
|
||||||
anchors.right: parent.right
|
LineEdit {
|
||||||
text: qsTr("Verify") + translationManager.emptyString
|
id: verifyFileLine
|
||||||
shadowReleasedColor: "#FF4304"
|
labelText: qsTr("Verify file")
|
||||||
shadowPressedColor: "#B32D00"
|
placeholderText: qsTr("Filename with message to verify") + translationManager.emptyString;
|
||||||
releasedColor: "#FF6C3C"
|
readOnly: false
|
||||||
pressedColor: "#FF4304"
|
Layout.fillWidth: true
|
||||||
enabled: true
|
}
|
||||||
onClicked: {
|
}
|
||||||
var verified = appWindow.currentWallet.verifySignedMessage(verifyFileLine.text, verifyAddressLine.text, verifySignatureLine.text, true)
|
|
||||||
displayVerificationResult(verified)
|
RowLayout{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 18
|
||||||
|
|
||||||
|
StandardButton {
|
||||||
|
id: loadFileToVerifyButton
|
||||||
|
small: true
|
||||||
|
text: qsTr("Browse") + translationManager.emptyString
|
||||||
|
enabled: true
|
||||||
|
onClicked: {
|
||||||
|
verifyFileDialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StandardButton {
|
||||||
|
id: verifyFileButton
|
||||||
|
small: true
|
||||||
|
anchors.left: loadFileToVerifyButton.right
|
||||||
|
anchors.leftMargin: 20
|
||||||
|
text: qsTr("Verify") + translationManager.emptyString
|
||||||
|
enabled: true
|
||||||
|
onClicked: {
|
||||||
|
var verified = appWindow.currentWallet.verifySignedMessage(verifyFileLine.text, verifyAddressLine.text, verifySignatureLine.text, true)
|
||||||
|
displayVerificationResult(verified)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
ColumnLayout {
|
||||||
id: verifyAddressLabel
|
RowLayout{
|
||||||
text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: " + (14 * scaleRatio) + "px;}</style>" +
|
|
||||||
qsTr("Signing address") +
|
|
||||||
"<font size='" + (2 * scaleRatio) + "'> ( " +
|
|
||||||
qsTr("Paste in or select from <a href='#'>Address book</a>") +
|
|
||||||
" )</font>" +
|
|
||||||
translationManager.emptyString
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
font.pixelSize: 14 * scaleRatio
|
|
||||||
Layout.fillWidth: true
|
|
||||||
textFormat: Text.RichText
|
|
||||||
onLinkActivated: appWindow.showPageRequest("AddressBook")
|
|
||||||
}
|
|
||||||
|
|
||||||
LineEdit {
|
LineEditMulti {
|
||||||
id: verifyAddressLine
|
id: verifyAddressLine
|
||||||
anchors.left: parent.left
|
Layout.fillWidth: true
|
||||||
anchors.right: parent.right
|
labelText: qsTr("Address")
|
||||||
anchors.top: verifyAddressLabel.bottom
|
addressValidation: true
|
||||||
anchors.topMargin: 5 * scaleRatio
|
anchors.topMargin: 5 * scaleRatio
|
||||||
placeholderText: "4..."
|
placeholderText: "4..."
|
||||||
// validator: RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
@ -419,18 +308,33 @@ Rectangle {
|
||||||
id: verifySignatureLine
|
id: verifySignatureLine
|
||||||
placeholderText: qsTr("Signature") + translationManager.emptyString;
|
placeholderText: qsTr("Signature") + translationManager.emptyString;
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
copyButton: true
|
||||||
IconButton {
|
|
||||||
imageSource: "../images/copyToClipboard.png"
|
|
||||||
onClicked: {
|
|
||||||
if (verifySignatureLine.text.length > 0) {
|
|
||||||
clipboard.setText(verifySignatureLine.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FileDialog {
|
||||||
|
id: signFileDialog
|
||||||
|
title: qsTr("Please choose a file to sign") + translationManager.emptyString;
|
||||||
|
folder: "file://"
|
||||||
|
nameFilters: [ "*"]
|
||||||
|
|
||||||
|
onAccepted: {
|
||||||
|
signFileLine.text = walletManager.urlToLocalPath(signFileDialog.fileUrl)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FileDialog {
|
||||||
|
id: verifyFileDialog
|
||||||
|
title: qsTr("Please choose a file to verify") + translationManager.emptyString;
|
||||||
|
folder: "file://"
|
||||||
|
nameFilters: [ "*"]
|
||||||
|
|
||||||
|
onAccepted: {
|
||||||
|
verifyFileLine.text = walletManager.urlToLocalPath(verifyFileDialog.fileUrl)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPageCompleted() {
|
function onPageCompleted() {
|
||||||
|
|
|
@ -29,9 +29,11 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
|
import moneroComponents.Clipboard 1.0
|
||||||
import moneroComponents.PendingTransaction 1.0
|
import moneroComponents.PendingTransaction 1.0
|
||||||
import "../components"
|
|
||||||
import moneroComponents.Wallet 1.0
|
import moneroComponents.Wallet 1.0
|
||||||
|
import "../components"
|
||||||
|
import "." 1.0
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -40,13 +42,12 @@ Rectangle {
|
||||||
int priority, string description)
|
int priority, string description)
|
||||||
signal sweepUnmixableClicked()
|
signal sweepUnmixableClicked()
|
||||||
|
|
||||||
color: "#F0EEEE"
|
color: "transparent"
|
||||||
property string startLinkText: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style><font size='2'> (</font><a href='#'>" +
|
property string startLinkText: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style><font size='2'> (</font><a href='#'>Start daemon</a><font size='2'>)</font>") + translationManager.emptyString
|
||||||
qsTr("Start daemon") +
|
|
||||||
"</a><font size='2'>)</font>" +
|
|
||||||
translationManager.emptyString
|
|
||||||
property bool showAdvanced: false
|
property bool showAdvanced: false
|
||||||
|
|
||||||
|
Clipboard { id: clipboard }
|
||||||
|
|
||||||
function scaleValueToMixinCount(scaleValue) {
|
function scaleValueToMixinCount(scaleValue) {
|
||||||
var scaleToMixinCount = [6,7,8,9,10,11,12,13,14,16,18,20,22,25];
|
var scaleToMixinCount = [6,7,8,9,10,11,12,13,14,16,18,20,22,25];
|
||||||
if (scaleValue < scaleToMixinCount.length) {
|
if (scaleValue < scaleToMixinCount.length) {
|
||||||
|
@ -112,43 +113,86 @@ Rectangle {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: pageRoot
|
id: pageRoot
|
||||||
anchors.top: parent.top
|
anchors.margins: (isMobile)? 17 : 20
|
||||||
|
anchors.topMargin: 40 * scaleRatio
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: 17 * scaleRatio
|
|
||||||
spacing: 0
|
spacing: 30 * scaleRatio
|
||||||
|
|
||||||
|
RowLayout{
|
||||||
|
visible: warningText.text !== ""
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: statusRect
|
||||||
|
Layout.preferredHeight: warningText.height + 40
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
radius: 2
|
||||||
|
border.color: Qt.rgba(255, 255, 255, 0.25)
|
||||||
|
border.width: 1
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
GridLayout{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: warningText.height + 40
|
||||||
|
|
||||||
|
Image {
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
Layout.preferredHeight: 33
|
||||||
|
Layout.preferredWidth: 33
|
||||||
|
Layout.leftMargin: 10
|
||||||
|
Layout.topMargin: 10
|
||||||
|
source: "../images/warning.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: warningText
|
||||||
|
Layout.topMargin: 12 * scaleRatio
|
||||||
|
Layout.preferredWidth: statusRect.width - 80
|
||||||
|
Layout.leftMargin: 6
|
||||||
|
text: qsTr("This page lets you sign/verify a message (or file contents) with your address.") + translationManager.emptyString
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 14 * scaleRatio
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
textFormat: Text.RichText
|
||||||
|
onLinkActivated: {
|
||||||
|
appWindow.startDaemon(appWindow.persistentSettings.daemonFlags);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: (isMobile)? 1 : 2
|
columns: (isMobile)? 1 : 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
columnSpacing: 32
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Label {
|
|
||||||
id: amountLabel
|
|
||||||
text: qsTr("Amount") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
|
||||||
id: amountRow
|
id: amountRow
|
||||||
Layout.minimumWidth: 200
|
|
||||||
Item {
|
|
||||||
visible: !isMobile
|
|
||||||
width: 37 * scaleRatio
|
|
||||||
height: 37 * scaleRatio
|
|
||||||
|
|
||||||
Image {
|
Layout.fillWidth: true
|
||||||
anchors.centerIn: parent
|
Layout.minimumWidth: 200
|
||||||
source: "../images/moneroIcon.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Amount input
|
// Amount input
|
||||||
LineEdit {
|
LineEdit {
|
||||||
Layout.fillWidth: true
|
|
||||||
id: amountLine
|
id: amountLine
|
||||||
|
Layout.fillWidth: true
|
||||||
|
inlineIcon: true
|
||||||
|
labelText: qsTr("Amount") + translationManager.emptyString
|
||||||
placeholderText: qsTr("") + translationManager.emptyString
|
placeholderText: qsTr("") + translationManager.emptyString
|
||||||
width:100
|
width: 100
|
||||||
|
fontBold: true
|
||||||
|
inlineButtonText: qsTr("All") + translationManager.emptyString
|
||||||
|
inlineButton.onClicked: amountLine.text = "(all)"
|
||||||
|
|
||||||
validator: DoubleValidator {
|
validator: DoubleValidator {
|
||||||
bottom: 0.0
|
bottom: 0.0
|
||||||
top: 18446744.073709551615
|
top: 18446744.073709551615
|
||||||
|
@ -157,28 +201,17 @@ Rectangle {
|
||||||
locale: "C"
|
locale: "C"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardButton {
|
|
||||||
id: amountAllButton
|
|
||||||
width: 60 * scaleRatio
|
|
||||||
text: qsTr("All") + translationManager.emptyString
|
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled : true
|
|
||||||
onClicked: amountLine.text = "(all)"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Label {
|
Label {
|
||||||
id: transactionPriority
|
id: transactionPriority
|
||||||
|
Layout.topMargin: 14
|
||||||
text: qsTr("Transaction priority") + translationManager.emptyString
|
text: qsTr("Transaction priority") + translationManager.emptyString
|
||||||
|
fontBold: false
|
||||||
|
fontSize: 16
|
||||||
}
|
}
|
||||||
// Note: workaround for translations in listElements
|
// Note: workaround for translations in listElements
|
||||||
// ListElement: cannot use script for property value, so
|
// ListElement: cannot use script for property value, so
|
||||||
|
@ -196,140 +229,116 @@ Rectangle {
|
||||||
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 (x41.5 fee)") ; column2: ""; priority: 4 }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardDropdown {
|
StandardDropdown {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
id: priorityDropdown
|
id: priorityDropdown
|
||||||
|
Layout.topMargin: 6
|
||||||
shadowReleasedColor: "#FF4304"
|
shadowReleasedColor: "#FF4304"
|
||||||
shadowPressedColor: "#B32D00"
|
shadowPressedColor: "#B32D00"
|
||||||
releasedColor: "#FF6C3C"
|
releasedColor: "#363636"
|
||||||
pressedColor: "#FF4304"
|
pressedColor: "#202020"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Make sure dropdown is on top
|
// Make sure dropdown is on top
|
||||||
z: parent.z + 1
|
z: parent.z + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
// recipient address input
|
||||||
|
RowLayout {
|
||||||
|
id: addressLineRow
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Label {
|
|
||||||
id: addressLabel
|
|
||||||
textFormat: Text.RichText
|
|
||||||
text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>" +
|
|
||||||
qsTr("Address") +
|
|
||||||
"<font size='2'> ( " +
|
|
||||||
qsTr("Paste in or select from <a href='#'>Address book</a>") +
|
|
||||||
" )</font>" +
|
|
||||||
translationManager.emptyString
|
|
||||||
onLinkActivated: appWindow.showPageRequest("AddressBook")
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
// recipient address input
|
|
||||||
RowLayout {
|
|
||||||
id: addressLineRow
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
StandardButton {
|
LineEditMulti {
|
||||||
id: qrfinderButton
|
id: addressLine
|
||||||
text: qsTr("QR Code") + translationManager.emptyString
|
spacing: 0
|
||||||
shadowReleasedColor: "#FF4304"
|
fontBold: true
|
||||||
shadowPressedColor: "#B32D00"
|
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
|
||||||
releasedColor: "#FF6C3C"
|
Address <font size='2'> ( </font> <a href='#'>Address book</a><font size='2'> )</font>")
|
||||||
pressedColor: "#FF4304"
|
+ translationManager.emptyString
|
||||||
visible : appWindow.qrScannerEnabled
|
labelButtonText: qsTr("Resolve") + translationManager.emptyString
|
||||||
enabled : visible
|
placeholderText: "4.."
|
||||||
width: visible ? 60 * scaleRatio : 0
|
onInputLabelLinkActivated: { appWindow.showPageRequest("AddressBook") }
|
||||||
onClicked: {
|
onLabelButtonClicked: {
|
||||||
cameraUi.state = "Capture"
|
var result = walletManager.resolveOpenAlias(addressLine.text)
|
||||||
cameraUi.qrcode_decoded.connect(updateFromQrCode)
|
if (result) {
|
||||||
}
|
var parts = result.split("|")
|
||||||
}
|
if (parts.length == 2) {
|
||||||
LineEdit {
|
var address_ok = walletManager.addressValid(parts[1], appWindow.persistentSettings.nettype)
|
||||||
id: addressLine
|
if (parts[0] === "true") {
|
||||||
Layout.fillWidth: true
|
if (address_ok) {
|
||||||
anchors.topMargin: 5 * scaleRatio
|
addressLine.text = parts[1]
|
||||||
placeholderText: "4..."
|
addressLine.cursorPosition = 0
|
||||||
// validator: RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }
|
}
|
||||||
}
|
else
|
||||||
|
oa_message(qsTr("No valid address found at this OpenAlias address"))
|
||||||
StandardButton {
|
} else if (parts[0] === "false") {
|
||||||
id: resolveButton
|
if (address_ok) {
|
||||||
width: 60 * scaleRatio
|
addressLine.text = parts[1]
|
||||||
text: qsTr("Resolve") + translationManager.emptyString
|
addressLine.cursorPosition = 0
|
||||||
shadowReleasedColor: "#FF4304"
|
oa_message(qsTr("Address found, but the DNSSEC signatures could not be verified, so this address may be spoofed"))
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled : isValidOpenAliasAddress(addressLine.text)
|
|
||||||
onClicked: {
|
|
||||||
var result = walletManager.resolveOpenAlias(addressLine.text)
|
|
||||||
if (result) {
|
|
||||||
var parts = result.split("|")
|
|
||||||
if (parts.length == 2) {
|
|
||||||
var address_ok = walletManager.addressValid(parts[1], appWindow.persistentSettings.nettype)
|
|
||||||
if (parts[0] === "true") {
|
|
||||||
if (address_ok) {
|
|
||||||
addressLine.text = parts[1]
|
|
||||||
addressLine.cursorPosition = 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
oa_message(qsTr("No valid address found at this OpenAlias address"))
|
|
||||||
} else if (parts[0] === "false") {
|
|
||||||
if (address_ok) {
|
|
||||||
addressLine.text = parts[1]
|
|
||||||
addressLine.cursorPosition = 0
|
|
||||||
oa_message(qsTr("Address found, but the DNSSEC signatures could not be verified, so this address may be spoofed"))
|
|
||||||
} else {
|
|
||||||
oa_message(qsTr("No valid address found at this OpenAlias address, but the DNSSEC signatures could not be verified, so this may be spoofed"))
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
oa_message(qsTr("Internal error"))
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
oa_message(qsTr("Internal error"))
|
oa_message(qsTr("No valid address found at this OpenAlias address, but the DNSSEC signatures could not be verified, so this may be spoofed"))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
oa_message(qsTr("No address found"))
|
oa_message(qsTr("Internal error"))
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
oa_message(qsTr("Internal error"))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
oa_message(qsTr("No address found"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
StandardButton {
|
||||||
id: paymentIdLabel
|
id: qrfinderButton
|
||||||
text: qsTr("Payment ID <font size='2'>( Optional )</font>") + translationManager.emptyString
|
text: qsTr("QR Code") + translationManager.emptyString
|
||||||
}
|
visible : appWindow.qrScannerEnabled
|
||||||
|
enabled : visible
|
||||||
// payment id input
|
width: visible ? 60 * scaleRatio : 0
|
||||||
LineEdit {
|
onClicked: {
|
||||||
id: paymentIdLine
|
cameraUi.state = "Capture"
|
||||||
placeholderText: qsTr("16 or 64 hexadecimal characters") + translationManager.emptyString
|
cameraUi.qrcode_decoded.connect(updateFromQrCode)
|
||||||
Layout.fillWidth: true
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Label {
|
|
||||||
text: qsTr("Description <font size='2'>( Optional )</font>")
|
RowLayout {
|
||||||
+ translationManager.emptyString
|
// payment id input
|
||||||
}
|
LineEdit {
|
||||||
|
id: paymentIdLine
|
||||||
LineEdit {
|
fontBold: true
|
||||||
id: descriptionLine
|
labelText: qsTr("Payment ID <font size='2'>( Optional )</font>") + translationManager.emptyString
|
||||||
placeholderText: qsTr("Saved to local wallet history") + translationManager.emptyString
|
placeholderText: qsTr("16 or 64 hexadecimal characters") + translationManager.emptyString
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
LineEdit {
|
||||||
|
id: descriptionLine
|
||||||
|
labelText: qsTr("Description <font size='2'>( Optional )</font>") + translationManager.emptyString
|
||||||
|
placeholderText: qsTr("Saved to local wallet history") + translationManager.emptyString
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: sendButton
|
id: sendButton
|
||||||
Layout.bottomMargin: 17 * scaleRatio
|
rightIcon: "../images/rightIcon.png"
|
||||||
Layout.topMargin: 17 * scaleRatio
|
Layout.topMargin: 4 * scaleRatio
|
||||||
text: qsTr("Send") + translationManager.emptyString
|
text: qsTr("Send") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
enabled : {
|
||||||
shadowPressedColor: "#B32D00"
|
// Send button is enabled when:
|
||||||
releasedColor: "#FF6C3C"
|
// 1) Currently opened wallet is not view-only
|
||||||
pressedColor: "#FF4304"
|
// 2) There is no warning box displayed
|
||||||
enabled : !appWindow.viewOnly && pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype)
|
// 3) The transactional information is correct
|
||||||
|
return !appWindow.viewOnly && warningText.text === '' && pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype);
|
||||||
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Transfer: paymentClicked")
|
console.log("Transfer: paymentClicked")
|
||||||
var priority = priorityModelV5.get(priorityDropdown.currentIndex).priority
|
var priority = priorityModelV5.get(priorityDropdown.currentIndex).priority
|
||||||
|
@ -365,7 +374,7 @@ Rectangle {
|
||||||
} // pageRoot
|
} // pageRoot
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id:desaturate
|
id: desaturate
|
||||||
color:"black"
|
color:"black"
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
opacity: 0.1
|
opacity: 0.1
|
||||||
|
@ -376,22 +385,19 @@ 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.leftMargin: 17 * scaleRatio
|
anchors.margins: (isMobile)? 17 : 20
|
||||||
anchors.topMargin: 17 * scaleRatio
|
anchors.topMargin: 32 * scaleRatio
|
||||||
anchors.bottomMargin: 17 * scaleRatio
|
spacing: 26 * scaleRatio
|
||||||
spacing: 10 * scaleRatio
|
|
||||||
enabled: !viewOnly || pageRoot.enabled
|
enabled: !viewOnly || pageRoot.enabled
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
CheckBox {
|
CheckBox2 {
|
||||||
id: showAdvancedCheckbox
|
id: showAdvancedCheckbox
|
||||||
checked: persistentSettings.transferShowAdvanced
|
checked: persistentSettings.transferShowAdvanced
|
||||||
onClicked: {
|
onClicked: {
|
||||||
persistentSettings.transferShowAdvanced = !persistentSettings.transferShowAdvanced
|
persistentSettings.transferShowAdvanced = !persistentSettings.transferShowAdvanced
|
||||||
}
|
}
|
||||||
text: qsTr("Show advanced options") + translationManager.emptyString
|
text: qsTr("Advanced options") + translationManager.emptyString
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,7 +405,8 @@ Rectangle {
|
||||||
visible: persistentSettings.transferShowAdvanced
|
visible: persistentSettings.transferShowAdvanced
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
height: 1
|
height: 1
|
||||||
color: "#DEDEDE"
|
color: Style.dividerColor
|
||||||
|
opacity: Style.dividerOpacity
|
||||||
Layout.bottomMargin: 30 * scaleRatio
|
Layout.bottomMargin: 30 * scaleRatio
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,7 +417,7 @@ Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Label {
|
Label {
|
||||||
id: privacyLabel
|
id: privacyLabel
|
||||||
fontSize: 14
|
fontSize: 15
|
||||||
text: ""
|
text: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -422,8 +429,6 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PrivacyLevel {
|
PrivacyLevel {
|
||||||
visible: persistentSettings.transferShowAdvanced && !isMobile
|
visible: persistentSettings.transferShowAdvanced && !isMobile
|
||||||
id: privacyLevelItem
|
id: privacyLevelItem
|
||||||
|
@ -442,7 +447,6 @@ Rectangle {
|
||||||
onFillLevelChanged: updateMixin()
|
onFillLevelChanged: updateMixin()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
visible: persistentSettings.transferShowAdvanced
|
visible: persistentSettings.transferShowAdvanced
|
||||||
Layout.topMargin: 50 * scaleRatio
|
Layout.topMargin: 50 * scaleRatio
|
||||||
|
@ -453,11 +457,8 @@ Rectangle {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: sweepUnmixableButton
|
id: sweepUnmixableButton
|
||||||
text: qsTr("Sweep Unmixable") + translationManager.emptyString
|
text: qsTr("Sweep Unmixable") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled : pageRoot.enabled
|
enabled : pageRoot.enabled
|
||||||
|
small: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Transfer: sweepUnmixableClicked")
|
console.log("Transfer: sweepUnmixableClicked")
|
||||||
root.sweepUnmixableClicked()
|
root.sweepUnmixableClicked()
|
||||||
|
@ -467,12 +468,9 @@ Rectangle {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: saveTxButton
|
id: saveTxButton
|
||||||
text: qsTr("Create tx file") + translationManager.emptyString
|
text: qsTr("Create tx file") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
visible: appWindow.viewOnly
|
visible: appWindow.viewOnly
|
||||||
enabled: pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype)
|
enabled: pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype)
|
||||||
|
small: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Transfer: saveTx Clicked")
|
console.log("Transfer: saveTx Clicked")
|
||||||
var priority = priorityModelV5.get(priorityDropdown.currentIndex).priority
|
var priority = priorityModelV5.get(priorityDropdown.currentIndex).priority
|
||||||
|
@ -489,10 +487,7 @@ Rectangle {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: signTxButton
|
id: signTxButton
|
||||||
text: qsTr("Sign tx file") + translationManager.emptyString
|
text: qsTr("Sign tx file") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
small: true
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
visible: !appWindow.viewOnly
|
visible: !appWindow.viewOnly
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Transfer: sign tx clicked")
|
console.log("Transfer: sign tx clicked")
|
||||||
|
@ -503,10 +498,7 @@ Rectangle {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: submitTxButton
|
id: submitTxButton
|
||||||
text: qsTr("Submit tx file") + translationManager.emptyString
|
text: qsTr("Submit tx file") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
small: true
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
visible: appWindow.viewOnly
|
visible: appWindow.viewOnly
|
||||||
enabled: pageRoot.enabled
|
enabled: pageRoot.enabled
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -515,12 +507,8 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//SignTxDialog
|
//SignTxDialog
|
||||||
FileDialog {
|
FileDialog {
|
||||||
id: signTxDialog
|
id: signTxDialog
|
||||||
|
@ -598,7 +586,7 @@ Rectangle {
|
||||||
informationPopup.open();
|
informationPopup.open();
|
||||||
} else {
|
} else {
|
||||||
informationPopup.title = qsTr("Information") + translationManager.emptyString
|
informationPopup.title = qsTr("Information") + translationManager.emptyString
|
||||||
informationPopup.text = qsTr("Money sent successfully") + translationManager.emptyString
|
informationPopup.text = qsTr("Monero sent successfully") + translationManager.emptyString
|
||||||
informationPopup.icon = StandardIcon.Information
|
informationPopup.icon = StandardIcon.Information
|
||||||
informationPopup.onCloseCallback = null
|
informationPopup.onCloseCallback = null
|
||||||
informationPopup.open();
|
informationPopup.open();
|
||||||
|
@ -610,23 +598,7 @@ Rectangle {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: root.width/2 - width/2
|
|
||||||
y: root.height/2 - height/2
|
|
||||||
height:statusText.paintedHeight + 50 * scaleRatio
|
|
||||||
width:statusText.paintedWidth + 40 * scaleRatio
|
|
||||||
visible: statusText.text != ""
|
|
||||||
opacity: 0.9
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: statusText
|
|
||||||
anchors.fill:parent
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
textFormat: Text.RichText
|
|
||||||
onLinkActivated: { appWindow.startDaemon(appWindow.persistentSettings.daemonFlags); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
//Disable password page until enabled by updateStatus
|
//Disable password page until enabled by updateStatus
|
||||||
|
@ -651,35 +623,35 @@ Rectangle {
|
||||||
//TODO: enable send page when we're connected and daemon is synced
|
//TODO: enable send page when we're connected and daemon is synced
|
||||||
|
|
||||||
function updateStatus() {
|
function updateStatus() {
|
||||||
|
pageRoot.enabled = true;
|
||||||
if(typeof currentWallet === "undefined") {
|
if(typeof currentWallet === "undefined") {
|
||||||
statusText.text = qsTr("Wallet is not connected to daemon.") + "<br>" + root.startLinkText
|
warningText.text = qsTr("Wallet is not connected to daemon.") + root.startLinkText
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentWallet.viewOnly) {
|
if (currentWallet.viewOnly) {
|
||||||
// statusText.text = qsTr("Wallet is view only.")
|
// warningText.text = qsTr("Wallet is view only.")
|
||||||
//return;
|
//return;
|
||||||
}
|
}
|
||||||
pageRoot.enabled = false;
|
//pageRoot.enabled = false;
|
||||||
|
|
||||||
switch (currentWallet.connected()) {
|
switch (currentWallet.connected()) {
|
||||||
case Wallet.ConnectionStatus_Disconnected:
|
case Wallet.ConnectionStatus_Disconnected:
|
||||||
statusText.text = qsTr("Wallet is not connected to daemon.") + "<br>" + root.startLinkText
|
warningText.text = qsTr("Wallet is not connected to daemon.") + root.startLinkText
|
||||||
break
|
break
|
||||||
case Wallet.ConnectionStatus_WrongVersion:
|
case Wallet.ConnectionStatus_WrongVersion:
|
||||||
statusText.text = qsTr("Connected daemon is not compatible with GUI. \n" +
|
warningText.text = qsTr("Connected daemon is not compatible with GUI. \n" +
|
||||||
"Please upgrade or connect to another daemon")
|
"Please upgrade or connect to another daemon")
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
if(!appWindow.daemonSynced){
|
if(!appWindow.daemonSynced){
|
||||||
statusText.text = qsTr("Waiting on daemon synchronization to finish")
|
warningText.text = qsTr("Waiting on daemon synchronization to finish")
|
||||||
} else {
|
} else {
|
||||||
// everything OK, enable transfer page
|
// everything OK, enable transfer page
|
||||||
// Light wallet is always ready
|
// Light wallet is always ready
|
||||||
pageRoot.enabled = true;
|
pageRoot.enabled = true;
|
||||||
statusText.text = "";
|
warningText.text = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
448
pages/TxKey.qml
|
@ -34,321 +34,204 @@ import QtQuick.Layouts 1.1
|
||||||
import "../components"
|
import "../components"
|
||||||
import moneroComponents.Clipboard 1.0
|
import moneroComponents.Clipboard 1.0
|
||||||
|
|
||||||
|
import "../js/TxUtils.js" as TxUtils
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
||||||
color: "#F0EEEE"
|
color: "transparent"
|
||||||
|
|
||||||
Clipboard { id: clipboard }
|
Clipboard { id: clipboard }
|
||||||
|
|
||||||
function checkAddress(address, nettype) {
|
|
||||||
return walletManager.addressValid(address, nettype)
|
|
||||||
}
|
|
||||||
|
|
||||||
function check256(str, length) {
|
|
||||||
if (str.length != length)
|
|
||||||
return false;
|
|
||||||
for (var i = 0; i < length; ++i) {
|
|
||||||
if (str[i] >= '0' && str[i] <= '9')
|
|
||||||
continue;
|
|
||||||
if (str[i] >= 'a' && str[i] <= 'z')
|
|
||||||
continue;
|
|
||||||
if (str[i] >= 'A' && str[i] <= 'Z')
|
|
||||||
continue;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkTxID(txid) {
|
|
||||||
return check256(txid, 64)
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkSignature(signature) {
|
|
||||||
if (signature.indexOf("OutProofV") === 0) {
|
|
||||||
if ((signature.length - 10) % 132 != 0)
|
|
||||||
return false;
|
|
||||||
return check256(signature, signature.length);
|
|
||||||
} else if (signature.indexOf("InProofV") === 0) {
|
|
||||||
if ((signature.length - 9) % 132 != 0)
|
|
||||||
return false;
|
|
||||||
return check256(signature, signature.length);
|
|
||||||
} else if (signature.indexOf("SpendProofV") === 0) {
|
|
||||||
if ((signature.length - 12) % 88 != 0)
|
|
||||||
return false;
|
|
||||||
return check256(signature, signature.length);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* main layout */
|
/* main layout */
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
anchors.margins: 40
|
anchors.margins: 40 * scaleRatio
|
||||||
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.bottom: parent.bottom
|
||||||
|
spacing: 20 * scaleRatio
|
||||||
|
|
||||||
spacing: 20
|
// solo
|
||||||
property int labelWidth: 120
|
ColumnLayout {
|
||||||
property int editWidth: 400
|
id: soloBox
|
||||||
property int lineEditFontSize: 12
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: qsTr("Generate a proof of your incoming/outgoing payment by supplying the transaction ID, the recipient address and an optional message. \n" +
|
|
||||||
"For the case of outgoing payments, you can get a 'Spend Proof' that proves the authorship of a transaction. In this case, you don't need to specify the recipient address.") + translationManager.emptyString
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
Layout.fillWidth: true;
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Label {
|
|
||||||
fontSize: 14
|
|
||||||
text: qsTr("Transaction ID") + translationManager.emptyString
|
|
||||||
width: mainLayout.labelWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
LineEdit {
|
|
||||||
id: getProofTxIdLine
|
|
||||||
fontSize: mainLayout.lineEditFontSize
|
|
||||||
placeholderText: qsTr("Paste tx ID") + translationManager.emptyString
|
|
||||||
readOnly: false
|
|
||||||
width: mainLayout.editWidth
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
IconButton {
|
|
||||||
imageSource: "../images/copyToClipboard.png"
|
|
||||||
onClicked: {
|
|
||||||
if (getProofTxIdLine.text.length > 0) {
|
|
||||||
clipboard.setText(getProofTxIdLine.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Label {
|
|
||||||
fontSize: 14
|
|
||||||
text: qsTr("Address") + translationManager.emptyString
|
|
||||||
width: mainLayout.labelWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
LineEdit {
|
|
||||||
id: getProofAddressLine
|
|
||||||
fontSize: mainLayout.lineEditFontSize
|
|
||||||
placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString;
|
|
||||||
readOnly: false
|
|
||||||
width: mainLayout.editWidth
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
IconButton {
|
|
||||||
imageSource: "../images/copyToClipboard.png"
|
|
||||||
onClicked: {
|
|
||||||
if (getProofAddressLine.text.length > 0) {
|
|
||||||
clipboard.setText(getProofAddressLine.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Label {
|
|
||||||
fontSize: 14
|
|
||||||
text: qsTr("Message") + translationManager.emptyString
|
|
||||||
width: mainLayout.labelWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
LineEdit {
|
|
||||||
id: getProofMessageLine
|
|
||||||
fontSize: mainLayout.lineEditFontSize
|
|
||||||
placeholderText: qsTr("Optional message against which the signature is signed") + translationManager.emptyString;
|
|
||||||
readOnly: false
|
|
||||||
width: mainLayout.editWidth
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
IconButton {
|
|
||||||
imageSource: "../images/copyToClipboard.png"
|
|
||||||
onClicked: {
|
|
||||||
if (getProofMessageLine.text.length > 0) {
|
|
||||||
clipboard.setText(getProofMessageLine.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StandardButton {
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.topMargin: 17
|
anchors.right: parent.right
|
||||||
width: 60
|
anchors.top: parent.top
|
||||||
text: qsTr("Generate") + translationManager.emptyString
|
spacing: 20 * scaleRatio
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: checkTxID(getProofTxIdLine.text) && (getProofAddressLine.text.length == 0 || checkAddress(getProofAddressLine.text, appWindow.persistentSettings.nettype))
|
|
||||||
onClicked: {
|
|
||||||
console.log("getProof: Generate clicked: txid " + getProofTxIdLine.text + ", address " + getProofAddressLine.text + ", message: " + getProofMessageLine.text);
|
|
||||||
root.getProofClicked(getProofTxIdLine.text, getProofAddressLine.text, getProofMessageLine.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// underline
|
|
||||||
Rectangle {
|
|
||||||
height: 1
|
|
||||||
color: "#DBDBDB"
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
anchors.bottomMargin: 3
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: qsTr("Verify that funds were paid to an address by supplying the transaction ID, the recipient address, the message used for signing and the signature.\n" +
|
|
||||||
"For the case with Spend Proof, you don't need to specify the recipient address.") + translationManager.emptyString
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
Layout.fillWidth: true;
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Label {
|
Label {
|
||||||
fontSize: 14
|
id: soloTitleLabel
|
||||||
text: qsTr("Transaction ID") + translationManager.emptyString
|
fontSize: 24 * scaleRatio
|
||||||
width: mainLayout.labelWidth
|
text: qsTr("Prove Transaction") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
LineEdit {
|
Text {
|
||||||
id: checkProofTxIdLine
|
text: qsTr("Generate a proof of your incoming/outgoing payment by supplying the transaction ID, the recipient address and an optional message. \n" +
|
||||||
fontSize: mainLayout.lineEditFontSize
|
"For the case of outgoing payments, you can get a 'Spend Proof' that proves the authorship of a transaction. In this case, you don't need to specify the recipient address.") + translationManager.emptyString
|
||||||
placeholderText: qsTr("Paste tx ID") + translationManager.emptyString
|
wrapMode: Text.Wrap
|
||||||
readOnly: false
|
|
||||||
width: mainLayout.editWidth
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
IconButton {
|
font.pixelSize: 14 * scaleRatio
|
||||||
imageSource: "../images/copyToClipboard.png"
|
color: Style.defaultFontColor
|
||||||
onClicked: {
|
|
||||||
if (checkProofTxIdLine.text.length > 0) {
|
|
||||||
clipboard.setText(checkProofTxIdLine.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Label {
|
|
||||||
fontSize: 14
|
|
||||||
text: qsTr("Address") + translationManager.emptyString
|
|
||||||
width: mainLayout.labelWidth
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LineEdit {
|
RowLayout {
|
||||||
id: checkProofAddressLine
|
LineEdit {
|
||||||
fontSize: mainLayout.lineEditFontSize
|
labelText: qsTr("Transaction ID") + translationManager.emptyString
|
||||||
placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString;
|
id: getProofTxIdLine
|
||||||
readOnly: false
|
fontSize: 16 * scaleRatio
|
||||||
width: mainLayout.editWidth
|
placeholderText: qsTr("Paste tx ID") + translationManager.emptyString
|
||||||
Layout.fillWidth: true
|
readOnly: false
|
||||||
|
Layout.fillWidth: true
|
||||||
IconButton {
|
copyButton: true
|
||||||
imageSource: "../images/copyToClipboard.png"
|
|
||||||
onClicked: {
|
|
||||||
if (checkProofAddressLine.text.length > 0) {
|
|
||||||
clipboard.setText(checkProofAddressLine.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Label {
|
LineEdit {
|
||||||
fontSize: 14
|
id: getProofAddressLine
|
||||||
text: qsTr("Message") + translationManager.emptyString
|
labelText: qsTr("Address") + translationManager.emptyString
|
||||||
width: mainLayout.labelWidth
|
fontSize: 16 * scaleRatio
|
||||||
}
|
placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString;
|
||||||
|
readOnly: false
|
||||||
LineEdit {
|
Layout.fillWidth: true
|
||||||
id: checkProofMessageLine
|
copyButton: true
|
||||||
fontSize: mainLayout.lineEditFontSize
|
|
||||||
placeholderText: qsTr("Optional message against which the signature is signed") + translationManager.emptyString;
|
|
||||||
readOnly: false
|
|
||||||
width: mainLayout.editWidth
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
IconButton {
|
|
||||||
imageSource: "../images/copyToClipboard.png"
|
|
||||||
onClicked: {
|
|
||||||
if (checkProofMessageLine.text.length > 0) {
|
|
||||||
clipboard.setText(checkProofMessageLine.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Label {
|
LineEdit {
|
||||||
fontSize: 14
|
id: getProofMessageLine
|
||||||
text: qsTr("Signature") + translationManager.emptyString
|
fontSize: 16 * scaleRatio
|
||||||
width: mainLayout.labelWidth
|
labelText: qsTr("Message") + translationManager.emptyString
|
||||||
}
|
placeholderText: qsTr("Optional message against which the signature is signed") + translationManager.emptyString;
|
||||||
|
readOnly: false
|
||||||
|
width: mainLayout.editWidth
|
||||||
LineEdit {
|
Layout.fillWidth: true
|
||||||
id: checkProofSignatureLine
|
copyButton: true
|
||||||
fontSize: mainLayout.lineEditFontSize
|
|
||||||
placeholderText: qsTr("Paste tx proof") + translationManager.emptyString;
|
|
||||||
readOnly: false
|
|
||||||
|
|
||||||
width: mainLayout.editWidth
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
IconButton {
|
|
||||||
imageSource: "../images/copyToClipboard.png"
|
|
||||||
onClicked: {
|
|
||||||
if (checkProofSignatureLine.text.length > 0) {
|
|
||||||
clipboard.setText(checkProofSignatureLine.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.topMargin: 17
|
anchors.topMargin: 17 * scaleRatio
|
||||||
width: 60
|
width: 60 * scaleRatio
|
||||||
text: qsTr("Check") + translationManager.emptyString
|
text: qsTr("Generate") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
enabled: TxUtils.checkTxID(getProofTxIdLine.text) && (getProofAddressLine.text.length == 0 || TxUtils.checkAddress(getProofAddressLine.text, appWindow.persistentSettings.nettype))
|
||||||
shadowPressedColor: "#B32D00"
|
onClicked: {
|
||||||
releasedColor: "#FF6C3C"
|
console.log("getProof: Generate clicked: txid " + getProofTxIdLine.text + ", address " + getProofAddressLine.text + ", message: " + getProofMessageLine.text);
|
||||||
pressedColor: "#FF4304"
|
root.getProofClicked(getProofTxIdLine.text, getProofAddressLine.text, getProofMessageLine.text)
|
||||||
enabled: checkTxID(checkProofTxIdLine.text) && checkSignature(checkProofSignatureLine.text) && ((checkProofSignatureLine.text.indexOf("SpendProofV") === 0 && checkProofAddressLine.text.length == 0) || (checkProofSignatureLine.text.indexOf("SpendProofV") !== 0 && checkAddress(checkProofAddressLine.text, appWindow.persistentSettings.nettype)))
|
}
|
||||||
onClicked: {
|
|
||||||
console.log("checkProof: Check clicked: txid " + checkProofTxIdLine.text + ", address " + checkProofAddressLine.text + ", message " + checkProofMessageLine.text + ", signature " + checkProofSignatureLine.text);
|
|
||||||
root.checkProofClicked(checkProofTxIdLine.text, checkProofAddressLine.text, checkProofMessageLine.text, checkProofSignatureLine.text)
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// underline
|
// underline
|
||||||
Rectangle {
|
Rectangle {
|
||||||
height: 1
|
height: 1
|
||||||
color: "#DBDBDB"
|
color: "#404040"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
anchors.bottomMargin: 3
|
anchors.bottomMargin: 3 * scaleRatio
|
||||||
|
}
|
||||||
|
|
||||||
}
|
Label {
|
||||||
|
id: soloTitleLabel2
|
||||||
|
fontSize: 24 * scaleRatio
|
||||||
|
text: qsTr("Check Transaction") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("If a payment had several transactions then each must be checked and the results combined.") + translationManager.emptyString
|
text: qsTr("Verify that funds were paid to an address by supplying the transaction ID, the recipient address, the message used for signing and the signature.\n" +
|
||||||
wrapMode: Text.Wrap
|
"For the case with Spend Proof, you don't need to specify the recipient address.") + translationManager.emptyString
|
||||||
Layout.fillWidth: true;
|
wrapMode: Text.Wrap
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 14 * scaleRatio
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
LineEdit {
|
||||||
|
id: checkProofTxIdLine
|
||||||
|
labelText: qsTr("Transaction ID") + translationManager.emptyString
|
||||||
|
fontSize: 16 * scaleRatio
|
||||||
|
placeholderText: qsTr("Paste tx ID") + translationManager.emptyString
|
||||||
|
readOnly: false
|
||||||
|
width: mainLayout.editWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
|
copyButton: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
LineEdit {
|
||||||
|
id: checkProofAddressLine
|
||||||
|
labelText: qsTr("Address") + translationManager.emptyString
|
||||||
|
fontSize: 16 * scaleRatio
|
||||||
|
placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString;
|
||||||
|
readOnly: false
|
||||||
|
width: mainLayout.editWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
|
copyButton: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
LineEdit {
|
||||||
|
id: checkProofMessageLine
|
||||||
|
fontSize: 16 * scaleRatio
|
||||||
|
labelText: qsTr("Message") + translationManager.emptyString
|
||||||
|
placeholderText: qsTr("Optional message against which the signature is signed") + translationManager.emptyString;
|
||||||
|
readOnly: false
|
||||||
|
width: mainLayout.editWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
|
copyButton: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
LineEdit {
|
||||||
|
id: checkProofSignatureLine
|
||||||
|
fontSize: 16 * scaleRatio
|
||||||
|
labelText: qsTr("Signature") + translationManager.emptyString
|
||||||
|
placeholderText: qsTr("Paste tx proof") + translationManager.emptyString;
|
||||||
|
readOnly: false
|
||||||
|
width: mainLayout.editWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
|
copyButton: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StandardButton {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.topMargin: 17 * scaleRatio
|
||||||
|
width: 60
|
||||||
|
text: qsTr("Check") + translationManager.emptyString
|
||||||
|
enabled: TxUtils.checkTxID(checkProofTxIdLine.text) && TxUtils.checkSignature(checkProofSignatureLine.text) && ((checkProofSignatureLine.text.indexOf("SpendProofV") === 0 && checkProofAddressLine.text.length == 0) || (checkProofSignatureLine.text.indexOf("SpendProofV") !== 0 && TxUtils.checkAddress(checkProofAddressLine.text, appWindow.persistentSettings.nettype)))
|
||||||
|
onClicked: {
|
||||||
|
console.log("checkProof: Check clicked: txid " + checkProofTxIdLine.text + ", address " + checkProofAddressLine.text + ", message " + checkProofMessageLine.text + ", signature " + checkProofSignatureLine.text);
|
||||||
|
root.checkProofClicked(checkProofTxIdLine.text, checkProofAddressLine.text, checkProofMessageLine.text, checkProofSignatureLine.text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// underline
|
||||||
|
Rectangle {
|
||||||
|
height: 1
|
||||||
|
color: "#404040"
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
anchors.bottomMargin: 3 * scaleRatio
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
text: qsTr("If a payment had several transactions then each must be checked and the results combined.") + translationManager.emptyString
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.family: Style.fontRegular.name
|
||||||
|
font.pixelSize: 14 * scaleRatio
|
||||||
|
color: Style.defaultFontColor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,5 +239,4 @@ Rectangle {
|
||||||
console.log("TxKey page loaded");
|
console.log("TxKey page loaded");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
42
qml.qrc
|
@ -163,5 +163,47 @@
|
||||||
<file>pages/Keys.qml</file>
|
<file>pages/Keys.qml</file>
|
||||||
<file>images/menu.png</file>
|
<file>images/menu.png</file>
|
||||||
<file>images/appicon.ico</file>
|
<file>images/appicon.ico</file>
|
||||||
|
<file>images/right.png</file>
|
||||||
|
<file>images/card-background.png</file>
|
||||||
|
<file>images/minimize.png</file>
|
||||||
|
<file>images/fullscreen.png</file>
|
||||||
|
<file>images/close.png</file>
|
||||||
|
<file>images/moneroLogo_white.png</file>
|
||||||
|
<file>images/moneroIcon-trans28x28.png</file>
|
||||||
|
<file>images/moneroIcon-trans84x84.png</file>
|
||||||
|
<file>images/moneroIcon-trans56x56.png</file>
|
||||||
|
<file>images/question.png</file>
|
||||||
|
<file>images/expand.png</file>
|
||||||
|
<file>images/titlebarGradient.jpg</file>
|
||||||
|
<file>images/titlebarLogo.png</file>
|
||||||
|
<file>images/menuArrow.png</file>
|
||||||
|
<file>images/menuButtonGradient.png</file>
|
||||||
|
<file>fonts/SFUIDisplay-Medium.otf</file>
|
||||||
|
<file>fonts/SFUIDisplay-Regular.otf</file>
|
||||||
|
<file>fonts/SFUIDisplay-Light.otf</file>
|
||||||
|
<file>fonts/SFUIDisplay-Bold.otf</file>
|
||||||
|
<file>components/Style.qml</file>
|
||||||
|
<file>components/qmldir</file>
|
||||||
|
<file>components/InlineButton.qml</file>
|
||||||
|
<file>images/lightning.png</file>
|
||||||
|
<file>images/leftPanelBg.jpg</file>
|
||||||
|
<file>images/moneroIcon-28x28.png</file>
|
||||||
|
<file>images/lightning-white.png</file>
|
||||||
|
<file>images/middlePanelBg.jpg</file>
|
||||||
|
<file>components/InputMulti.qml</file>
|
||||||
|
<file>images/checkedIcon-black.png</file>
|
||||||
|
<file>components/LineEditMulti.qml</file>
|
||||||
|
<file>components/LabelButton.qml</file>
|
||||||
|
<file>components/LabelSubheader.qml</file>
|
||||||
|
<file>images/arrow-right-medium-white.png</file>
|
||||||
|
<file>images/rightArrow.png</file>
|
||||||
|
<file>images/upArrow-green.png</file>
|
||||||
|
<file>images/downArrow.png</file>
|
||||||
|
<file>images/historyBorderRadius.png</file>
|
||||||
|
<file>components/HistoryTableInnerColumn.qml</file>
|
||||||
|
<file>components/CheckBox2.qml</file>
|
||||||
|
<file>js/TxUtils.js</file>
|
||||||
|
<file>images/warning.png</file>
|
||||||
|
<file>images/checkedBlackIcon.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -100,8 +100,6 @@ Item {
|
||||||
background: "#F0EEEE"
|
background: "#F0EEEE"
|
||||||
fontColor: "#4A4646"
|
fontColor: "#4A4646"
|
||||||
fontSize: 18
|
fontSize: 18
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
checked: true
|
checked: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,8 +127,6 @@ Item {
|
||||||
background: "#F0EEEE"
|
background: "#F0EEEE"
|
||||||
fontColor: "#4A4646"
|
fontColor: "#4A4646"
|
||||||
fontSize: 18
|
fontSize: 18
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
checked: true
|
checked: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,8 +156,6 @@ Item {
|
||||||
background: "#F0EEEE"
|
background: "#F0EEEE"
|
||||||
fontColor: "#4A4646"
|
fontColor: "#4A4646"
|
||||||
fontSize: 18
|
fontSize: 18
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
checked: true
|
checked: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,11 +124,10 @@ ColumnLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: localNode
|
id: localNode
|
||||||
text: qsTr("Start a node automatically in background (recommended)") + translationManager.emptyString
|
text: qsTr("Start a node automatically in background (recommended)") + translationManager.emptyString
|
||||||
|
checkedIcon: "../images/checkedBlackIcon.png"
|
||||||
background: "#FFFFFF"
|
background: "#FFFFFF"
|
||||||
fontColor: "#4A4646"
|
fontColor: "#4A4646"
|
||||||
fontSize: 16 * scaleRatio
|
fontSize: 16 * scaleRatio
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
checked: !appWindow.persistentSettings.useRemoteNode && !isAndroid && !isIOS
|
checked: !appWindow.persistentSettings.useRemoteNode && !isAndroid && !isIOS
|
||||||
visible: !isAndroid && !isIOS
|
visible: !isAndroid && !isIOS
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -145,6 +144,7 @@ ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 20 * scaleRatio
|
Layout.topMargin: 20 * scaleRatio
|
||||||
fontSize: 14 * scaleRatio
|
fontSize: 14 * scaleRatio
|
||||||
|
fontColor: "black"
|
||||||
text: qsTr("Blockchain location") + translationManager.emptyString
|
text: qsTr("Blockchain location") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
LineEdit {
|
LineEdit {
|
||||||
|
@ -152,8 +152,17 @@ ColumnLayout {
|
||||||
Layout.preferredWidth: 200 * scaleRatio
|
Layout.preferredWidth: 200 * scaleRatio
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: persistentSettings.blockchainDataDir
|
text: persistentSettings.blockchainDataDir
|
||||||
|
placeholderFontBold: true
|
||||||
|
placeholderFontFamily: "Arial"
|
||||||
|
placeholderColor: Style.legacy_placeholderFontColor
|
||||||
|
placeholderOpacity: 1.0
|
||||||
placeholderText: qsTr("(optional)") + translationManager.emptyString
|
placeholderText: qsTr("(optional)") + translationManager.emptyString
|
||||||
|
|
||||||
|
borderColor: Qt.rgba(0, 0, 0, 0.15)
|
||||||
|
backgroundColor: "white"
|
||||||
|
fontColor: "black"
|
||||||
|
fontBold: false
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -170,14 +179,28 @@ ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 20 * scaleRatio
|
Layout.topMargin: 20 * scaleRatio
|
||||||
fontSize: 14 * scaleRatio
|
fontSize: 14 * scaleRatio
|
||||||
|
color: 'black'
|
||||||
text: qsTr("Bootstrap node (leave blank if not wanted)") + translationManager.emptyString
|
text: qsTr("Bootstrap node (leave blank if not wanted)") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
RemoteNodeEdit {
|
RemoteNodeEdit {
|
||||||
Layout.minimumWidth: 300 * scaleRatio
|
Layout.minimumWidth: 300 * scaleRatio
|
||||||
opacity: localNode.checked
|
opacity: localNode.checked
|
||||||
id: bootstrapNodeEdit
|
id: bootstrapNodeEdit
|
||||||
|
|
||||||
|
placeholderFontBold: true
|
||||||
|
placeholderFontFamily: "Arial"
|
||||||
|
placeholderColor: Style.legacy_placeholderFontColor
|
||||||
|
placeholderOpacity: 1.0
|
||||||
|
|
||||||
daemonAddrText: persistentSettings.bootstrapNodeAddress.split(":")[0].trim()
|
daemonAddrText: persistentSettings.bootstrapNodeAddress.split(":")[0].trim()
|
||||||
daemonPortText: (persistentSettings.bootstrapNodeAddress.split(":")[1].trim() == "") ? "18081" : persistentSettings.bootstrapNodeAddress.split(":")[1]
|
daemonPortText: {
|
||||||
|
var node_split = persistentSettings.bootstrapNodeAddress.split(":");
|
||||||
|
if(node_split.length == 2){
|
||||||
|
(node_split[1].trim() == "") ? "18081" : node_split[1];
|
||||||
|
} else {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,19 +208,17 @@ ColumnLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: remoteNode
|
id: remoteNode
|
||||||
text: qsTr("Connect to a remote node") + translationManager.emptyString
|
text: qsTr("Connect to a remote node") + translationManager.emptyString
|
||||||
|
checkedIcon: "../images/checkedBlackIcon.png"
|
||||||
Layout.topMargin: 20 * scaleRatio
|
Layout.topMargin: 20 * scaleRatio
|
||||||
background: "#FFFFFF"
|
background: "#FFFFFF"
|
||||||
fontColor: "#4A4646"
|
fontColor: "#4A4646"
|
||||||
fontSize: 16 * scaleRatio
|
fontSize: 16 * scaleRatio
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
checked: appWindow.persistentSettings.useRemoteNode
|
checked: appWindow.persistentSettings.useRemoteNode
|
||||||
onClicked: {
|
onClicked: {
|
||||||
checked = true
|
checked = true
|
||||||
localNode.checked = false
|
localNode.checked = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -208,6 +229,16 @@ ColumnLayout {
|
||||||
property var rna: persistentSettings.remoteNodeAddress
|
property var rna: persistentSettings.remoteNodeAddress
|
||||||
daemonAddrText: rna.search(":") != -1 ? rna.split(":")[0].trim() : ""
|
daemonAddrText: rna.search(":") != -1 ? rna.split(":")[0].trim() : ""
|
||||||
daemonPortText: rna.search(":") != -1 ? (rna.split(":")[1].trim() == "") ? "18081" : persistentSettings.remoteNodeAddress.split(":")[1] : ""
|
daemonPortText: rna.search(":") != -1 ? (rna.split(":")[1].trim() == "") ? "18081" : persistentSettings.remoteNodeAddress.split(":")[1] : ""
|
||||||
|
|
||||||
|
placeholderFontBold: true
|
||||||
|
placeholderFontFamily: "Arial"
|
||||||
|
placeholderColor: Style.legacy_placeholderFontColor
|
||||||
|
placeholderOpacity: 1.0
|
||||||
|
|
||||||
|
lineEditBorderColor: Qt.rgba(0, 0, 0, 0.15)
|
||||||
|
lineEditBackgroundColor: "white"
|
||||||
|
lineEditFontColor: "black"
|
||||||
|
lineEditFontBold: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,8 +114,6 @@ Item {
|
||||||
background: "#F0EEEE"
|
background: "#F0EEEE"
|
||||||
fontColor: "#4A4646"
|
fontColor: "#4A4646"
|
||||||
fontSize: 18
|
fontSize: 18
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
checked: true
|
checked: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,8 +177,6 @@ Item {
|
||||||
background: "#F0EEEE"
|
background: "#F0EEEE"
|
||||||
fontColor: "#4A4646"
|
fontColor: "#4A4646"
|
||||||
fontSize: 18
|
fontSize: 18
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
checked: true
|
checked: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,13 +52,15 @@ ColumnLayout {
|
||||||
backgroundMiningEnabled = wizard.settings["allow_background_mining"] === true,
|
backgroundMiningEnabled = wizard.settings["allow_background_mining"] === true,
|
||||||
backgroundMiningText = backgroundMiningEnabled ? qsTr("Enabled") : qsTr("Disabled"),
|
backgroundMiningText = backgroundMiningEnabled ? qsTr("Enabled") : qsTr("Disabled"),
|
||||||
nettype = appWindow.persistentSettings.nettype,
|
nettype = appWindow.persistentSettings.nettype,
|
||||||
networkText = nettype === NetworkType.TESTNET ? qsTr("Testnet") : nettype === NetworkType.STAGENET ? qsTr("Stagenet") : qsTr("Mainnet"),
|
networkText = nettype == NetworkType.TESTNET ? qsTr("Testnet") : nettype == NetworkType.STAGENET ? qsTr("Stagenet") : qsTr("Mainnet"),
|
||||||
restoreHeightEnabled = wizard.settings['restore_height'] !== undefined;
|
restoreHeightEnabled = wizard.settings['restore_height'] !== undefined;
|
||||||
|
|
||||||
return "<table>"
|
return "<table>"
|
||||||
+ trStart + qsTr("Language") + trMiddle + wizard.settings["language"] + trEnd
|
+ trStart + qsTr("Language") + trMiddle + wizard.settings["language"] + trEnd
|
||||||
+ trStart + qsTr("Wallet name") + trMiddle + wizard.settings["account_name"] + trEnd
|
+ trStart + qsTr("Wallet name") + trMiddle + wizard.settings["account_name"] + trEnd
|
||||||
+ trStart + qsTr("Backup seed") + trMiddle + wizard.settings["wallet"].seed + trEnd
|
// TODO: wizard.settings['wallet'].seed doesnt work anymore; yields undefined.
|
||||||
|
// + trStart + qsTr("Backup seed") + trMiddle + wizard.settings["wallet"].seed + trEnd
|
||||||
|
+ trStart + qsTr("Backup seed") + trMiddle + '****' + trEnd
|
||||||
+ trStart + qsTr("Wallet path") + trMiddle + wizard.settings["wallet_path"] + trEnd
|
+ trStart + qsTr("Wallet path") + trMiddle + wizard.settings["wallet_path"] + trEnd
|
||||||
// + trStart + qsTr("Auto donations") + trMiddle + autoDonationText + trEnd
|
// + trStart + qsTr("Auto donations") + trMiddle + autoDonationText + trEnd
|
||||||
// + (autoDonationEnabled
|
// + (autoDonationEnabled
|
||||||
|
|
|
@ -365,10 +365,6 @@ ColumnLayout {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.margins: (isMobile) ? 20 * scaleRatio : 50 * scaleRatio
|
anchors.margins: (isMobile) ? 20 * scaleRatio : 50 * scaleRatio
|
||||||
text: qsTr("USE MONERO") + translationManager.emptyString
|
text: qsTr("USE MONERO") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
visible: parent.paths[currentPath][currentPage] === finishPage
|
visible: parent.paths[currentPath][currentPage] === finishPage
|
||||||
onClicked: {
|
onClicked: {
|
||||||
wizard.applySettings();
|
wizard.applySettings();
|
||||||
|
@ -382,10 +378,6 @@ ColumnLayout {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.margins: (isMobile) ? 20 * scaleRatio : 50
|
anchors.margins: (isMobile) ? 20 * scaleRatio : 50
|
||||||
text: qsTr("Create wallet") + translationManager.emptyString
|
text: qsTr("Create wallet") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
visible: currentPath === "create_view_only_wallet" && parent.paths[currentPath][currentPage] === passwordPage
|
visible: currentPath === "create_view_only_wallet" && parent.paths[currentPath][currentPage] === passwordPage
|
||||||
enabled: passwordPage.passwordsMatch
|
enabled: passwordPage.passwordsMatch
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -414,10 +406,6 @@ ColumnLayout {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.margins: (isMobile) ? 20 * scaleRatio : 50
|
anchors.margins: (isMobile) ? 20 * scaleRatio : 50
|
||||||
text: qsTr("Abort") + translationManager.emptyString
|
text: qsTr("Abort") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
visible: currentPath === "create_view_only_wallet" && parent.paths[currentPath][currentPage] === passwordPage
|
visible: currentPath === "create_view_only_wallet" && parent.paths[currentPath][currentPage] === passwordPage
|
||||||
onClicked: {
|
onClicked: {
|
||||||
wizard.restart();
|
wizard.restart();
|
||||||
|
|
|
@ -154,6 +154,8 @@ ColumnLayout {
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.topMargin: 20 * scaleRatio
|
Layout.topMargin: 20 * scaleRatio
|
||||||
|
fontFamily: "Arial"
|
||||||
|
fontColor: "#555555"
|
||||||
fontSize: 14 * scaleRatio
|
fontSize: 14 * scaleRatio
|
||||||
text: qsTr("Wallet name")
|
text: qsTr("Wallet name")
|
||||||
+ translationManager.emptyString
|
+ translationManager.emptyString
|
||||||
|
@ -166,6 +168,10 @@ ColumnLayout {
|
||||||
Layout.minimumWidth: 200 * scaleRatio
|
Layout.minimumWidth: 200 * scaleRatio
|
||||||
text: defaultAccountName
|
text: defaultAccountName
|
||||||
onTextUpdated: checkNextButton()
|
onTextUpdated: checkNextButton()
|
||||||
|
borderColor: Qt.rgba(0, 0, 0, 0.15)
|
||||||
|
backgroundColor: "white"
|
||||||
|
fontColor: "black"
|
||||||
|
fontBold: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,10 +182,6 @@ ColumnLayout {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: recoverFromSeedButton
|
id: recoverFromSeedButton
|
||||||
text: qsTr("Restore from seed") + translationManager.emptyString
|
text: qsTr("Restore from seed") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: recoverFromKeys.visible
|
enabled: recoverFromKeys.visible
|
||||||
onClicked: {
|
onClicked: {
|
||||||
recoverFromSeedMode = true;
|
recoverFromSeedMode = true;
|
||||||
|
@ -190,10 +192,6 @@ ColumnLayout {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: recoverFromKeysButton
|
id: recoverFromKeysButton
|
||||||
text: qsTr("Restore from keys") + translationManager.emptyString
|
text: qsTr("Restore from keys") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled: recoverFromSeed.visible
|
enabled: recoverFromSeed.visible
|
||||||
onClicked: {
|
onClicked: {
|
||||||
recoverFromSeedMode = false;
|
recoverFromSeedMode = false;
|
||||||
|
@ -204,10 +202,6 @@ ColumnLayout {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: qrfinderButton
|
id: qrfinderButton
|
||||||
text: qsTr("From QR Code") + translationManager.emptyString
|
text: qsTr("From QR Code") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
visible : true //appWindow.qrScannerEnabled
|
visible : true //appWindow.qrScannerEnabled
|
||||||
enabled : visible
|
enabled : visible
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -242,16 +236,32 @@ ColumnLayout {
|
||||||
id: addressLine
|
id: addressLine
|
||||||
Layout.maximumWidth: 600 * scaleRatio
|
Layout.maximumWidth: 600 * scaleRatio
|
||||||
Layout.minimumWidth: 200 * scaleRatio
|
Layout.minimumWidth: 200 * scaleRatio
|
||||||
|
placeholderFontBold: true
|
||||||
|
placeholderFontFamily: "Arial"
|
||||||
|
placeholderColor: Style.legacy_placeholderFontColor
|
||||||
placeholderText: qsTr("Account address (public)") + translationManager.emptyString
|
placeholderText: qsTr("Account address (public)") + translationManager.emptyString
|
||||||
|
placeholderOpacity: 1.0
|
||||||
onTextUpdated: checkNextButton()
|
onTextUpdated: checkNextButton()
|
||||||
|
borderColor: Qt.rgba(0, 0, 0, 0.15)
|
||||||
|
backgroundColor: "white"
|
||||||
|
fontColor: "black"
|
||||||
|
fontBold: false
|
||||||
}
|
}
|
||||||
LineEdit {
|
LineEdit {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
id: viewKeyLine
|
id: viewKeyLine
|
||||||
Layout.maximumWidth: 600 * scaleRatio
|
Layout.maximumWidth: 600 * scaleRatio
|
||||||
Layout.minimumWidth: 200 * scaleRatio
|
Layout.minimumWidth: 200 * scaleRatio
|
||||||
|
placeholderFontBold: true
|
||||||
|
placeholderFontFamily: "Arial"
|
||||||
|
placeholderColor: Style.legacy_placeholderFontColor
|
||||||
placeholderText: qsTr("View key (private)") + translationManager.emptyString
|
placeholderText: qsTr("View key (private)") + translationManager.emptyString
|
||||||
|
placeholderOpacity: 1.0
|
||||||
onTextUpdated: checkNextButton()
|
onTextUpdated: checkNextButton()
|
||||||
|
borderColor: Qt.rgba(0, 0, 0, 0.15)
|
||||||
|
backgroundColor: "white"
|
||||||
|
fontColor: "black"
|
||||||
|
fontBold: false
|
||||||
|
|
||||||
}
|
}
|
||||||
LineEdit {
|
LineEdit {
|
||||||
|
@ -259,8 +269,16 @@ ColumnLayout {
|
||||||
Layout.maximumWidth: 600 * scaleRatio
|
Layout.maximumWidth: 600 * scaleRatio
|
||||||
Layout.minimumWidth: 200 * scaleRatio
|
Layout.minimumWidth: 200 * scaleRatio
|
||||||
id: spendKeyLine
|
id: spendKeyLine
|
||||||
|
placeholderFontBold: true
|
||||||
|
placeholderFontFamily: "Arial"
|
||||||
|
placeholderColor: Style.legacy_placeholderFontColor
|
||||||
placeholderText: qsTr("Spend key (private)") + translationManager.emptyString
|
placeholderText: qsTr("Spend key (private)") + translationManager.emptyString
|
||||||
|
placeholderOpacity: 1.0
|
||||||
onTextUpdated: checkNextButton()
|
onTextUpdated: checkNextButton()
|
||||||
|
borderColor: Qt.rgba(0, 0, 0, 0.15)
|
||||||
|
backgroundColor: "white"
|
||||||
|
fontColor: "black"
|
||||||
|
fontBold: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,10 +289,18 @@ ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumWidth: 600 * scaleRatio
|
Layout.maximumWidth: 600 * scaleRatio
|
||||||
Layout.minimumWidth: 200 * scaleRatio
|
Layout.minimumWidth: 200 * scaleRatio
|
||||||
|
placeholderFontBold: true
|
||||||
|
placeholderFontFamily: "Arial"
|
||||||
|
placeholderColor: Style.legacy_placeholderFontColor
|
||||||
placeholderText: qsTr("Restore height (optional)") + translationManager.emptyString
|
placeholderText: qsTr("Restore height (optional)") + translationManager.emptyString
|
||||||
|
placeholderOpacity: 1.0
|
||||||
validator: IntValidator {
|
validator: IntValidator {
|
||||||
bottom:0
|
bottom:0
|
||||||
}
|
}
|
||||||
|
borderColor: Qt.rgba(0, 0, 0, 0.15)
|
||||||
|
backgroundColor: "white"
|
||||||
|
fontColor: "black"
|
||||||
|
fontBold: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -284,6 +310,8 @@ ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 20 * scaleRatio
|
Layout.topMargin: 20 * scaleRatio
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
|
fontFamily: "Arial"
|
||||||
|
fontColor: "#555555"
|
||||||
text: qsTr("Your wallet is stored in") + ": " + fileUrlInput.text;
|
text: qsTr("Your wallet is stored in") + ": " + fileUrlInput.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,6 +332,10 @@ ColumnLayout {
|
||||||
fileUrlInput.focus = true
|
fileUrlInput.focus = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
borderColor: Qt.rgba(0, 0, 0, 0.15)
|
||||||
|
backgroundColor: "white"
|
||||||
|
fontColor: "black"
|
||||||
|
fontBold: false
|
||||||
}
|
}
|
||||||
|
|
||||||
FileDialog {
|
FileDialog {
|
||||||
|
|
|
@ -41,6 +41,7 @@ Column {
|
||||||
font.pixelSize: 16 * scaleRatio
|
font.pixelSize: 16 * scaleRatio
|
||||||
anchors.margins: 8 * scaleRatio
|
anchors.margins: 8 * scaleRatio
|
||||||
font.bold:true
|
font.bold:true
|
||||||
|
font.family: "Arial"
|
||||||
text: qsTr("Enter your 25 (or 24) word mnemonic seed") + translationManager.emptyString
|
text: qsTr("Enter your 25 (or 24) word mnemonic seed") + translationManager.emptyString
|
||||||
color: "#BABABA"
|
color: "#BABABA"
|
||||||
visible: !memoTextInput.text/* && !parent.focus*/
|
visible: !memoTextInput.text/* && !parent.focus*/
|
||||||
|
|
|
@ -248,13 +248,13 @@ ColumnLayout {
|
||||||
background: "#FFFFFF"
|
background: "#FFFFFF"
|
||||||
fontColor: "#4A4646"
|
fontColor: "#4A4646"
|
||||||
fontSize: 16 * scaleRatio
|
fontSize: 16 * scaleRatio
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
checkedIcon: "../images/checkedBlackIcon.png"
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||||
checked: appWindow.persistentSettings.nettype === NetworkType.TESTNET;
|
checked: appWindow.persistentSettings.nettype == NetworkType.TESTNET;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
persistentSettings.nettype = testNet.checked ? NetworkType.TESTNET : NetworkType.MAINNET
|
persistentSettings.nettype = testNet.checked ? NetworkType.TESTNET : NetworkType.MAINNET
|
||||||
stageNet.checked = false;
|
stageNet.checked = false;
|
||||||
console.log("Network type set to ", persistentSettings.nettype === NetworkType.TESTNET ? "Testnet" : "Mainnet")
|
console.log("Network type set to ", persistentSettings.nettype == NetworkType.TESTNET ? "Testnet" : "Mainnet")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -267,13 +267,13 @@ ColumnLayout {
|
||||||
background: "#FFFFFF"
|
background: "#FFFFFF"
|
||||||
fontColor: "#4A4646"
|
fontColor: "#4A4646"
|
||||||
fontSize: 16 * scaleRatio
|
fontSize: 16 * scaleRatio
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
checkedIcon: "../images/checkedBlackIcon.png"
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||||
checked: appWindow.persistentSettings.nettype === NetworkType.STAGENET;
|
checked: appWindow.persistentSettings.nettype == NetworkType.STAGENET;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
persistentSettings.nettype = stageNet.checked ? NetworkType.STAGENET : NetworkType.MAINNET
|
persistentSettings.nettype = stageNet.checked ? NetworkType.STAGENET : NetworkType.MAINNET
|
||||||
testNet.checked = false;
|
testNet.checked = false;
|
||||||
console.log("Network type set to ", persistentSettings.nettype === NetworkType.STAGENET ? "Stagenet" : "Mainnet")
|
console.log("Network type set to ", persistentSettings.nettype == NetworkType.STAGENET ? "Stagenet" : "Mainnet")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|