From 684fd941fb514988f8992bf1ffb1f993a1ad32d0 Mon Sep 17 00:00:00 2001 From: selsta Date: Mon, 19 Apr 2021 07:14:29 +0200 Subject: [PATCH] WizardDaemonSettings: add reset button to db location --- wizard/WizardDaemonSettings.qml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wizard/WizardDaemonSettings.qml b/wizard/WizardDaemonSettings.qml index 98f46709..8792cb9c 100644 --- a/wizard/WizardDaemonSettings.qml +++ b/wizard/WizardDaemonSettings.qml @@ -82,11 +82,20 @@ ColumnLayout { Layout.fillWidth: true readOnly: true - labelText: qsTr("Blockchain location (optional)") + translationManager.emptyString + labelText: { + const label = qsTr("Blockchain location (optional)"); + if (persistentSettings.blockchainDataDir) { + const style = ""; + return label + style + " (%1)".arg(qsTr("Reset")) + translationManager.emptyString; + } else { + return label + translationManager.emptyString; + } + } labelFontSize: 14 placeholderText: qsTr("Default") + translationManager.emptyString placeholderFontSize: 15 text: persistentSettings.blockchainDataDir + onLabelLinkActivated: persistentSettings.blockchainDataDir = "" MoneroComponents.InlineButton { small: true