-
-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add confirmation to modal before updating #3038
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. A couple of things:
This component is used on the Statamic updater as well as for any addons. So as you have it now, when you try to upgrade an addon, it'll say "Are you sure you want to update Statamic?", but it's not Statamic.
Second, even when you're about to downgrade, the confirmation still asks if you want to update.
I think you can resolve both issues by making the message a bit more generic.
Are you sure you want to {update/downgrade} to {version}?
One way you could do that is to change confirmationOpen
from a boolean to an object, and when you click a button, set the release
to that. Then the confirmation can read the type
and version
.
Agreed. Those sound like some good changes. I'll try and make them tonight. |
Rather than being specific to statamic/cms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've slightly tweaked it so that the confirmation dialog is closed when you click confirm, instead of it sitting in the background. Otherwise, 👍
Awesomeee! |
This pull request adds a confirmation modal to the Statamic updater before the site begins to update. Closes #884.