| |
|
|
| 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'; |
| import { CarbonTracker } from './components/carbon-tracker-component.js'; |
| import { ToolbarComponent } from './components/toolbar-component.js'; |
| import { StateManager } from './services/state-manager.js'; |
|
|
| |
| document.addEventListener('DOMContentLoaded', () => { |
| |
| if (document.getElementById('welcomePopup').style.display === 'none') { |
| StateManager.setConsent(true); |
| StateManager.updateProfile({ |
| ageGroup: '25-34', |
| gender: 'M', |
| roles: ['researcher'], |
| participantId: 'dev-user' |
| }); |
| } |
|
|
| |
| ChatComponent.init(); |
| FileUploadComponent.init(); |
| SettingsComponent.init(); |
| LanguageComponent.init(); |
| ConsentComponent.init(); |
| ProfileComponent.init(); |
| CommentComponent.init(); |
| FeedbackComponent.init(); |
| CarbonTracker.init(); |
| ToolbarComponent.init(); |
|
|
| |
| window.FeedbackComponent = FeedbackComponent; |
|
|
| |
| TranslationService.applyTranslation(); |
|
|
| |
| if (window.innerWidth >= 460) { |
| const details = document.querySelector('details'); |
| if (details) details.setAttribute('open', ''); |
| } |
| }); |