Add confirmation prompt to reset all configuration
Resetting all configuration is destructive, it should require a confirmation prompt instead of triggering immediately.
This commit is contained in:
committed by
Tobias Fella
parent
33d29f6b02
commit
324b332fa6
@@ -309,8 +309,16 @@ FormCard.FormCardPage {
|
||||
FormCard.FormCard {
|
||||
FormCard.FormButtonDelegate {
|
||||
icon.name: "kt-restore-defaults-symbolic"
|
||||
text: i18nc("@action:button", "Reset All Configuration Values to Their Default")
|
||||
onClicked: Controller.revertToDefaultConfig()
|
||||
text: i18nc("@action:button", "Reset all configuration values to their default")
|
||||
onClicked: resetDialog.open()
|
||||
}
|
||||
}
|
||||
Kirigami.PromptDialog {
|
||||
id: resetDialog
|
||||
title: i18nc("@title:dialog", "Reset Configuration")
|
||||
subtitle: i18nc("@info", "Do you really want to reset all options to their default values?")
|
||||
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
|
||||
onAccepted: Controller.revertToDefaultConfig()
|
||||
anchors.centerIn: QQC2.Overlay.overlay
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user