diff options
| author | stoffu <stoffu@protonmail.ch> | 2018-06-19 12:58:30 +0900 |
|---|---|---|
| committer | stoffu <stoffu@protonmail.ch> | 2018-06-19 12:58:30 +0900 |
| commit | abccad8771aad4beea3c16d10870dae349940ada (patch) | |
| tree | 61e3ed7fc421bfbc11296c63a563c41ebdbfe15c | |
| parent | cd46edb23f0764b7bb7ee1171224881554be5d2f (diff) | |
| download | monzero-gui-abccad8771aad4beea3c16d10870dae349940ada.tar.gz monzero-gui-abccad8771aad4beea3c16d10870dae349940ada.tar.xz monzero-gui-abccad8771aad4beea3c16d10870dae349940ada.zip | |
Keys: allow keys to be copied separately
| -rw-r--r-- | pages/Keys.qml | 61 |
1 files changed, 37 insertions, 24 deletions
diff --git a/pages/Keys.qml b/pages/Keys.qml index 1b3aaeac..58606196 100644 --- a/pages/Keys.qml +++ b/pages/Keys.qml @@ -148,27 +148,40 @@ Rectangle { opacity: Style.dividerOpacity Layout.bottomMargin: 10 * scaleRatio } - TextEdit { - id: keysText - wrapMode: TextEdit.Wrap - Layout.fillWidth: true; - font.pixelSize: 14 * scaleRatio - textFormat: TextEdit.RichText + LineEdit { + Layout.fillWidth: true + id: secretViewKey readOnly: true - color: Style.defaultFontColor - MouseArea { - 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("Keys copied to clipboard"),3) - } - } + copyButton: true + labelText: qsTr("Secret view key") + translationManager.emptyString + fontSize: 16 * scaleRatio + } + LineEdit { + Layout.fillWidth: true + Layout.topMargin: 25 * scaleRatio + id: publicViewKey + readOnly: true + copyButton: true + labelText: qsTr("Public view key") + translationManager.emptyString + fontSize: 16 * scaleRatio + } + LineEdit { + Layout.fillWidth: true + Layout.topMargin: 25 * scaleRatio + id: secretSpendKey + readOnly: true + copyButton: true + labelText: qsTr("Secret spend key") + translationManager.emptyString + fontSize: 16 * scaleRatio + } + LineEdit { + Layout.fillWidth: true + Layout.topMargin: 25 * scaleRatio + id: publicSpendKey + readOnly: true + copyButton: true + labelText: qsTr("Public spend key") + translationManager.emptyString + fontSize: 16 * scaleRatio } } @@ -244,10 +257,10 @@ Rectangle { function onPageCompleted() { console.log("keys page loaded"); - keysText.text = "<b>" + qsTr("Secret view key") + ":</b> " + currentWallet.secretViewKey - keysText.text += "<br><br><b>" + qsTr("Public view key") + ":</b> " + currentWallet.publicViewKey - keysText.text += (!currentWallet.viewOnly) ? "<br><br><b>" + qsTr("Secret spend key") + ":</b> " + currentWallet.secretSpendKey : "" - keysText.text += "<br><br><b>" + qsTr("Public spend key") + ":</b> " + currentWallet.publicSpendKey + secretViewKey.text = currentWallet.secretViewKey + publicViewKey.text = currentWallet.publicViewKey + secretSpendKey.text = (!currentWallet.viewOnly) ? currentWallet.secretSpendKey : "" + publicSpendKey.text = currentWallet.publicSpendKey seedText.text = currentWallet.seed |
