Add CivitaiApiMetadataParser and improve recipe parsing logic for Civitai images. Also fixes #197

Additional info: Now prioritizes using the Civitai Images API to fetch image and generation metadata. Even NSFW images can now be imported via URL.
This commit is contained in:
Will Miao
2025-06-03 14:58:43 +08:00
parent e151a19fcf
commit 2d39b84806
7 changed files with 383 additions and 23 deletions

View File

@@ -58,8 +58,17 @@ export class ImportManager {
this.stepManager.removeInjectedStyles();
});
// Verify visibility
setTimeout(() => this.ensureModalVisible(), 50);
// Verify visibility and focus on URL input
setTimeout(() => {
this.ensureModalVisible();
// Ensure URL option is selected and focus on the input
this.toggleImportMode('url');
const urlInput = document.getElementById('imageUrlInput');
if (urlInput) {
urlInput.focus();
}
}, 50);
}
resetSteps() {