From b9233136a7c16c19c6a707a617551e5c8c3c5899 Mon Sep 17 00:00:00 2001 From: Kobe Date: Sun, 1 Jun 2025 14:11:19 +0200 Subject: [PATCH] fixed some issues --- static/js/file-grid.js | 2 ++ static/js/trash.js | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/static/js/file-grid.js b/static/js/file-grid.js index a728993..1ea0ddb 100644 --- a/static/js/file-grid.js +++ b/static/js/file-grid.js @@ -704,6 +704,8 @@ window.sortFiles = sortFiles; window.navigateToFile = navigateToFile; window.showEmptyTrashModal = showEmptyTrashModal; window.permanentDeleteFile = permanentDeleteFile; +window.toggleView = toggleView; +window.fetchFiles = fetchFiles; // Initialize search functionality document.addEventListener('DOMContentLoaded', function() { diff --git a/static/js/trash.js b/static/js/trash.js index 6034cc9..827806f 100644 --- a/static/js/trash.js +++ b/static/js/trash.js @@ -58,6 +58,9 @@ window.emptyTrash = function() { // No files to delete, just close the modal const modal = bootstrap.Modal.getInstance(document.getElementById('emptyTrashModal')); modal.hide(); + // Remove the backdrop + document.querySelector('.modal-backdrop')?.remove(); + document.body.classList.remove('modal-open'); return Promise.resolve([]); } @@ -90,6 +93,9 @@ window.emptyTrash = function() { // Close the modal const modal = bootstrap.Modal.getInstance(document.getElementById('emptyTrashModal')); 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 fetchFiles(); } else {