1
mirror of https://github.com/monero-project/monero-gui synced 2024-12-26 01:23:44 +01:00

Reformat Settings->Debug Info

This commit is contained in:
Sander Ferdinand 2018-04-21 13:17:53 +02:00
parent 9f0d771f40
commit b8466739f9
2 changed files with 118 additions and 77 deletions

View File

@ -5,6 +5,7 @@ import "../components" as MoneroComponents
TextEdit {
color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name
selectionColor: MoneroComponents.Style.dimmedFontColor
wrapMode: Text.Wrap
readOnly: true
selectByMouse: true

View File

@ -623,101 +623,141 @@ Rectangle {
}
}
TextBlock {
Layout.topMargin: 8
font.pixelSize: 14
Layout.fillWidth: true
text: qsTr("GUI version: ") + Version.GUI_VERSION + " (Qt " + qtRuntimeVersion + ")" + translationManager.emptyString
}
TextBlock {
id: guiMoneroVersion
Layout.fillWidth: true
font.pixelSize: 14
text: qsTr("Embedded Monero version: ") + Version.GUI_MONERO_VERSION + translationManager.emptyString
}
TextBlock {
id: restoreHeightText
Layout.fillWidth: true
font.pixelSize: 14
textFormat: Text.RichText
property var txt: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C}</style>" + qsTr("Wallet creation height: ") + (currentWallet ? currentWallet.walletCreationHeight : "") + translationManager.emptyString
property var linkTxt: qsTr(" <a href='#'>(Click to change)</a>") + translationManager.emptyString
text: (typeof currentWallet == "undefined") ? "" : txt + linkTxt
GridLayout {
id: grid
columns: 2
columnSpacing: 20 * scaleRatio
onLinkActivated: {
restoreHeightRow.visible = true;
TextBlock {
font.pixelSize: 14
text: qsTr("GUI version: ") + translationManager.emptyString
}
}
TextBlock {
font.pixelSize: 14
font.bold: true
text: Version.GUI_VERSION + " (Qt " + qtRuntimeVersion + ")" + translationManager.emptyString
}
RowLayout {
id: restoreHeightRow
visible: false
LineEdit {
id: restoreHeight
Layout.preferredWidth: 80
TextBlock {
id: guiMoneroVersion
font.pixelSize: 14
text: qsTr("Embedded Monero version: ") + translationManager.emptyString
}
TextBlock {
font.pixelSize: 14
font.bold: true
text: Version.GUI_MONERO_VERSION + translationManager.emptyString
}
TextBlock {
Layout.fillWidth: true
text: currentWallet ? currentWallet.walletCreationHeight : "0"
validator: IntValidator {
bottom:0
font.pixelSize: 14
text: qsTr("Wallet name: ") + translationManager.emptyString
}
TextBlock {
Layout.fillWidth: true
font.pixelSize: 14
font.bold: true
text: walletName + translationManager.emptyString
}
TextBlock {
id: restoreHeight
font.pixelSize: 14
textFormat: Text.RichText
text: (typeof currentWallet == "undefined") ? "" : qsTr("Wallet creation height: ") + translationManager.emptyString
}
TextBlock {
id: restoreHeightText
textFormat: Text.RichText
font.pixelSize: 14
font.bold: true
property var style: "<style type='text/css'>a {cursor:pointer;text-decoration: none; color: #FF6C3C}</style>"
text: (currentWallet ? currentWallet.walletCreationHeight : "") + style + qsTr(" <a href='#'> (Click to change)</a>") + translationManager.emptyString
onLinkActivated: {
restoreHeightRow.visible = true;
}
}
StandardButton {
id: restoreHeightSave
small: true
Layout.fillWidth: false
Layout.leftMargin: 30
text: qsTr("Save") + translationManager.emptyString
RowLayout {
id: restoreHeightRow
visible: false
Layout.preferredWidth: parent.width
onClicked: {
currentWallet.walletCreationHeight = restoreHeight.text
// Restore height is saved in .keys file. Set password to trigger rewrite.
currentWallet.setPassword(appWindow.walletPassword)
restoreHeightRow.visible = false
// Show confirmation dialog
confirmationDialog.title = qsTr("Rescan wallet cache") + translationManager.emptyString;
confirmationDialog.text = qsTr("Are you sure you want to rebuild the wallet cache?\n"
+ "The following information will be deleted\n"
+ "- Recipient addresses\n"
+ "- Tx keys\n"
+ "- Tx descriptions\n\n"
+ "The old wallet cache file will be renamed and can be restored later.\n"
);
confirmationDialog.icon = StandardIcon.Question
confirmationDialog.cancelText = qsTr("Cancel")
confirmationDialog.onAcceptedCallback = function() {
walletManager.closeWallet();
walletManager.clearWalletCache(persistentSettings.wallet_path);
walletManager.openWalletAsync(persistentSettings.wallet_path, appWindow.walletPassword,
persistentSettings.nettype);
LineEdit {
id: restoreHeightEdit
Layout.preferredWidth: 80
Layout.fillWidth: true
text: currentWallet ? currentWallet.walletCreationHeight : "0"
validator: IntValidator {
bottom:0
}
}
confirmationDialog.onRejectedCallback = null;
StandardButton {
id: restoreHeightSave
small: true
Layout.fillWidth: false
Layout.leftMargin: 30
text: qsTr("Save") + translationManager.emptyString
confirmationDialog.open()
onClicked: {
currentWallet.walletCreationHeight = restoreHeightEdit.text
// Restore height is saved in .keys file. Set password to trigger rewrite.
currentWallet.setPassword(appWindow.walletPassword)
restoreHeightRow.visible = false
// Show confirmation dialog
confirmationDialog.title = qsTr("Rescan wallet cache") + translationManager.emptyString;
confirmationDialog.text = qsTr("Are you sure you want to rebuild the wallet cache?\n"
+ "The following information will be deleted\n"
+ "- Recipient addresses\n"
+ "- Tx keys\n"
+ "- Tx descriptions\n\n"
+ "The old wallet cache file will be renamed and can be restored later.\n"
);
confirmationDialog.icon = StandardIcon.Question
confirmationDialog.cancelText = qsTr("Cancel")
confirmationDialog.onAcceptedCallback = function() {
walletManager.closeWallet();
walletManager.clearWalletCache(persistentSettings.wallet_path);
walletManager.openWalletAsync(persistentSettings.wallet_path, appWindow.walletPassword,
persistentSettings.nettype);
}
confirmationDialog.onRejectedCallback = null;
confirmationDialog.open()
}
}
}
}
TextBlock {
Layout.fillWidth: true
font.pixelSize: 14
text: (!currentWallet) ? "" : qsTr("Wallet log path: ") + translationManager.emptyString
}
TextBlock {
Layout.fillWidth: true
font.pixelSize: 14
text: currentWallet.walletLogPath + translationManager.emptyString
}
TextBlock {
Layout.fillWidth: true
font.pixelSize: 14
text: (!currentWallet) ? "" : qsTr("Wallet log path: ") + currentWallet.walletLogPath + translationManager.emptyString
}
TextBlock {
Layout.fillWidth: true
font.pixelSize: 14
text: qsTr("Wallet Name: ") + walletName + translationManager.emptyString
}
TextBlock {
Layout.fillWidth: true
font.pixelSize: 14
text: (!currentWallet) ? "" : qsTr("Daemon log path: ") + currentWallet.daemonLogPath + translationManager.emptyString
TextBlock {
Layout.fillWidth: true
font.pixelSize: 14
text: (!currentWallet) ? "" : qsTr("Daemon log path: ") + translationManager.emptyString
}
TextBlock {
Layout.fillWidth: true
font.pixelSize: 14
text: (!currentWallet) ? "" : currentWallet.daemonLogPath + translationManager.emptyString
}
}
}