diff --git a/CHANGELOG.md b/CHANGELOG.md
index b2f6b4b..617742a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,16 +1,29 @@
# Changelog
-## Changes 5/20/2025 1.3.6
+## Changes 5/21/2025
+
+- **Drag & Drop to Folder Strip**
+ - Enabled dragging files from the file list directly onto the folder-strip items.
+ - Hooked up `folderDragOverHandler`, `folderDragLeaveHandler`, and `folderDropHandler` to `.folder-strip-container .folder-item`.
+ - On drop, files are moved via `/api/file/moveFiles.php` and the file list is refreshed.
+
+- **Restore files from trash Toast Message**
+ - Changed the restore handlers so that the toast always reports the actual file(s) restored (e.g. “Restored file: foo.txt”) instead of “No trash record found.”
+ - Removed reliance on backend message payload and now generate the confirmation text client-side based on selected items.
+
+---
+
+## Changes 5/20/2025 v1.3.6
- **domUtils.js**
- `updateFileActionButtons`
- Hide selection buttons (`Delete Files`, `Copy Files`, `Move Files` & `Download ZIP`) until file is selected.
- - Hides `Extract ZIP` until selecting zip files
+ - Hide `Extract ZIP` until selecting zip files
- Hide `Create File` button when file list items are selected.
---
-## Changes 5/19/2025 1.3.5
+## Changes 5/19/2025 v1.3.5
### Added Folder strip & Create File
diff --git a/public/js/fileListView.js b/public/js/fileListView.js
index fbeb84c..3f88203 100644
--- a/public/js/fileListView.js
+++ b/public/js/fileListView.js
@@ -17,6 +17,11 @@ import { bindFileListContextMenu } from './fileMenu.js';
import { openDownloadModal } from './fileActions.js';
import { openTagModal, openMultiTagModal } from './fileTags.js';
import { getParentFolder, updateBreadcrumbTitle, setupBreadcrumbDelegation } from './folderManager.js';
+import {
+ folderDragOverHandler,
+ folderDragLeaveHandler,
+ folderDropHandler
+} from './fileDragDrop.js';
export let fileData = [];
export let sortOrder = { column: "uploaded", ascending: true };
@@ -190,7 +195,7 @@ window.updateRowHighlight = updateRowHighlight;
export async function loadFileList(folderParam) {
const folder = folderParam || "root";
const fileListContainer = document.getElementById("fileList");
- const actionsContainer = document.getElementById("fileListActions");
+ const actionsContainer = document.getElementById("fileListActions");
// 1) show loader
fileListContainer.style.visibility = "hidden";
@@ -207,15 +212,15 @@ export async function loadFileList(folderParam) {
window.location.href = "/api/auth/logout.php";
throw new Error("Unauthorized");
}
- const data = await filesRes.json();
+ const data = await filesRes.json();
const folderRaw = await foldersRes.json();
// --- build ONLY the *direct* children of current folder ---
let subfolders = [];
- const hidden = new Set([ "profile_pics", "trash" ]);
+ const hidden = new Set(["profile_pics", "trash"]);
if (Array.isArray(folderRaw)) {
const allPaths = folderRaw.map(item => item.folder ?? item);
- const depth = folder === "root" ? 1 : folder.split("/").length + 1;
+ const depth = folder === "root" ? 1 : folder.split("/").length + 1;
subfolders = allPaths
.filter(p => {
if (folder === "root") {
@@ -261,7 +266,7 @@ export async function loadFileList(folderParam) {
data.files = data.files.map(f => {
f.fullName = (f.path || f.name).trim().toLowerCase();
f.editable = canEditFile(f.name);
- f.folder = folder;
+ f.folder = folder;
return f;
});
fileData = data.files;
@@ -294,13 +299,13 @@ export async function loadFileList(folderParam) {
if (viewMode === "gallery") {
const w = window.innerWidth;
let maxCols;
- if (w < 600) maxCols = 1;
- else if (w < 900) maxCols = 2;
+ if (w < 600) maxCols = 1;
+ else if (w < 900) maxCols = 2;
else if (w < 1200) maxCols = 4;
- else maxCols = 6;
+ else maxCols = 6;
const currentCols = Math.min(
- parseInt(localStorage.getItem("galleryColumns")||"3",10),
+ parseInt(localStorage.getItem("galleryColumns") || "3", 10),
maxCols
);
@@ -319,7 +324,7 @@ export async function loadFileList(folderParam) {
${currentCols}
`;
const gallerySlider = document.getElementById("galleryColumnsSlider");
- const galleryValue = document.getElementById("galleryColumnsValue");
+ const galleryValue = document.getElementById("galleryColumnsValue");
gallerySlider.oninput = e => {
const v = +e.target.value;
localStorage.setItem("galleryColumns", v);
@@ -328,7 +333,7 @@ export async function loadFileList(folderParam) {
?.style.setProperty("grid-template-columns", `repeat(${v},1fr)`);
};
} else {
- const currentHeight = parseInt(localStorage.getItem("rowHeight")||"48",10);
+ const currentHeight = parseInt(localStorage.getItem("rowHeight") || "48", 10);
sliderContainer.innerHTML = `