aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-06-21 14:27:26 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-06-21 14:27:26 -0500
commitedb849fa819ea3a338860f45b8f88e496fc5e37c (patch)
tree65fed2a13c9bcd5873f9b67b364b54179e43c34c
parentd1e8b6f823d85a5d258a5c882aae31afd5d7f530 (diff)
parenta3c620f78d0ac14703fcb223d7676a48b7c30025 (diff)
downloadmonzero-gui-edb849fa819ea3a338860f45b8f88e496fc5e37c.tar.gz
monzero-gui-edb849fa819ea3a338860f45b8f88e496fc5e37c.tar.xz
monzero-gui-edb849fa819ea3a338860f45b8f88e496fc5e37c.zip
Merge pull request #2170
a3c620f restore height visibility enhancements (mmbyday)
-rw-r--r--js/Utils.js4
-rw-r--r--pages/Keys.qml30
-rw-r--r--pages/settings/SettingsInfo.qml2
-rw-r--r--wizard/WizardCreateWallet1.qml58
4 files changed, 92 insertions, 2 deletions
diff --git a/js/Utils.js b/js/Utils.js
index 1dc359d9..b709b2ce 100644
--- a/js/Utils.js
+++ b/js/Utils.js
@@ -108,6 +108,10 @@ function epoch(){
return Math.floor((new Date).getTime()/1000);
}
+function roundDownToNearestThousand(_num){
+ return Math.floor(_num/1000.0)*1000
+}
+
function isAlpha(letter){ return letter.match(/^[A-Za-z0-9]+$/) !== null; }
function isLowerCaseChar(letter){ return letter === letter.toLowerCase(); }
diff --git a/pages/Keys.qml b/pages/Keys.qml
index c74a14a9..63911835 100644
--- a/pages/Keys.qml
+++ b/pages/Keys.qml
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2018, The Monero Project
+// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
@@ -103,6 +103,34 @@ Rectangle {
Layout.fillWidth: true
fontSize: 22
Layout.topMargin: 10
+ text: qsTr("Wallet restore height") + translationManager.emptyString
+ }
+
+ Rectangle {
+ Layout.fillWidth: true
+ height: 2
+ color: MoneroComponents.Style.dividerColor
+ opacity: MoneroComponents.Style.dividerOpacity
+ Layout.bottomMargin: 10
+ }
+
+ MoneroComponents.LineEdit {
+ Layout.fillWidth: true
+ readOnly: true
+ copyButton: true
+ labelText: qsTr("Block #") + translationManager.emptyString
+ fontSize: 16
+ text: currentWallet.walletCreationHeight
+ }
+ }
+
+ ColumnLayout {
+ Layout.fillWidth: true
+
+ MoneroComponents.Label {
+ Layout.fillWidth: true
+ fontSize: 22
+ Layout.topMargin: 10
text: qsTr("Keys") + translationManager.emptyString
}
Rectangle {
diff --git a/pages/settings/SettingsInfo.qml b/pages/settings/SettingsInfo.qml
index de6a28d2..b329c068 100644
--- a/pages/settings/SettingsInfo.qml
+++ b/pages/settings/SettingsInfo.qml
@@ -165,7 +165,7 @@ Rectangle {
id: restoreHeight
font.pixelSize: 14
textFormat: Text.RichText
- text: (typeof currentWallet == "undefined") ? "" : qsTr("Wallet creation height: ") + translationManager.emptyString
+ text: (typeof currentWallet == "undefined") ? "" : qsTr("Wallet restore height: ") + translationManager.emptyString
}
MoneroComponents.TextBlock {
diff --git a/wizard/WizardCreateWallet1.qml b/wizard/WizardCreateWallet1.qml
index 031bbc5f..577243c3 100644
--- a/wizard/WizardCreateWallet1.qml
+++ b/wizard/WizardCreateWallet1.qml
@@ -32,6 +32,7 @@ import QtQuick.Layouts 1.2
import QtQuick.Controls 2.0
import "../js/Wizard.js" as Wizard
+import "../js/Utils.js" as Utils
import "../components" as MoneroComponents
Rectangle {
@@ -128,6 +129,63 @@ Rectangle {
}
}
+ ColumnLayout {
+ spacing: 0
+
+ Layout.topMargin: 10
+ Layout.fillWidth: true
+
+ MoneroComponents.LineEditMulti {
+ id: restoreHeight
+
+ spacing: 0
+ inputPaddingLeft: 16
+ inputPaddingRight: 16
+ inputPaddingTop: 20
+ inputPaddingBottom: 20
+ inputRadius: 0
+ fontSize: 18
+ fontBold: true
+ wrapMode: Text.WordWrap
+ labelText: qsTr("Wallet restore height") + translationManager.emptyString
+ labelFontSize: 14
+ copyButton: false
+ readOnly: true
+ text: Utils.roundDownToNearestThousand(wizardController.m_wallet.walletCreationHeight)
+ }
+
+ MoneroComponents.WarningBox {
+ Rectangle {
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ width: 1
+ color: MoneroComponents.Style.inputBorderColorInActive
+ }
+
+ Rectangle {
+ anchors.right: parent.right
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+ height: 1
+ color: MoneroComponents.Style.inputBorderColorInActive
+ }
+
+ Rectangle {
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ width: 1
+ color: MoneroComponents.Style.inputBorderColorInActive
+ }
+
+ radius: 0
+ border.color: MoneroComponents.Style.inputBorderColorInActive
+ border.width: 0
+ text: qsTr("Should you restore your wallet in the future, specifying this block number will recover your wallet quicker.") + translationManager.emptyString
+ }
+ }
+
WizardNav {
progressSteps: 4
progress: 1