aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2018-08-05 20:35:46 +0200
committerSander Ferdinand <sa.ferdinand@gmail.com>2018-08-05 23:32:26 +0200
commitd5e27ff07d462a907a3d39b47201e83965e3c2b3 (patch)
tree82bd294ab4f41d4fcd5c18f0cc2c6cefdbd71757
parent8eee948f07259f9354559c8bac320ec5a4775270 (diff)
downloadmonzero-gui-d5e27ff07d462a907a3d39b47201e83965e3c2b3.tar.gz
monzero-gui-d5e27ff07d462a907a3d39b47201e83965e3c2b3.tar.xz
monzero-gui-d5e27ff07d462a907a3d39b47201e83965e3c2b3.zip
Copy to clipboard functionality for the Info page
-rw-r--r--pages/settings/SettingsInfo.qml56
1 files changed, 54 insertions, 2 deletions
diff --git a/pages/settings/SettingsInfo.qml b/pages/settings/SettingsInfo.qml
index 8c05ffcb..4ae65854 100644
--- a/pages/settings/SettingsInfo.qml
+++ b/pages/settings/SettingsInfo.qml
@@ -21,7 +21,7 @@ Rectangle {
anchors.right: parent.right
anchors.margins: (isMobile)? 17 : 20
anchors.topMargin: 0
- spacing: 0
+ spacing: 30
GridLayout {
columns: 2
@@ -92,7 +92,7 @@ Rectangle {
MoneroComponents.TextBlock {
Layout.fillWidth: true
- Layout.maximumWidth: 320
+ Layout.maximumWidth: 360
font.pixelSize: 14
text: {
var wallet_path = walletPath();
@@ -214,6 +214,58 @@ Rectangle {
text: walletLogPath
}
}
+
+ // Copy info to clipboard
+ Rectangle {
+ color: "transparent"
+ Layout.preferredHeight: 24 * scaleRatio
+ Layout.fillWidth: true
+
+ Rectangle {
+ id: rectCopy
+ color: MoneroComponents.Style.buttonBackgroundColorDisabled
+ width: btnCopy.width + 40
+ height: 24
+ radius: 2
+
+ Text {
+ id: btnCopy
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ color: MoneroComponents.Style.defaultFontColor
+ font.family: MoneroComponents.Style.fontRegular.name
+ font.pixelSize: 14 * scaleRatio
+ font.bold: true
+ text: qsTr("Copy to clipboard") + translationManager.emptyString
+ }
+
+ MouseArea {
+ cursorShape: Qt.PointingHandCursor
+ anchors.fill: parent
+ onClicked: {
+ var data = "";
+ data += "GUI version: " + Version.GUI_VERSION + " (Qt " + qtRuntimeVersion + ")";
+ data += "\nEmbedded Monero version: " + Version.GUI_MONERO_VERSION;
+ data += "\nWallet path: ";
+
+ var wallet_path = walletPath();
+ if(isIOS)
+ wallet_path = moneroAccountsDir + wallet_path;
+ data += wallet_path;
+
+ data += "\nWallet creation height: ";
+ if(currentWallet)
+ data += currentWallet.walletCreationHeight;
+
+ data += "\nWallet log path: " + walletLogPath;
+
+ console.log("Copied to clipboard");
+ clipboard.setText(data);
+ appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3);
+ }
+ }
+ }
+ }
}
Component.onCompleted: {