Trash with Restore & Delete plus more changes/fixes

This commit is contained in:
Ryan
2025-03-21 00:10:08 -04:00
committed by GitHub
parent 8a7dcbe7bf
commit dcd976cdc5
16 changed files with 1119 additions and 166 deletions

View File

@@ -16,6 +16,7 @@ import {
import { loadFolderTree } from './folderManager.js';
import { initUpload } from './upload.js';
import { initAuth, checkAuthentication } from './auth.js';
import { setupTrashRestoreDelete } from './trashRestoreDelete.js';
function loadCsrfToken() {
fetch('token.php', { credentials: 'include' })
@@ -123,6 +124,7 @@ document.addEventListener("DOMContentLoaded", function () {
initFileActions();
initUpload();
loadFolderTree();
setupTrashRestoreDelete();
const helpBtn = document.getElementById("folderHelpBtn");
const helpTooltip = document.getElementById("folderHelpTooltip");
helpBtn.addEventListener("click", function () {
@@ -132,11 +134,6 @@ document.addEventListener("DOMContentLoaded", function () {
} else {
helpTooltip.style.display = "none";
}
// Set the icon color based on dark mode.
const helpIcon = document.querySelector("#folderHelpBtn > i.material-icons.folder-help-icon");
if (helpIcon) {
helpIcon.style.color = document.body.classList.contains("dark-mode") ? "#ffa500" : "orange";
}
});
} else {
console.warn("User not authenticated. Data loading deferred.");