diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2018-08-02 13:58:49 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2018-08-02 13:58:49 -0500 |
| commit | 06bbda0c994139c0474da9b804ccc218dd3e921a (patch) | |
| tree | a250b7cbf00124a3018b803ff9041c0de34c565c | |
| parent | a9bea84086d88e640337470de270f12f539d42a0 (diff) | |
| parent | abccad8771aad4beea3c16d10870dae349940ada (diff) | |
| download | monzero-gui-06bbda0c994139c0474da9b804ccc218dd3e921a.tar.gz monzero-gui-06bbda0c994139c0474da9b804ccc218dd3e921a.tar.xz monzero-gui-06bbda0c994139c0474da9b804ccc218dd3e921a.zip | |
Merge pull request #1467
abccad8 Keys: allow keys to be copied separately (stoffu)
| -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 1148a148..8bba91f9 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 } } @@ -246,10 +259,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 |
