92 lines
3.0 KiB
JavaScript
92 lines
3.0 KiB
JavaScript
/**
|
|
* Debug version of GenericFileManager for testing integration
|
|
*/
|
|
|
|
// Simple mock for testing without full dependency chain
|
|
export class GenericFileManager {
|
|
constructor(configType, options = {}) {
|
|
console.log(`[DEBUG] GenericFileManager created with config: ${configType}`, options);
|
|
this.configType = configType;
|
|
this.options = options;
|
|
this.isInitialized = false;
|
|
}
|
|
|
|
render(container) {
|
|
console.log(`[DEBUG] GenericFileManager render called`);
|
|
|
|
try {
|
|
// Create a simple test interface
|
|
const wrapper = document.createElement('div');
|
|
wrapper.style.cssText = `
|
|
padding: 20px;
|
|
border: 2px solid #007acc;
|
|
border-radius: 8px;
|
|
background: #1e1e1e;
|
|
color: #cccccc;
|
|
font-family: monospace;
|
|
margin: 10px 0;
|
|
`;
|
|
|
|
const title = document.createElement('h3');
|
|
title.style.cssText = `
|
|
color: #569cd6;
|
|
margin: 0 0 10px 0;
|
|
`;
|
|
title.textContent = `🧪 NEW File Manager (${this.configType})`;
|
|
|
|
const status = document.createElement('div');
|
|
status.style.cssText = `
|
|
color: #4CAF50;
|
|
font-size: 14px;
|
|
margin-bottom: 10px;
|
|
`;
|
|
status.textContent = '✅ Shared components loaded successfully!';
|
|
|
|
const info = document.createElement('div');
|
|
info.style.cssText = `
|
|
color: #888;
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
`;
|
|
info.innerHTML = `
|
|
<strong>Configuration:</strong> ${this.configType}<br>
|
|
<strong>Options:</strong> ${JSON.stringify(this.options, null, 2)}<br>
|
|
<strong>Status:</strong> Using new shared components architecture<br>
|
|
<strong>Next Steps:</strong> Ready for full implementation
|
|
`;
|
|
|
|
wrapper.appendChild(title);
|
|
wrapper.appendChild(status);
|
|
wrapper.appendChild(info);
|
|
|
|
if (container) {
|
|
container.appendChild(wrapper);
|
|
}
|
|
|
|
this.isInitialized = true;
|
|
console.log(`[DEBUG] GenericFileManager render completed successfully`);
|
|
|
|
return {
|
|
fileManager: this,
|
|
components: {
|
|
browser: null,
|
|
editor: null,
|
|
preview: null
|
|
}
|
|
};
|
|
|
|
} catch (error) {
|
|
console.error(`[DEBUG] GenericFileManager render error:`, error);
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
destroy() {
|
|
console.log(`[DEBUG] GenericFileManager destroy called`);
|
|
this.isInitialized = false;
|
|
}
|
|
}
|
|
|
|
// Export for compatibility
|
|
export default GenericFileManager;
|