mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-21 03:01:27 -03:00
feat(settings): directory picker and live validation for path settings
Add a reusable directory-picker modal backed by a new generic POST /api/lm/browse-directory endpoint (browse logic extracted from the recipe batch-import handler into py/utils/directory_browser.py) and wire a browse button plus advisory validate-path feedback (POST /api/lm/validate-path) into the settings path inputs: recipes path, example images path/local root, and the extra-folder/model-path rows. The browse button insets into the right edge of static inputs so narrow settings rows keep their single-control layout. Translations for the new settings.directoryPicker and settings.pathValidation keys are filled in for all 9 locales.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<!-- Directory Picker Modal (self-managed by DirectoryPickerModal.js, stacked above the settings modal) -->
|
||||
<div id="directoryPickerModal" class="modal directory-picker-modal" style="display: none;">
|
||||
<div class="modal-content directory-picker-content">
|
||||
<button class="close" id="directoryPickerCloseBtn">×</button>
|
||||
<h3>{{ t('settings.directoryPicker.title') }}</h3>
|
||||
|
||||
<div class="directory-picker-path-row">
|
||||
<input type="text" id="directoryPickerPathInput" placeholder="{{ t('settings.directoryPicker.pathPlaceholder') }}" autocomplete="off">
|
||||
<button class="secondary-btn" id="directoryPickerGoBtn">
|
||||
<i class="fas fa-arrow-right"></i> {{ t('settings.directoryPicker.go') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="directory-browser" id="directoryPickerBrowser">
|
||||
<div class="browser-header">
|
||||
<button class="back-btn" id="directoryPickerUpBtn" title="{{ t('settings.directoryPicker.goUp') }}" disabled>
|
||||
<i class="fas fa-arrow-up"></i>
|
||||
</button>
|
||||
<div class="current-path" id="directoryPickerCurrentPath"></div>
|
||||
</div>
|
||||
<div class="browser-content">
|
||||
<div class="folder-list" id="directoryPickerFolderList"></div>
|
||||
<div class="directory-picker-error" id="directoryPickerError" style="display: none;"></div>
|
||||
</div>
|
||||
<div class="browser-footer">
|
||||
<button class="primary-btn" id="directoryPickerSelectBtn">
|
||||
<i class="fas fa-check"></i> {{ t('settings.directoryPicker.selectFolder') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user