feat: enhance download and move modals with improved folder path input, autocomplete, and folder tree integration

This commit is contained in:
Will Miao
2025-08-13 14:41:21 +08:00
parent 20ce0778a0
commit d04deff5ca
6 changed files with 241 additions and 125 deletions

View File

@@ -6,6 +6,7 @@
<span class="close" onclick="modalManager.closeModal('moveModal')">&times;</span>
</div>
<div class="location-selection">
<!-- Path preview -->
<div class="path-preview">
<label>Target Location Preview:</label>
<div class="path-display" id="moveTargetPathDisplay">
@@ -14,18 +15,37 @@
</div>
<div class="input-group">
<label id="moveRootLabel">Select Model Root:</label>
<label for="moveModelRoot" id="moveRootLabel">Select Model Root:</label>
<select id="moveModelRoot"></select>
</div>
<!-- Path input with autocomplete -->
<div class="input-group">
<label>Target Folder:</label>
<div class="folder-browser" id="moveFolderBrowser">
<!-- Folders will be loaded dynamically -->
<label for="moveFolderPath">Target Folder Path:</label>
<div class="path-input-container">
<input type="text" id="moveFolderPath" placeholder="Type folder path or select from tree below..." autocomplete="off" />
<button type="button" id="moveCreateFolderBtn" class="create-folder-btn" title="Create new folder">
<i class="fas fa-plus"></i>
</button>
</div>
<div class="path-suggestions" id="movePathSuggestions" style="display: none;"></div>
</div>
<!-- Breadcrumb navigation -->
<div class="breadcrumb-nav" id="moveBreadcrumbNav">
<span class="breadcrumb-item root" data-path="">
<i class="fas fa-home"></i> Root
</span>
</div>
<!-- Hierarchical folder tree -->
<div class="input-group">
<label for="moveNewFolder">New Folder (optional):</label>
<input type="text" id="moveNewFolder" placeholder="Enter folder name" />
<label>Browse Folders:</label>
<div class="folder-tree-container">
<div class="folder-tree" id="moveFolderTree">
<!-- Tree will be loaded dynamically -->
</div>
</div>
</div>
</div>
<div class="modal-actions">