Phase 1: Code cleanup - remove unused pages, components, and console.logs

- Deleted 6 empty folders (pages/Admin, pages/admin, pages/settings, components/debug, components/widgets, components/metrics)
- Removed unused template components:
  - ecommerce/ (7 files)
  - sample-componeents/ (2 HTML files)
  - charts/bar/ and charts/line/
  - tables/BasicTables/
- Deleted deprecated file: CurrentProcessingCard.old.tsx
- Removed console.log statements from:
  - UserProfile components (UserMetaCard, UserAddressCard, UserInfoCard)
  - Automation/ConfigModal
  - ImageQueueModal (8 statements)
  - ImageGenerationCard (7 statements)
- Applied ESLint auto-fixes (9 errors fixed)
- All builds pass ✓
- TypeScript compiles without errors ✓
This commit is contained in:
IGNY8 VPS (Salman)
2026-01-09 15:22:23 +00:00
parent 7bb9d813f2
commit 0526553c9b
24 changed files with 905 additions and 2941 deletions

View File

@@ -104,8 +104,6 @@ export default function ImageGenerationCard({
}, [API_BASE_URL]);
const handleGenerate = async () => {
console.log('[ImageGenerationCard] handleGenerate called');
if (!prompt.trim()) {
toast.error('Please enter a prompt description');
return;
@@ -122,11 +120,8 @@ export default function ImageGenerationCard({
? (imageSettings.model || 'dall-e-3')
: (imageSettings.runwareModel || 'runware:97@1');
console.log('[ImageGenerationCard] Service and model:', { service, model, imageSettings });
// Build prompt with template (similar to reference plugin)
const fullPrompt = `Create a high-quality ${imageType} image. ${prompt}`;
console.log('[ImageGenerationCard] Full prompt:', fullPrompt.substring(0, 100) + '...');
const requestBody = {
prompt: fullPrompt,
@@ -138,9 +133,6 @@ export default function ImageGenerationCard({
model: model,
};
console.log('[ImageGenerationCard] Making request to image generation endpoint');
console.log('[ImageGenerationCard] Request body:', requestBody);
// fetchAPI extracts data from unified format {success: true, data: {...}}
// So data is the extracted response payload
const data = await fetchAPI('/v1/system/settings/integrations/image_generation/generate/', {
@@ -148,8 +140,6 @@ export default function ImageGenerationCard({
body: JSON.stringify(requestBody),
});
console.log('[ImageGenerationCard] Response data:', data);
// fetchAPI extracts data from unified format, so data is the response payload
// If fetchAPI didn't throw, the request was successful
if (!data || typeof data !== 'object') {
@@ -175,7 +165,6 @@ export default function ImageGenerationCard({
})
);
console.log('[ImageGenerationCard] Image generation successful:', imageData);
toast.success('Image generated successfully!');
} catch (err: any) {
console.error('[ImageGenerationCard] Error in handleGenerate:', {