From acb52dba09c2d3ddb96cc038a6f24461f6058c4e Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Mon, 7 Jul 2025 16:34:19 +0800 Subject: [PATCH] refactor: Remove redundant local file fallback and debug logs in showcase file handling --- static/js/components/shared/showcase/ShowcaseView.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/static/js/components/shared/showcase/ShowcaseView.js b/static/js/components/shared/showcase/ShowcaseView.js index fa2e6256..d113f074 100644 --- a/static/js/components/shared/showcase/ShowcaseView.js +++ b/static/js/components/shared/showcase/ShowcaseView.js @@ -245,11 +245,6 @@ function findLocalFile(img, index, exampleFiles) { const match = file.name.match(/image_(\d+)\./); return match && parseInt(match[1]) === index; }); - - // If not found by index, just use the same position in the array if available - if (!localFile && index < exampleFiles.length) { - localFile = exampleFiles[index]; - } } return localFile; @@ -406,9 +401,6 @@ async function handleImportFiles(files, modelHash, importContainer) { const customImages = result.custom_images || []; // Combine both arrays for rendering const allImages = [...regularImages, ...customImages]; - console.log("Regular images:", regularImages); - console.log("Custom images:", customImages); - console.log("Combined images:", allImages); showcaseTab.innerHTML = renderShowcaseContent(allImages, updatedFilesResult.files, true); // Re-initialize showcase functionality