]>
Commit | Line | Data |
---|---|---|
67ed6552 | 1 | import 'focus-visible' |
1d22d251 | 2 | import { environment } from 'src/environments/environment' |
67ed6552 | 3 | import { APP_BASE_HREF, registerLocaleData } from '@angular/common' |
68f6c87a | 4 | import { NgModule } from '@angular/core' |
df98563e | 5 | import { BrowserModule } from '@angular/platform-browser' |
1d22d251 | 6 | import { ServiceWorkerModule } from '@angular/service-worker' |
63ac2857 | 7 | import { ServerService } from '@app/core' |
67ed6552 | 8 | import localeOc from '@app/helpers/locales/oc' |
ecb4e35f | 9 | import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core' |
df98563e C |
10 | import { AppRoutingModule } from './app-routing.module' |
11 | import { AppComponent } from './app.component' | |
df98563e | 12 | import { CoreModule } from './core' |
f0b56fdd | 13 | import { EmptyComponent } from './empty.component' |
5fb2e288 | 14 | import { HeaderComponent, SearchTypeaheadComponent, SuggestionComponent } from './header' |
1942f11d | 15 | import { HighlightPipe } from './header/highlight.pipe' |
1d22d251 | 16 | import { LanguageChooserComponent, MenuComponent, NotificationComponent } from './menu' |
67ed6552 C |
17 | import { ConfirmComponent } from './modal/confirm.component' |
18 | import { CustomModalComponent } from './modal/custom-modal.component' | |
19 | import { InstanceConfigWarningModalComponent } from './modal/instance-config-warning-modal.component' | |
20 | import { QuickSettingsModalComponent } from './modal/quick-settings-modal.component' | |
21 | import { WelcomeModalComponent } from './modal/welcome-modal.component' | |
22 | import { SharedFormModule } from './shared/shared-forms' | |
23 | import { SharedGlobalIconModule } from './shared/shared-icons' | |
24 | import { SharedInstanceModule } from './shared/shared-instance' | |
25 | import { SharedMainModule } from './shared/shared-main' | |
26 | import { SharedUserInterfaceSettingsModule } from './shared/shared-user-settings' | |
2a39506c C |
27 | |
28 | registerLocaleData(localeOc, 'oc') | |
693b1aba | 29 | |
ab32b0fc C |
30 | @NgModule({ |
31 | bootstrap: [ AppComponent ], | |
67ed6552 | 32 | |
ab32b0fc | 33 | declarations: [ |
b33f657c | 34 | AppComponent, |
f0b56fdd | 35 | EmptyComponent, |
b33f657c C |
36 | |
37 | MenuComponent, | |
8afc19a6 | 38 | LanguageChooserComponent, |
d3217560 | 39 | QuickSettingsModalComponent, |
51a83970 | 40 | NotificationComponent, |
43d0ea7f | 41 | HeaderComponent, |
f409f0c3 | 42 | SearchTypeaheadComponent, |
6af662a5 | 43 | SuggestionComponent, |
1942f11d | 44 | HighlightPipe, |
43d0ea7f | 45 | |
437e8e06 | 46 | CustomModalComponent, |
43d0ea7f | 47 | WelcomeModalComponent, |
67ed6552 C |
48 | InstanceConfigWarningModalComponent, |
49 | ConfirmComponent | |
ab32b0fc | 50 | ], |
67ed6552 | 51 | |
693b1aba | 52 | imports: [ |
ab32b0fc | 53 | BrowserModule, |
1d22d251 | 54 | ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }), |
23bcf666 | 55 | |
693b1aba | 56 | CoreModule, |
67ed6552 C |
57 | SharedMainModule, |
58 | SharedFormModule, | |
59 | SharedUserInterfaceSettingsModule, | |
60 | SharedGlobalIconModule, | |
61 | SharedInstanceModule, | |
693b1aba | 62 | |
55b33946 C |
63 | MetaModule.forRoot({ |
64 | provide: MetaLoader, | |
399b3bc9 C |
65 | useFactory: (serverService: ServerService) => { |
66 | return new MetaStaticLoader({ | |
67 | pageTitlePositioning: PageTitlePositioning.PrependPageTitle, | |
68 | pageTitleSeparator: ' - ', | |
69 | get applicationName () { return serverService.getTmpConfig().instance.name }, | |
70 | defaults: { | |
71 | get title () { return serverService.getTmpConfig().instance.name }, | |
72 | get description () { return serverService.getTmpConfig().instance.shortDescription } | |
73 | } | |
74 | }) | |
75 | }, | |
63ac2857 | 76 | deps: [ ServerService ] |
a51bad1a C |
77 | }), |
78 | ||
a9614776 | 79 | AppRoutingModule // Put it after all the module because it has the 404 route |
ab32b0fc | 80 | ], |
361dcebc | 81 | |
989e526a | 82 | providers: [ |
8cc56c7f C |
83 | { |
84 | provide: APP_BASE_HREF, | |
85 | useValue: '/' | |
66357162 | 86 | } |
989e526a | 87 | ] |
ab32b0fc | 88 | }) |
63c4db6d | 89 | export class AppModule {} |