fixed some issues

This commit is contained in:
2025-06-01 14:11:19 +02:00
parent 85bfd0f3ae
commit b9233136a7
2 changed files with 8 additions and 0 deletions

View File

@@ -704,6 +704,8 @@ window.sortFiles = sortFiles;
window.navigateToFile = navigateToFile; window.navigateToFile = navigateToFile;
window.showEmptyTrashModal = showEmptyTrashModal; window.showEmptyTrashModal = showEmptyTrashModal;
window.permanentDeleteFile = permanentDeleteFile; window.permanentDeleteFile = permanentDeleteFile;
window.toggleView = toggleView;
window.fetchFiles = fetchFiles;
// Initialize search functionality // Initialize search functionality
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {

View File

@@ -58,6 +58,9 @@ window.emptyTrash = function() {
// No files to delete, just close the modal // No files to delete, just close the modal
const modal = bootstrap.Modal.getInstance(document.getElementById('emptyTrashModal')); const modal = bootstrap.Modal.getInstance(document.getElementById('emptyTrashModal'));
modal.hide(); modal.hide();
// Remove the backdrop
document.querySelector('.modal-backdrop')?.remove();
document.body.classList.remove('modal-open');
return Promise.resolve([]); return Promise.resolve([]);
} }
@@ -90,6 +93,9 @@ window.emptyTrash = function() {
// Close the modal // Close the modal
const modal = bootstrap.Modal.getInstance(document.getElementById('emptyTrashModal')); const modal = bootstrap.Modal.getInstance(document.getElementById('emptyTrashModal'));
modal.hide(); modal.hide();
// Remove the backdrop
document.querySelector('.modal-backdrop')?.remove();
document.body.classList.remove('modal-open');
// Refresh the view to ensure everything is up to date // Refresh the view to ensure everything is up to date
fetchFiles(); fetchFiles();
} else { } else {