mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00

* [CST-3763] Change base theme colors * [CST-3763] added new custom variables * [CST-3763] applied changes to the header in order to have two different navbar * [CST-3763] applied changes to breadcrumbs navbar * [CST-3763] fix sidebar colors * [CST-3763] applied changes footer in order to have two different sections * [CST-3763] change home news jumbotron background color * [CST-3763] fix issue with search-navbar.component z-index * [CST-3763] fix issue with search-form.component that didn't use the brand colo parameter * [CST-3763] fix issue with menu navbar on small window view * [CST-3763] changed position for browse all button in the access control pages * [CST-3763] Change form.component in order to have possibilities to display better additional form buttons * [CST-3763] Change confirmation-modal.component in order to allow different colors and icons for confirm button * [CST-3763] added confirmation icon * [CST-3763] fixed accessibility for admin access control components * [CST-3763] Added placeholder for search boxes * [CST-3763] Added repository logo alt label * [CST-3763] Adjust notification icons * [CST-3763] Fix issue with hideReturnButton param in edit-comcol-page.component that was not initialized on page refresh * Accessibility fix * [CST-3763] Adjust usability for community/collection edit * [CST-3763] fix error while running test * [CST-3763] Added dynamically a title prefix to all dspace page * [CST-3763] add breadcrumbs to the page where are missing * [CST-3763] fixed failed tests * [CST-3763] fixed failed e2e test * [CST-3763] fixed failed e2e test * Buttons fixes for accessibility * [CST-3973] fixed issue with redirect after changing language * Buttons and sections fixes for accessibility * Buttons and sections fixes for accessibility * [CST-3763] fixed colors for chips component * [CST-3977] fixed issue with selecting a tag submission field * [CST-3763] add breadcrumbs to the page where are missing * [CST-3763] fixed edit workflowitem buttons color * [CST-3977] removed unintentional committed log * [CST-3763] Fix issue with tab selection in item edit page * [CST-3763] Fix position of back button in the item edit page * [CST-3763] icon and colors for search and browse all buttons * [CST-3763] added atkinson font * [CST-3763] remove dspace logo from home news * [CST-3763] fix buttons colors for administrative search * [CST-3763] Change background color for user menu * [CST-3763] remove gradient from home page news component * [CST-3763] fix issue with edit dso button * [CST-3763] revert color schema * [CST-3763] remove Atkinson-Hyperlegible font * [CST-3763] fix use of header-logo-height variable * [CST-3763] fix homepage link color * [CST-3763] fix contrast color issue for navbar menu entries * [CST-3763] add variable to show/hide top footer container * [CST-3763] change dso edit button style * [CST-3763] ensure to use "back" and "save" labels * [CST-3763] Remove border from header * [CST-3763] Change header in order to have only navigation bar in a single row * Update src/app/root/root.component.html Co-authored-by: Art Lowel <art.lowel@gmail.com> * [CST-3763] Fix issue with wrong grid-breakpoints that cause issue on navbar collapsing * [CST-3763] Fix issue with language dropdown when navbar is collapsed * [CST-3763] Fix issue after merging Co-authored-by: Matteo Perelli <matteo.perelli@4science.it> Co-authored-by: Art Lowel <art.lowel@gmail.com>
169 lines
5.8 KiB
TypeScript
Executable File
169 lines
5.8 KiB
TypeScript
Executable File
import { APP_BASE_HREF, CommonModule } from '@angular/common';
|
|
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
|
|
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
|
import { EffectsModule } from '@ngrx/effects';
|
|
import { RouterStateSerializer, StoreRouterConnectingModule } from '@ngrx/router-store';
|
|
import { MetaReducer, Store, StoreModule, USER_PROVIDED_META_REDUCERS } from '@ngrx/store';
|
|
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
import { DYNAMIC_MATCHER_PROVIDERS } from '@ng-dynamic-forms/core';
|
|
import { TranslateModule } from '@ngx-translate/core';
|
|
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
|
|
|
|
import { AdminSidebarSectionComponent } from './+admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component';
|
|
import { AdminSidebarComponent } from './+admin/admin-sidebar/admin-sidebar.component';
|
|
import { ExpandableAdminSidebarSectionComponent } from './+admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component';
|
|
import { AppRoutingModule } from './app-routing.module';
|
|
import { AppComponent } from './app.component';
|
|
import { appEffects } from './app.effects';
|
|
import { appMetaReducers, debugMetaReducers } from './app.metareducers';
|
|
import { appReducers, AppState, storeModuleConfig } from './app.reducer';
|
|
import { CheckAuthenticationTokenAction } from './core/auth/auth.actions';
|
|
import { CoreModule } from './core/core.module';
|
|
import { ClientCookieService } from './core/services/client-cookie.service';
|
|
import { FooterComponent } from './footer/footer.component';
|
|
import { HeaderNavbarWrapperComponent } from './header-nav-wrapper/header-navbar-wrapper.component';
|
|
import { HeaderComponent } from './header/header.component';
|
|
import { NavbarModule } from './navbar/navbar.module';
|
|
import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component';
|
|
import { DSpaceRouterStateSerializer } from './shared/ngrx/dspace-router-state-serializer';
|
|
import { NotificationComponent } from './shared/notifications/notification/notification.component';
|
|
import { NotificationsBoardComponent } from './shared/notifications/notifications-board/notifications-board.component';
|
|
import { SharedModule } from './shared/shared.module';
|
|
import { BreadcrumbsComponent } from './breadcrumbs/breadcrumbs.component';
|
|
import { environment } from '../environments/environment';
|
|
import { BrowserModule } from '@angular/platform-browser';
|
|
import { ForbiddenComponent } from './forbidden/forbidden.component';
|
|
import { AuthInterceptor } from './core/auth/auth.interceptor';
|
|
import { LocaleInterceptor } from './core/locale/locale.interceptor';
|
|
import { XsrfInterceptor } from './core/xsrf/xsrf.interceptor';
|
|
import { RootComponent } from './root/root.component';
|
|
import { ThemedRootComponent } from './root/themed-root.component';
|
|
import { ThemedEntryComponentModule } from '../themes/themed-entry-component.module';
|
|
import { ThemedPageNotFoundComponent } from './pagenotfound/themed-pagenotfound.component';
|
|
import { ThemedForbiddenComponent } from './forbidden/themed-forbidden.component';
|
|
import { ThemedHeaderComponent } from './header/themed-header.component';
|
|
import { ThemedFooterComponent } from './footer/themed-footer.component';
|
|
import { ThemedBreadcrumbsComponent } from './breadcrumbs/themed-breadcrumbs.component';
|
|
|
|
export function getBase() {
|
|
return environment.ui.nameSpace;
|
|
}
|
|
|
|
export function getMetaReducers(): MetaReducer<AppState>[] {
|
|
return environment.debug ? [...appMetaReducers, ...debugMetaReducers] : appMetaReducers;
|
|
}
|
|
|
|
const IMPORTS = [
|
|
CommonModule,
|
|
SharedModule,
|
|
NavbarModule,
|
|
HttpClientModule,
|
|
AppRoutingModule,
|
|
CoreModule.forRoot(),
|
|
ScrollToModule.forRoot(),
|
|
NgbModule,
|
|
TranslateModule.forRoot(),
|
|
EffectsModule.forRoot(appEffects),
|
|
StoreModule.forRoot(appReducers, storeModuleConfig),
|
|
StoreRouterConnectingModule.forRoot(),
|
|
ThemedEntryComponentModule.withEntryComponents(),
|
|
];
|
|
|
|
IMPORTS.push(
|
|
StoreDevtoolsModule.instrument({
|
|
maxAge: 1000,
|
|
logOnly: environment.production,
|
|
})
|
|
);
|
|
|
|
const PROVIDERS = [
|
|
{
|
|
provide: APP_BASE_HREF,
|
|
useFactory: (getBase)
|
|
},
|
|
{
|
|
provide: USER_PROVIDED_META_REDUCERS,
|
|
useFactory: getMetaReducers,
|
|
},
|
|
{
|
|
provide: RouterStateSerializer,
|
|
useClass: DSpaceRouterStateSerializer
|
|
},
|
|
ClientCookieService,
|
|
// Check the authentication token when the app initializes
|
|
{
|
|
provide: APP_INITIALIZER,
|
|
useFactory: (store: Store<AppState>,) => {
|
|
return () => store.dispatch(new CheckAuthenticationTokenAction());
|
|
},
|
|
deps: [ Store ],
|
|
multi: true
|
|
},
|
|
// register AuthInterceptor as HttpInterceptor
|
|
{
|
|
provide: HTTP_INTERCEPTORS,
|
|
useClass: AuthInterceptor,
|
|
multi: true
|
|
},
|
|
// register LocaleInterceptor as HttpInterceptor
|
|
{
|
|
provide: HTTP_INTERCEPTORS,
|
|
useClass: LocaleInterceptor,
|
|
multi: true
|
|
},
|
|
// register XsrfInterceptor as HttpInterceptor
|
|
{
|
|
provide: HTTP_INTERCEPTORS,
|
|
useClass: XsrfInterceptor,
|
|
multi: true
|
|
},
|
|
...DYNAMIC_MATCHER_PROVIDERS,
|
|
];
|
|
|
|
const DECLARATIONS = [
|
|
AppComponent,
|
|
RootComponent,
|
|
ThemedRootComponent,
|
|
HeaderComponent,
|
|
ThemedHeaderComponent,
|
|
HeaderNavbarWrapperComponent,
|
|
AdminSidebarComponent,
|
|
AdminSidebarSectionComponent,
|
|
ExpandableAdminSidebarSectionComponent,
|
|
FooterComponent,
|
|
ThemedFooterComponent,
|
|
PageNotFoundComponent,
|
|
ThemedPageNotFoundComponent,
|
|
NotificationComponent,
|
|
NotificationsBoardComponent,
|
|
BreadcrumbsComponent,
|
|
ThemedBreadcrumbsComponent,
|
|
ForbiddenComponent,
|
|
ThemedForbiddenComponent,
|
|
];
|
|
|
|
const EXPORTS = [
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [
|
|
BrowserModule.withServerTransition({ appId: 'serverApp' }),
|
|
...IMPORTS
|
|
],
|
|
providers: [
|
|
...PROVIDERS
|
|
],
|
|
declarations: [
|
|
...DECLARATIONS,
|
|
],
|
|
exports: [
|
|
...EXPORTS,
|
|
...DECLARATIONS,
|
|
]
|
|
})
|
|
export class AppModule {
|
|
|
|
}
|