diff --git a/interface/resources/qml/hifi/commerce/wallet/Security.qml b/interface/resources/qml/hifi/commerce/wallet/Security.qml index 5d3dddb417..7fc3d9324f 100644 --- a/interface/resources/qml/hifi/commerce/wallet/Security.qml +++ b/interface/resources/qml/hifi/commerce/wallet/Security.qml @@ -43,6 +43,10 @@ Item { } } + SecurityImageModel { + id: securityImageModel; + } + // Username Text RalewayRegular { id: usernameText; @@ -67,6 +71,13 @@ Item { anchors.right: parent.right; width: 75; height: childrenRect.height; + + onVisibleChanged: { + if (visible) { + commerce.getSecurityImage(); + } + } + Image { id: topSecurityImage; // Anchors @@ -76,12 +87,6 @@ Item { width: height; fillMode: Image.PreserveAspectFit; mipmap: true; - - onVisibleChanged: { - if (visible) { - commerce.getSecurityImage(); - } - } } // "Security picture" text below pic RalewayRegular { @@ -221,7 +226,7 @@ Item { RalewayRegular { id: explanitoryText; text: "Your money and purchases are secured with private keys that only you " + - "have access to. If they are lost, you will not be able to access your money or purchases." + + "have access to. If they are lost, you will not be able to access your money or purchases. " + "To safeguard your private keys, back up this file regularly:"; // Text size size: 18; @@ -243,7 +248,7 @@ Item { anchors.top: explanitoryText.bottom; anchors.topMargin: 10; anchors.left: parent.left; - anchors.right: parent.right; + anchors.right: clipboardButton.left; height: 40; readOnly: true; @@ -253,6 +258,29 @@ Item { } } } + HifiControlsUit.Button { + id: clipboardButton; + color: hifi.buttons.black; + colorScheme: hifi.colorSchemes.dark; + anchors.right: parent.right; + anchors.top: keyFilePath.top; + anchors.bottom: keyFilePath.bottom; + width: height; + HiFiGlyphs { + text: hifi.glyphs.question; + // Size + size: parent.height*1.3; + // Anchors + anchors.fill: parent; + // Style + horizontalAlignment: Text.AlignHCenter; + color: enabled ? hifi.colors.white : hifi.colors.faintGray; + } + + onClicked: { + Window.copyToClipboard(keyFilePath.text); + } + } } // diff --git a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml index fd9eb6dbe6..de207446a5 100644 --- a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml +++ b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml @@ -25,7 +25,7 @@ Rectangle { id: root; - property string activeView: ""; + property string activeView: "walletHome"; // Style color: hifi.colors.baseGray; @@ -43,8 +43,6 @@ Rectangle { onKeyFilePathResult: { if (path === "") { root.activeView = "notSetUp"; - } else { - root.activeView = "walletHome"; } } } diff --git a/interface/resources/qml/hifi/commerce/wallet/WalletHome.qml b/interface/resources/qml/hifi/commerce/wallet/WalletHome.qml index bf344e6430..febf823564 100644 --- a/interface/resources/qml/hifi/commerce/wallet/WalletHome.qml +++ b/interface/resources/qml/hifi/commerce/wallet/WalletHome.qml @@ -38,6 +38,10 @@ Item { balanceText.text = parseFloat(result.data.balance/100).toFixed(2); } } + + SecurityImageModel { + id: securityImageModel; + } Connections { target: GlobalServices @@ -106,7 +110,7 @@ Item { // Balance Text FiraSansRegular { id: balanceText; - text: --; + text: "--"; // Text size size: 28; // Anchors @@ -149,6 +153,13 @@ Item { anchors.right: parent.right; width: 75; height: childrenRect.height; + + onVisibleChanged: { + if (visible) { + commerce.getSecurityImage(); + } + } + Image { id: securityImage; // Anchors diff --git a/interface/resources/qml/hifi/commerce/wallet/WalletSetupLightbox.qml b/interface/resources/qml/hifi/commerce/wallet/WalletSetupLightbox.qml index 9b3bf535a3..c021501e43 100644 --- a/interface/resources/qml/hifi/commerce/wallet/WalletSetupLightbox.qml +++ b/interface/resources/qml/hifi/commerce/wallet/WalletSetupLightbox.qml @@ -458,7 +458,6 @@ Rectangle { choosePassphraseContainer.visible = false; privateKeysReadyContainer.visible = true; commerce.balance(); // Do this here so that keys are generated. Order might change as backend changes? - commerce.getKeyFilePath(); } } } @@ -549,15 +548,44 @@ Rectangle { horizontalAlignment: Text.AlignHLeft; verticalAlignment: Text.AlignVCenter; } - + HifiControlsUit.TextField { id: keyFilePath; anchors.top: explanationText.bottom; anchors.topMargin: 10; anchors.left: parent.left; - anchors.right: parent.right; + anchors.right: clipboardButton.left; height: 40; readOnly: true; + + onVisibleChanged: { + if (visible) { + commerce.getKeyFilePath(); + } + } + } + HifiControlsUit.Button { + id: clipboardButton; + color: hifi.buttons.black; + colorScheme: hifi.colorSchemes.dark; + anchors.right: parent.right; + anchors.top: keyFilePath.top; + anchors.bottom: keyFilePath.bottom; + width: height; + HiFiGlyphs { + text: hifi.glyphs.question; + // Size + size: parent.height*1.3; + // Anchors + anchors.fill: parent; + // Style + horizontalAlignment: Text.AlignHCenter; + color: enabled ? hifi.colors.white : hifi.colors.faintGray; + } + + onClicked: { + Window.copyToClipboard(keyFilePath.text); + } } // Navigation Bar