feat: enhance bulk operations panel styling and update downloadExampleImages method to accept optional modelTypes parameter

This commit is contained in:
Will Miao
2025-08-15 15:58:33 +08:00
parent 3cd57a582c
commit 25139ca922
4 changed files with 10 additions and 13 deletions

View File

@@ -281,22 +281,14 @@ function showExampleAccessModal(card, modelType) {
return;
}
// Determine model type (singular form)
let modelTypeSingular = 'lora';
if (modelType === MODEL_TYPES.CHECKPOINT) {
modelTypeSingular = 'checkpoint';
} else if (modelType === MODEL_TYPES.EMBEDDING) {
modelTypeSingular = 'embedding';
}
// Close the modal
modalManager.closeModal('exampleAccessModal');
try {
// Use the appropriate model API client to download examples
const apiClient = getModelApiClient(modelType);
await apiClient.downloadExampleImages([modelHash], [modelTypeSingular]);
await apiClient.downloadExampleImages([modelHash]);
// Open the example images folder if successful
openExampleImagesFolder(modelHash);
} catch (error) {