# Changelog ## Changes 4/30/2025 v1.2.8 - **Added** PDF preview in `filePreview.js` (the `extension === "pdf"` block): replaced in-modal `` with `window.open(urlWithTs, "_blank")` and closed the modal to avoid CSP `frame-ancestors 'none'` restrictions. - **Added** `autofocus` attribute to the login form’s username input (`#loginUsername`) so the cursor is ready for typing on page load. - **Enhanced** login initialization with a `DOMContentLoaded` fallback that calls `loginUsername.focus()` (via `setTimeout`) if needed. - **Set** focus to the “New Username” field (`#newUsername`) when entering setup mode, hiding the login form and showing the Add-User modal. - **Implemented** Enter-key support in setup mode by attaching `attachEnterKeyListener("addUserModal", "saveUserBtn")`, allowing users to press Enter to submit the Add-User form. --- ## Changes 4/28/2025 **Added** - **Custom expiration** option to File Share modal - Users can specify a value + unit (seconds, minutes, hours, days) - Displays a warning when a custom duration is selected - **Custom expiration** option to Folder Share modal (same value+unit picker and warning) **Changed** - **API parameters** for both endpoints: - Replaced `expirationMinutes` with `expirationValue` + `expirationUnit` - Front-end now sends `{ expirationValue, expirationUnit }` - Back-end converts those into total seconds before saving - **UI** - FileShare and FolderShare modals updated to handle “Custom…” selection **Updated Models & Controllers** - **FileModel::createShareLink** now accepts expiration in seconds - **FolderModel::createShareFolderLink** now accepts expiration in seconds - **createShareLink.php** & **createShareFolderLink.php** updated to parse and convert new parameters **Documentation** - OpenAPI annotations for both endpoints updated to require `expirationValue` + `expirationUnit` (enum: seconds, minutes, hours, days) ## Changes 4/27/2025 v1.2.7 - **Select-All** checkbox now correctly toggles all `.file-checkbox` inputs - Updated `toggleAllCheckboxes(masterCheckbox)` to call `updateRowHighlight()` on each row so selections get the `.row-selected` highlight - **Master checkbox sync** in toolbar - Enhanced `updateFileActionButtons()` to set the header checkbox to checked, unchecked, or indeterminate based on how many files are selected - Fixed Pagination controls & Items-per-page dropdown - Fixed `#advancedSearchToggle` in both `renderFileTable()` and `renderGalleryView()` - **Shared folder gallery view logic** - Introduced new `public/js/sharedFolderView.js` containing all DOMContentLoaded wiring, `toggleViewMode()`, gallery rendering, and event listeners - Embedded a non-executing JSON payload in `shareFolder.php` - **`FolderController::shareFolder()` / `shareFolder.php`** - Removed all inline `onclick="…"` attributes and inline `` to export `$token` and `$files` - Added `` to load the external view logic - **Styling updates** - Added `.toggle-btn` CSS for blue header-style toggle button and applied it in JS - Added `.pagination a:hover { background-color: #0056b3; }` to match button hover - Tweaked `body` padding and `header h1` margins to reduce whitespace above header - Refactored `sharedFolderView.js:renderGalleryView()` to eliminate `innerHTML` usage; now uses `document.createElement` and `textContent` so filenames and URLs are fully escaped and CSP-safe --- ## Changes 4/26/2025 1.2.6 **Apache / Dockerfile (CSP)** - Enabled Apache’s `mod_headers` in the Dockerfile (`a2enmod headers ssl deflate expires proxy proxy_fcgi rewrite`) - Added a strong `Content-Security-Policy` header in the vhost configs to lock down allowed sources for scripts, styles, fonts, images, and connections **index.html & CDN Includes** - Applied Subresource Integrity (`integrity` + `crossorigin="anonymous"`) to all static CDN assets (Bootstrap CSS, CodeMirror CSS/JS, Resumable.js, DOMPurify, Fuse.js) - Omitted SRI on Google Fonts & Material Icons links (dynamic per-browser CSS) - Removed all inline `