Sengi-Windows-MacOS-Linux/src/app/app.module.ts

200 lines
11 KiB
TypeScript
Raw Normal View History

2018-03-17 04:52:10 +01:00
import { BrowserModule } from "@angular/platform-browser";
2019-08-25 04:47:54 +02:00
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
2018-03-17 04:52:10 +01:00
import { HttpModule } from "@angular/http";
2018-09-08 05:17:19 +02:00
import { HttpClientModule } from '@angular/common/http';
2018-09-23 19:40:29 +02:00
import { NgModule, APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
2023-08-05 08:07:34 +02:00
// import { NgxElectronModule } from 'ngx-electron';
2018-03-15 01:48:52 +01:00
2018-08-07 03:07:28 +02:00
import { NgxsModule } from '@ngxs/store';
import { NgxsStoragePluginModule } from '@ngxs/storage-plugin';
2019-07-27 23:01:47 +02:00
import { OverlayModule } from '@angular/cdk/overlay';
2018-08-07 03:07:28 +02:00
2019-01-29 03:29:13 +01:00
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
2019-07-01 22:30:28 +02:00
import { ContextMenuModule } from 'ngx-contextmenu';
2019-07-27 23:01:47 +02:00
import { PickerModule } from '@ctrl/ngx-emoji-mart';
2019-08-25 04:47:54 +02:00
import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';
2019-09-28 06:32:55 +02:00
import { HotkeyModule } from 'angular2-hotkeys';
2019-01-29 03:29:13 +01:00
2018-03-17 04:52:10 +01:00
import { AppComponent } from "./app.component";
import { LeftSideBarComponent } from "./components/left-side-bar/left-side-bar.component";
import { StreamsMainDisplayComponent } from "./pages/streams-main-display/streams-main-display.component";
import { StreamComponent } from "./components/stream/stream.component";
import { StreamsSelectionFooterComponent } from "./components/streams-selection-footer/streams-selection-footer.component";
2020-03-07 20:54:44 +01:00
// import { RegisterNewAccountComponent } from "./pages/register-new-account/register-new-account.component";
2018-03-17 04:52:10 +01:00
import { AuthService } from "./services/auth.service";
import { StreamingService } from "./services/streaming.service";
2018-08-15 03:32:13 +02:00
import { RegisteredAppsState } from "./states/registered-apps.state";
2018-09-09 07:29:23 +02:00
import { AccountsState } from "./states/accounts.state";
2018-09-22 05:15:02 +02:00
import { AccountIconComponent } from './components/left-side-bar/account-icon/account-icon.component';
2018-09-10 03:55:16 +02:00
import { NavigationService } from "./services/navigation.service";
import { FloatingColumnComponent } from './components/floating-column/floating-column.component';
import { StreamsState } from "./states/streams.state";
import { StatusComponent } from "./components/stream/status/status.component";
import { MastodonService } from "./services/mastodon.service";
import { MastodonWrapperService } from "./services/mastodon-wrapper.service";
2018-09-21 05:27:04 +02:00
import { AttachementsComponent } from './components/stream/status/attachements/attachements.component';
2018-09-22 06:22:51 +02:00
import { SettingsComponent } from './components/floating-column/settings/settings.component';
import { AddNewAccountComponent } from './components/floating-column/add-new-account/add-new-account.component';
import { SearchComponent } from './components/floating-column/search/search.component';
import { AddNewStatusComponent } from "./components/floating-column/add-new-status/add-new-status.component";
import { ManageAccountComponent } from "./components/floating-column/manage-account/manage-account.component";
import { ActionBarComponent } from './components/stream/status/action-bar/action-bar.component';
2018-10-02 03:44:59 +02:00
import { WaitingAnimationComponent } from './components/waiting-animation/waiting-animation.component';
import { UserProfileComponent } from './components/stream/user-profile/user-profile.component';
import { ThreadComponent } from './components/stream/thread/thread.component';
import { HashtagComponent } from './components/stream/hashtag/hashtag.component';
import { StreamOverlayComponent } from './components/stream/stream-overlay/stream-overlay.component';
import { DatabindedTextComponent } from './components/stream/status/databinded-text/databinded-text.component';
2018-11-02 03:58:43 +01:00
import { TimeAgoPipe } from './pipes/time-ago.pipe';
import { StreamStatusesComponent } from './components/stream/stream-statuses/stream-statuses.component';
import { StreamEditionComponent } from './components/stream/stream-edition/stream-edition.component';
2019-02-11 02:48:34 +01:00
import { TutorialComponent } from './components/tutorial/tutorial.component';
import { NotificationHubComponent } from './components/notification-hub/notification-hub.component';
import { NotificationService } from "./services/notification.service";
2019-02-25 06:04:09 +01:00
import { MediaViewerComponent } from './components/media-viewer/media-viewer.component';
import { CreateStatusComponent } from './components/create-status/create-status.component';
2019-03-08 05:50:33 +01:00
import { MediaComponent } from './components/create-status/media/media.component';
import { MyAccountComponent } from './components/floating-column/manage-account/my-account/my-account.component';
import { FavoritesComponent } from './components/floating-column/manage-account/favorites/favorites.component';
import { DirectMessagesComponent } from './components/floating-column/manage-account/direct-messages/direct-messages.component';
import { MentionsComponent } from './components/floating-column/manage-account/mentions/mentions.component';
import { NotificationsComponent } from './components/floating-column/manage-account/notifications/notifications.component';
2019-04-01 00:30:38 +02:00
import { SettingsState } from './states/settings.state';
2019-04-25 22:52:14 +02:00
import { AccountEmojiPipe } from './pipes/account-emoji.pipe';
2019-05-02 11:26:38 +02:00
import { CardComponent } from './components/stream/status/card/card.component';
2019-05-20 02:07:28 +02:00
import { ListEditorComponent } from './components/floating-column/manage-account/my-account/list-editor/list-editor.component';
import { ListAccountComponent } from './components/floating-column/manage-account/my-account/list-editor/list-account/list-account.component';
2019-06-03 07:33:07 +02:00
import { PollComponent } from './components/stream/status/poll/poll.component';
2019-06-07 01:28:45 +02:00
import { TimeLeftPipe } from './pipes/time-left.pipe';
2019-07-23 04:30:29 +02:00
import { AutosuggestComponent } from './components/create-status/autosuggest/autosuggest.component';
2019-07-27 23:01:47 +02:00
import { EmojiPickerComponent } from './components/create-status/emoji-picker/emoji-picker.component';
import { StatusUserContextMenuComponent } from './components/stream/status/action-bar/status-user-context-menu/status-user-context-menu.component';
import { StatusSchedulerComponent } from './components/create-status/status-scheduler/status-scheduler.component';
import { PollEditorComponent } from './components/create-status/poll-editor/poll-editor.component';
2019-08-24 06:55:01 +02:00
import { PollEntryComponent } from './components/create-status/poll-editor/poll-entry/poll-entry.component';
2019-08-25 07:43:47 +02:00
import { ScheduledStatusesComponent } from './components/floating-column/scheduled-statuses/scheduled-statuses.component';
import { ScheduledStatusComponent } from './components/floating-column/scheduled-statuses/scheduled-status/scheduled-status.component';
2019-11-17 04:57:33 +01:00
import { StreamNotificationsComponent } from './components/stream/stream-notifications/stream-notifications.component';
2019-11-19 05:54:11 +01:00
import { NotificationComponent } from './components/floating-column/manage-account/notifications/notification/notification.component';
2020-02-26 04:52:50 +01:00
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';
2020-03-14 07:56:07 +01:00
import { BookmarksComponent } from './components/floating-column/manage-account/bookmarks/bookmarks.component';
2020-04-15 04:12:07 +02:00
import { AttachementImageComponent } from './components/stream/status/attachements/attachement-image/attachement-image.component';
2020-05-21 07:02:34 +02:00
import { EnsureHttpsPipe } from './pipes/ensure-https.pipe';
import { UserFollowsComponent } from './components/stream/user-follows/user-follows.component';
2020-06-15 02:53:20 +02:00
import { AccountComponent } from './components/common/account/account.component';
import { TutorialEnhancedComponent } from './components/tutorial-enhanced/tutorial-enhanced.component';
2020-05-02 06:00:31 +02:00
import { NotificationsTutorialComponent } from './components/tutorial-enhanced/notifications-tutorial/notifications-tutorial.component';
2020-05-06 00:50:16 +02:00
import { LabelsTutorialComponent } from './components/tutorial-enhanced/labels-tutorial/labels-tutorial.component';
2020-09-12 19:47:07 +02:00
import { ThankyouTutorialComponent } from './components/tutorial-enhanced/thankyou-tutorial/thankyou-tutorial.component';
2023-08-05 04:57:06 +02:00
import { StatusTranslateComponent } from './components/stream/status/status-translate/status-translate.component';
2018-03-15 01:48:52 +01:00
const routes: Routes = [
2020-03-07 20:54:44 +01:00
{ path: "", component: StreamsMainDisplayComponent },
// { path: "home", component: StreamsMainDisplayComponent },
// { path: "register", component: RegisterNewAccountComponent },
{ path: "**", redirectTo: "" }
];
2018-03-15 01:48:52 +01:00
@NgModule({
2019-07-27 23:01:47 +02:00
declarations: [
AppComponent,
LeftSideBarComponent,
StreamsMainDisplayComponent,
StreamComponent,
StreamsSelectionFooterComponent,
StatusComponent,
2020-03-07 20:54:44 +01:00
// RegisterNewAccountComponent,
2019-07-27 23:01:47 +02:00
AccountIconComponent,
FloatingColumnComponent,
ManageAccountComponent,
AddNewStatusComponent,
AttachementsComponent,
SettingsComponent,
AddNewAccountComponent,
SearchComponent,
ActionBarComponent,
WaitingAnimationComponent,
UserProfileComponent,
ThreadComponent,
HashtagComponent,
StreamOverlayComponent,
DatabindedTextComponent,
TimeAgoPipe,
StreamStatusesComponent,
StreamEditionComponent,
TutorialComponent,
NotificationHubComponent,
MediaViewerComponent,
CreateStatusComponent,
MediaComponent,
MyAccountComponent,
FavoritesComponent,
DirectMessagesComponent,
MentionsComponent,
NotificationsComponent,
AccountEmojiPipe,
CardComponent,
ListEditorComponent,
ListAccountComponent,
PollComponent,
TimeLeftPipe,
AutosuggestComponent,
EmojiPickerComponent,
StatusUserContextMenuComponent,
StatusSchedulerComponent,
2019-08-24 06:55:01 +02:00
PollEditorComponent,
2019-08-25 07:43:47 +02:00
PollEntryComponent,
ScheduledStatusesComponent,
2019-11-17 04:57:33 +01:00
ScheduledStatusComponent,
2019-11-19 05:54:11 +01:00
StreamNotificationsComponent,
2020-03-14 07:56:07 +01:00
NotificationComponent,
2020-04-15 04:12:07 +02:00
BookmarksComponent,
2020-05-21 07:02:34 +02:00
AttachementImageComponent,
EnsureHttpsPipe,
2020-06-15 02:53:20 +02:00
UserFollowsComponent,
2020-09-12 04:36:36 +02:00
AccountComponent,
2020-05-02 06:00:31 +02:00
TutorialEnhancedComponent,
2020-05-06 00:50:16 +02:00
NotificationsTutorialComponent,
2020-09-12 19:47:07 +02:00
LabelsTutorialComponent,
2023-08-05 04:57:06 +02:00
ThankyouTutorialComponent,
StatusTranslateComponent
2019-07-27 23:01:47 +02:00
],
entryComponents: [
EmojiPickerComponent
],
imports: [
FontAwesomeModule,
BrowserModule,
2019-08-25 04:47:54 +02:00
BrowserAnimationsModule,
2019-07-27 23:01:47 +02:00
HttpModule,
HttpClientModule,
FormsModule,
ReactiveFormsModule,
2019-07-27 23:01:47 +02:00
PickerModule,
2022-11-19 18:16:31 +01:00
OwlDateTimeModule,
2019-08-25 04:47:54 +02:00
OwlNativeDateTimeModule,
2019-07-27 23:01:47 +02:00
OverlayModule,
2023-08-05 08:07:34 +02:00
// NgxElectronModule,
2019-07-27 23:01:47 +02:00
RouterModule.forRoot(routes),
2018-08-07 03:07:28 +02:00
2019-07-27 23:01:47 +02:00
NgxsModule.forRoot([
RegisteredAppsState,
AccountsState,
StreamsState,
SettingsState
2020-03-29 00:14:02 +01:00
]),
//], { developmentMode: !environment.production }),
2019-07-27 23:01:47 +02:00
NgxsStoragePluginModule.forRoot(),
2019-09-28 06:32:55 +02:00
ContextMenuModule.forRoot(),
2020-02-26 04:52:50 +01:00
HotkeyModule.forRoot(),
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })
2019-07-27 23:01:47 +02:00
],
providers: [AuthService, NavigationService, NotificationService, MastodonWrapperService, MastodonService, StreamingService],
2019-07-27 23:01:47 +02:00
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
2018-03-15 01:48:52 +01:00
})
export class AppModule { }