Skip to content

Confirm before resetting settings to defaults#5186

Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
feature/confirm-reset-settings
Jul 23, 2026
Merged

Confirm before resetting settings to defaults#5186
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
feature/confirm-reset-settings

Conversation

@GabrielDuf

Copy link
Copy Markdown
Contributor

This pull request adds a confirmation dialog before resetting UniGetUI to its default settings, improving user experience and preventing accidental resets. The main changes include implementing a new dialog window, updating the reset logic to show the confirmation dialog, and adding the necessary translation string.

Reset Settings Confirmation Dialog:

  • Added a new dialog window ResetSettingsDialog with UI and logic to confirm resetting UniGetUI to default settings. The dialog presents a warning message and "Cancel" and "Reset UniGetUI" buttons. (src/UniGetUI.Avalonia/Views/DialogPages/ResetSettingsDialog.axaml``src/UniGetUI.Avalonia/Views/DialogPages/ResetSettingsDialog.axaml.cs
  • Updated the ResetSettings command in GeneralViewModel.cs to show the confirmation dialog and only proceed with the reset if the user confirms. (src/UniGetUI.Avalonia/ViewModels/Pages/SettingsPages/GeneralViewModel.cs

Localization:

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a confirmation step to prevent accidental settings resets.

Changes:

  • Introduces a localized reset confirmation dialog.
  • Resets settings only after explicit confirmation.
  • Adds the English warning message.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
ResetSettingsDialog.axaml.cs Implements confirmation behavior and initial focus.
ResetSettingsDialog.axaml Defines the accessible confirmation UI.
GeneralViewModel.cs Displays the dialog before resetting settings.
lang_en.json Adds the confirmation warning translation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@GabrielDuf
Gabriel Dufresne (GabrielDuf) merged commit 418f33f into main Jul 23, 2026
7 checks passed
@GabrielDuf
Gabriel Dufresne (GabrielDuf) deleted the feature/confirm-reset-settings branch July 23, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[IMPROVEMENT] Reset to default settings only after confirm

3 participants