Full Changelog: v1.2.7...v1.2.8
Changes 4/30/2025 v1.2.8
- Added PDF preview in
filePreview.js(theextension === "pdf"block): replaced in-modal<embed>withwindow.open(urlWithTs, "_blank")and closed the modal to avoid CSPframe-ancestors 'none'restrictions. - Added
autofocusattribute to the login form’s username input (#loginUsername) so the cursor is ready for typing on page load. - Enhanced login initialization with a
DOMContentLoadedfallback that callsloginUsername.focus()(viasetTimeout) 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
expirationMinuteswithexpirationValue+expirationUnit - Front-end now sends
{ expirationValue, expirationUnit } - Back-end converts those into total seconds before saving
- Replaced
- 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) - Refactored
sharedFolderView.js:renderGalleryView()to eliminateinnerHTMLusage; now usesdocument.createElementandtextContentso filenames and URLs are fully escaped and CSP-safe