mirror of
https://github.com/discourse/discourse.git
synced 2025-02-19 09:58:25 +00:00
Before deleting a topic that has a high number of views (default of 5000), the user will be prompted with a confirmation popup. This works for all delete buttons on the topic located in: topic-timeline, topic-admin-menu, topic-footer-buttons, and post-menu if the post's ID is 1. The delete button will be disabled while deletion is in progress, to prevent any unwanted behavior. A site setting is also available to change the minimum amount of views required to display the confirmation popup. All kudos are going to @RickyC0626. I only rebased with master and added few qunit tests to ensure that this feature works as expected. Original PR: #10459