From 324b332fa69873d90699540dc6bf1ac08901ac16 Mon Sep 17 00:00:00 2001 From: Thiago Sueto Date: Mon, 16 Jun 2025 15:00:06 -0300 Subject: [PATCH] Add confirmation prompt to reset all configuration Resetting all configuration is destructive, it should require a confirmation prompt instead of triggering immediately. --- src/settings/NeoChatGeneralPage.qml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/settings/NeoChatGeneralPage.qml b/src/settings/NeoChatGeneralPage.qml index 69f51ddf5..1ed6d5c7c 100644 --- a/src/settings/NeoChatGeneralPage.qml +++ b/src/settings/NeoChatGeneralPage.qml @@ -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 + } }