Spaces:
Running
Running
File size: 1,174 Bytes
a7f24ff |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
document.addEventListener('DOMContentLoaded', () => {
console.log('CodeCraft AI Studio loaded');
// Initialize tooltips
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
// Handle theme switcher
const themeSwitcher = document.getElementById('themeSwitcher');
if (themeSwitcher) {
themeSwitcher.addEventListener('click', () => {
document.documentElement.classList.toggle('dark');
localStorage.setItem('darkMode', document.documentElement.classList.contains('dark'));
});
}
// Initialize feather icons
feather.replace();
});
// Sample function to handle project creation
function createNewProject() {
console.log('Creating new project...');
// Implementation would go here
}
// Sample function to handle file upload
function handleFileUpload(event) {
const file = event.target.files[0];
if (file) {
console.log('Uploading file:', file.name);
// Implementation would go here
}
} |