mohsin-devs commited on
Commit
cf5fe56
·
1 Parent(s): 939b0c8

Remove all confirmation prompts for deletion and other operations

Browse files
Files changed (1) hide show
  1. js/main.js +2 -4
js/main.js CHANGED
@@ -696,10 +696,9 @@ class App {
696
  }
697
 
698
  openDeleteModal(path, name) {
 
699
  this.pendingDelete = path;
700
- const strong = document.querySelector('#deleteModal p strong');
701
- if (strong) strong.textContent = name;
702
- document.getElementById('deleteModal').classList.add('active');
703
  }
704
 
705
  openRenameModal(path, name) {
@@ -1051,7 +1050,6 @@ class App {
1051
 
1052
  async deleteLink(linkId) {
1053
  if (!linkId) return;
1054
- if (!window.confirm('Are you sure you want to delete this link?')) return;
1055
 
1056
  try {
1057
  this.ui.showProgress('Deleting link...');
 
696
  }
697
 
698
  openDeleteModal(path, name) {
699
+ // Skip the modal and delete immediately
700
  this.pendingDelete = path;
701
+ this.confirmDelete();
 
 
702
  }
703
 
704
  openRenameModal(path, name) {
 
1050
 
1051
  async deleteLink(linkId) {
1052
  if (!linkId) return;
 
1053
 
1054
  try {
1055
  this.ui.showProgress('Deleting link...');