mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
refactor: streamline example images download functionality and UI updates
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
<i class="fas fa-images"></i> Example Images Download
|
||||
</div>
|
||||
<div class="progress-panel-actions">
|
||||
<button id="pauseExampleDownloadBtn" class="icon-button" onclick="exampleImagesManager.pauseDownload()">
|
||||
<button id="pauseExampleDownloadBtn" class="icon-button">
|
||||
<i class="fas fa-pause"></i>
|
||||
</button>
|
||||
<button id="collapseProgressBtn" class="icon-button" onclick="exampleImagesManager.toggleProgressPanel()">
|
||||
<button id="collapseProgressBtn" class="icon-button">
|
||||
<i class="fas fa-chevron-down"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -45,4 +45,29 @@
|
||||
<div id="downloadErrors" class="error-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Initialize button onclick handlers when DOM is fully loaded
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const pauseBtn = document.getElementById('pauseExampleDownloadBtn');
|
||||
const collapseBtn = document.getElementById('collapseProgressBtn');
|
||||
|
||||
// Make window.exampleImagesManager globally available
|
||||
if (window.exampleImagesManager === undefined && typeof exampleImagesManager !== 'undefined') {
|
||||
window.exampleImagesManager = exampleImagesManager;
|
||||
}
|
||||
|
||||
if (pauseBtn && window.exampleImagesManager) {
|
||||
pauseBtn.onclick = () => window.exampleImagesManager.pauseDownload();
|
||||
}
|
||||
|
||||
if (collapseBtn && window.exampleImagesManager) {
|
||||
collapseBtn.onclick = () => {
|
||||
if (window.exampleImagesManager.toggleProgressPanel) {
|
||||
window.exampleImagesManager.toggleProgressPanel();
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user