Update v1.2.0-beta - Dynamic context menu & permissions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
✨ New Features: - Dynamic permission-based context menus for files and folders - Support for collaborative folder access control - Upload to specific folders including shared folders - Changelog modal for version updates - Improved dark mode synchronization 🐛 Bug Fixes: - Fixed context menu displaying incorrect options - Fixed CSS !important override preventing dynamic menu behavior - Fixed folder collaboration permission checks - Fixed breadcrumb navigation with empty segments - Fixed "Premature close" error loop in attachments - Fixed missing user variable in admin routes - Fixed avatar loading COEP policy issues 🔒 Security: - Added security middleware (CSRF, rate limiting, input validation) - Fixed collaboration folder access validation - Improved shared folder permission handling 🎨 UI/UX Improvements: - Removed Actions column from folder view - Context menu now properly hides/shows based on permissions - Better visual feedback for collaborative folders - Improved upload flow with inline modals 🧹 Code Quality: - Added collaboration data to folder routes - Refactored context menu logic for better maintainability - Added debug logging for troubleshooting - Improved file upload handling with chunking support
This commit is contained in:
@@ -14,22 +14,7 @@ function calculateFolderSize(contents) {
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const copyButtons = document.querySelectorAll('.copy-button');
|
||||
|
||||
copyButtons.forEach(copyButton => {
|
||||
copyButton.addEventListener("click", () => {
|
||||
const fileContainer = copyButton.closest('tr');
|
||||
const fileLink = fileContainer.querySelector('.file-link');
|
||||
fileLink.style.display = "block";
|
||||
fileLink.select();
|
||||
document.execCommand("copy");
|
||||
fileLink.style.display = "none";
|
||||
copyButton.textContent = "Lien copié !";
|
||||
setTimeout(() => {
|
||||
copyButton.textContent = "Copier le lien";
|
||||
}, 2000);
|
||||
});
|
||||
});
|
||||
// La fonctionnalité de copie de lien est maintenant gérée dans folder.ejs
|
||||
|
||||
const filterForm = document.getElementById('filterForm');
|
||||
const extensionFilter = document.getElementById('extensionFilter');
|
||||
@@ -43,7 +28,9 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
function toggleDarkMode() {
|
||||
isDarkMode = !isDarkMode;
|
||||
document.body.classList.toggle('dark-mode', isDarkMode);
|
||||
|
||||
|
||||
if (!icon) return; // Vérifier que l'élément existe avant de l'utiliser
|
||||
|
||||
if (isDarkMode) {
|
||||
icon.classList.remove('bi-brightness-high-fill');
|
||||
icon.classList.add('bi-moon-fill');
|
||||
@@ -57,7 +44,9 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
function applyStyleMode() {
|
||||
document.body.classList.toggle('dark-mode', isDarkMode);
|
||||
|
||||
|
||||
if (!icon) return; // Vérifier que l'élément existe avant de l'utiliser
|
||||
|
||||
if (isDarkMode) {
|
||||
icon.classList.remove('bi-brightness-high-fill');
|
||||
icon.classList.add('bi-moon-fill');
|
||||
@@ -72,15 +61,18 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
darkModeMediaQuery.addListener(applyStyleMode);
|
||||
applyStyleMode();
|
||||
|
||||
styleSwitcherButton.addEventListener('click', toggleDarkMode);
|
||||
if (styleSwitcherButton) {
|
||||
styleSwitcherButton.addEventListener('click', toggleDarkMode);
|
||||
}
|
||||
|
||||
filterForm.addEventListener('submit', function (event) {
|
||||
event.preventDefault();
|
||||
if (filterForm) {
|
||||
filterForm.addEventListener('submit', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
const selectedExtension = extensionFilter.value.toLowerCase();
|
||||
const searchQuery = fileSearchInput.value.toLowerCase();
|
||||
const selectedExtension = extensionFilter ? extensionFilter.value.toLowerCase() : '';
|
||||
const searchQuery = fileSearchInput ? fileSearchInput.value.toLowerCase() : '';
|
||||
|
||||
const fileList = document.querySelectorAll('tr[data-extension]');
|
||||
const fileList = document.querySelectorAll('tr[data-extension]');
|
||||
|
||||
fileList.forEach(file => {
|
||||
const fileExtension = file.getAttribute('data-extension').toLowerCase();
|
||||
@@ -95,7 +87,8 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
file.style.display = 'none';
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
async function confirmDeleteFile(folderName, filename) {
|
||||
|
||||
Reference in New Issue
Block a user