qyle's picture
feedback component
eebe76e verified
// app.js - Main application initialization
import { ChatComponent } from './components/chat-component.js';
import { FileUploadComponent } from './components/file-upload-component.js';
import { SettingsComponent } from './components/settings-component.js';
import { LanguageComponent } from './components/language-component.js';
import { ConsentComponent } from './components/consent-component.js';
import { ProfileComponent } from './components/profile-component.js';
import { CommentComponent } from './components/comment-component.js';
import { FeedbackComponent } from './components/feedback-component.js';
import { TranslationService } from './services/translation-service.js';
// Initialize the application when DOM is ready
document.addEventListener('DOMContentLoaded', () => {
// Initialize all components
ChatComponent.init();
FileUploadComponent.init();
SettingsComponent.init();
LanguageComponent.init();
ConsentComponent.init();
ProfileComponent.init();
CommentComponent.init();
FeedbackComponent.init();
// Make FeedbackComponent globally accessible for chat component
window.FeedbackComponent = FeedbackComponent;
// Apply initial translations
TranslationService.applyTranslation();
// Open the details element by default on desktop only
if (window.innerWidth >= 460) {
const details = document.querySelector('details');
if (details) details.setAttribute('open', '');
}
});