diff --git a/CHANGELOG.md b/CHANGELOG.md index c820119..d96326f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## Changes 5/19/2025 + +### Added Folder strip & Create File + +- **Folder strip in file list** + - `loadFileList` now fetches sub-folders in parallel from `/api/folder/getFolderList.php`. + - Filters to only *direct* children of the current folder, hiding `profile_pics` and `trash`. + - Injects a new `.folder-strip-container` just below the Files In above (summary + slider). + - Clicking a folder in the strip updates: + - the breadcrumb (via `updateBreadcrumbTitle`) + - the tree selection highlight + - reloads `loadFileList` for the chosen folder. + +- **Create File feature** + - New “Create New File” button added to the file-actions toolbar and context menu. + - New endpoint `public/api/file/createFile.php` (handled by `FileController`/`FileModel`): + - Creates an empty file if it doesn’t already exist. + - Appends an entry to `_metadata.json` with `uploaded` timestamp and `uploader`. + - `fileActions.js`: + - Implemented `handleCreateFile()` to show a modal, POST to the new endpoint, and refresh the list. + - Added translations for `create_new_file` and `newfile_placeholder`. + +--- + ## Changees 5/15/2025 ### Drag‐and‐Drop Upload extended to File List diff --git a/public/api/file/createFile.php b/public/api/file/createFile.php new file mode 100644 index 0000000..973b1f5 --- /dev/null +++ b/public/api/file/createFile.php @@ -0,0 +1,15 @@ +false,'error'=>'Unauthorized']); + exit; +} + +$fc = new FileController(); +$fc->createFile(); \ No newline at end of file diff --git a/public/css/styles.css b/public/css/styles.css index 20130d1..79e7f5c 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -848,6 +848,11 @@ body:not(.dark-mode) .material-icons.pauseResumeBtn:hover { background-color: #00796B; } +#createFileBtn { + background-color: #007bff; + color: white; +} + #fileList button.edit-btn { background-color: #007bff; color: white; @@ -2242,4 +2247,33 @@ body.dark-mode .user-dropdown .user-menu .item:hover { font-weight: 500; vertical-align: middle; white-space: nowrap; +} + +.folder-strip-container { + display: flex; + flex-wrap: wrap; + gap: 12px; + padding: 8px 0; +} +.folder-strip-container .folder-item { + display: flex; + flex-direction: column; + align-items: center; + cursor: pointer; + width: 80px; + color: inherit; /* icon will pick up text color */ + font-size: 0.85em; +} +.folder-strip-container .folder-item i.material-icons { + font-size: 28px; + margin-bottom: 4px; +} + +.folder-strip-container .folder-item i.material-icons { + color: currentColor; +} + +.folder-strip-container .folder-item:hover { + background-color: rgba(255, 255, 255, 0.2); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); } \ No newline at end of file diff --git a/public/index.html b/public/index.html index 6655316..7f42f12 100644 --- a/public/index.html +++ b/public/index.html @@ -11,13 +11,18 @@