feat: Enhance WebDAV file management and UI
- Add functionality to create new collections via API - Implement copy and move operations between collections - Improve image rendering in markdown preview with relative path resolution - Add support for previewing binary files (images, PDFs) - Refactor modal styling to use flat buttons and improve accessibility
This commit is contained in:
		| @@ -35,22 +35,32 @@ | ||||
|                 <i class="bi bi-markdown"></i> Markdown Editor | ||||
|             </span> | ||||
|  | ||||
|             <!-- Center: Edit Mode Buttons --> | ||||
|             <div class="navbar-center d-flex gap-2"> | ||||
|                 <button id="newBtn" class="btn btn-success btn-sm"> | ||||
|             <!-- Right: All Buttons --> | ||||
|             <div class="ms-auto d-flex gap-2 align-items-center"> | ||||
|                 <!-- View Mode Button --> | ||||
|                 <button id="editModeBtn" class="btn-flat btn-flat-warning" style="display: none;"> | ||||
|                     <i class="bi bi-pencil-square"></i> Edit this file | ||||
|                 </button> | ||||
|  | ||||
|                 <!-- Edit Mode Buttons --> | ||||
|                 <button id="newBtn" class="btn-flat btn-flat-success"> | ||||
|                     <i class="bi bi-file-plus"></i> New | ||||
|                 </button> | ||||
|                 <button id="saveBtn" class="btn btn-primary btn-sm"> | ||||
|                 <button id="saveBtn" class="btn-flat btn-flat-primary"> | ||||
|                     <i class="bi bi-save"></i> Save | ||||
|                 </button> | ||||
|                 <button id="deleteBtn" class="btn btn-danger btn-sm"> | ||||
|                 <button id="deleteBtn" class="btn-flat btn-flat-danger"> | ||||
|                     <i class="bi bi-trash"></i> Delete | ||||
|                 </button> | ||||
|             </div> | ||||
|                 <button id="exitEditModeBtn" class="btn-flat btn-flat-secondary"> | ||||
|                     <i class="bi bi-eye"></i> Exit Edit Mode | ||||
|                 </button> | ||||
|  | ||||
|             <!-- Right: Dark Mode Toggle --> | ||||
|             <div class="navbar-right"> | ||||
|                 <button id="darkModeBtn" class="btn btn-secondary btn-sm"> | ||||
|                 <!-- Divider --> | ||||
|                 <div class="vr" style="height: 24px;"></div> | ||||
|  | ||||
|                 <!-- Dark Mode Toggle --> | ||||
|                 <button id="darkModeBtn" class="btn-flat btn-flat-secondary"> | ||||
|                     <i class="bi bi-moon-fill"></i> | ||||
|                 </button> | ||||
|             </div> | ||||
| @@ -65,7 +75,12 @@ | ||||
|                 <!-- Collection Selector --> | ||||
|                 <div class="collection-selector"> | ||||
|                     <label class="form-label small">Collection:</label> | ||||
|                     <select id="collectionSelect" class="form-select form-select-sm"></select> | ||||
|                     <div class="d-flex gap-1"> | ||||
|                         <select id="collectionSelect" class="form-select form-select-sm flex-grow-1"></select> | ||||
|                         <button id="newCollectionBtn" class="btn btn-success btn-sm" title="Create New Collection"> | ||||
|                             <i class="bi bi-plus-lg"></i> | ||||
|                         </button> | ||||
|                     </div> | ||||
|                 </div> | ||||
|                 <!-- File Tree --> | ||||
|                 <div id="fileTree" class="file-tree"></div> | ||||
| @@ -129,6 +144,13 @@ | ||||
|             <i class="bi bi-clipboard"></i> Paste | ||||
|         </div> | ||||
|         <div class="context-menu-divider"></div> | ||||
|         <div class="context-menu-item" data-action="copy-to-collection"> | ||||
|             <i class="bi bi-box-arrow-right"></i> Copy to Collection... | ||||
|         </div> | ||||
|         <div class="context-menu-item" data-action="move-to-collection"> | ||||
|             <i class="bi bi-arrow-right-square"></i> Move to Collection... | ||||
|         </div> | ||||
|         <div class="context-menu-divider"></div> | ||||
|         <div class="context-menu-item text-danger" data-action="delete"> | ||||
|             <i class="bi bi-trash"></i> Delete | ||||
|         </div> | ||||
| @@ -148,8 +170,12 @@ | ||||
|                     <input type="text" id="confirmationInput" class="form-control" style="display: none;"> | ||||
|                 </div> | ||||
|                 <div class="modal-footer"> | ||||
|                     <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button> | ||||
|                     <button type="button" class="btn btn-primary" id="confirmButton">OK</button> | ||||
|                     <button type="button" class="btn-flat btn-flat-secondary" data-bs-dismiss="modal"> | ||||
|                         <i class="bi bi-x-circle"></i> Cancel | ||||
|                     </button> | ||||
|                     <button type="button" class="btn-flat btn-flat-primary" id="confirmButton"> | ||||
|                         <i class="bi bi-check-circle"></i> OK | ||||
|                     </button> | ||||
|                 </div> | ||||
|             </div> | ||||
|         </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user