diff --git a/fileManager.js b/fileManager.js index b93192c..5ef6bdd 100644 --- a/fileManager.js +++ b/fileManager.js @@ -217,7 +217,7 @@ export function renderFileTable(folder) { let previewIcon = ""; if (/\.(jpg|jpeg|png|gif|bmp|webp|svg|ico|tif|tiff|eps|heic)$/i.test(file.name)) { previewIcon = `image`; - } else if (/\.(mp4|webm|mov|ogg)$/i.test(file.name)) { + } else if (/\.(mp4|webm|ogg)$/i.test(file.name)) { previewIcon = `videocam`; } else if (/\.pdf$/i.test(file.name)) { previewIcon = `picture_as_pdf`; @@ -356,9 +356,10 @@ window.previewFile = function (fileUrl, fileName) { } else if (extension === "pdf") { // PDF preview using with explicit sizing const embed = document.createElement("embed"); - embed.src = fileUrl; + // Append a timestamp to force reload + const separator = fileUrl.indexOf('?') === -1 ? '?' : '&'; + embed.src = fileUrl + separator + 't=' + new Date().getTime(); embed.type = "application/pdf"; - // Instead of using the image-modal-img class, set larger dimensions embed.style.width = "80vw"; embed.style.height = "80vh"; embed.style.border = "none"; diff --git a/styles.css b/styles.css index d8d72e6..d376ba5 100644 --- a/styles.css +++ b/styles.css @@ -1216,7 +1216,7 @@ body.dark-mode #fileListContainer { =========================================================== */ .folder-tree { list-style-type: none; - padding-left: 25px; + padding-left: 10px; margin: 0; } @@ -1236,11 +1236,14 @@ body.dark-mode #fileListContainer { .folder-toggle { cursor: pointer; margin-right: 5px; + display: inline-block; + width: 25px; /* or adjust to desired width */ + text-align: right; } .folder-indent-placeholder { display: inline-block; - width: 0px; + width: 30px; } .folder-option {