mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 23:25:43 -03:00
Enhance download modals: auto-focus on URL input and auto-select version if only one available
This commit is contained in:
@@ -36,6 +36,14 @@ export class CheckpointDownloadManager {
|
|||||||
this.cleanupFolderBrowser();
|
this.cleanupFolderBrowser();
|
||||||
});
|
});
|
||||||
this.resetSteps();
|
this.resetSteps();
|
||||||
|
|
||||||
|
// Auto-focus on the URL input
|
||||||
|
setTimeout(() => {
|
||||||
|
const urlInput = document.getElementById('checkpointUrl');
|
||||||
|
if (urlInput) {
|
||||||
|
urlInput.focus();
|
||||||
|
}
|
||||||
|
}, 100); // Small delay to ensure the modal is fully displayed
|
||||||
}
|
}
|
||||||
|
|
||||||
resetSteps() {
|
resetSteps() {
|
||||||
@@ -178,6 +186,11 @@ export class CheckpointDownloadManager {
|
|||||||
`;
|
`;
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
|
// Auto-select the version if there's only one
|
||||||
|
if (this.versions.length === 1 && !this.currentVersion) {
|
||||||
|
this.selectVersion(this.versions[0].id.toString());
|
||||||
|
}
|
||||||
|
|
||||||
// Update Next button state based on initial selection
|
// Update Next button state based on initial selection
|
||||||
this.updateNextButtonState();
|
this.updateNextButtonState();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,14 @@ export class DownloadManager {
|
|||||||
this.cleanupFolderBrowser();
|
this.cleanupFolderBrowser();
|
||||||
});
|
});
|
||||||
this.resetSteps();
|
this.resetSteps();
|
||||||
|
|
||||||
|
// Auto-focus on the URL input
|
||||||
|
setTimeout(() => {
|
||||||
|
const urlInput = document.getElementById('loraUrl');
|
||||||
|
if (urlInput) {
|
||||||
|
urlInput.focus();
|
||||||
|
}
|
||||||
|
}, 100); // Small delay to ensure the modal is fully displayed
|
||||||
}
|
}
|
||||||
|
|
||||||
resetSteps() {
|
resetSteps() {
|
||||||
@@ -182,6 +190,11 @@ export class DownloadManager {
|
|||||||
`;
|
`;
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
|
// Auto-select the version if there's only one
|
||||||
|
if (this.versions.length === 1 && !this.currentVersion) {
|
||||||
|
this.selectVersion(this.versions[0].id.toString());
|
||||||
|
}
|
||||||
|
|
||||||
// Update Next button state based on initial selection
|
// Update Next button state based on initial selection
|
||||||
this.updateNextButtonState();
|
this.updateNextButtonState();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user