-
Notifications
You must be signed in to change notification settings - Fork 566
Expand file tree
/
Copy pathhome-page.component.ts
More file actions
63 lines (57 loc) · 2.15 KB
/
Copy pathhome-page.component.ts
File metadata and controls
63 lines (57 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { NgTemplateOutlet } from '@angular/common';
import {
Component,
Inject,
OnInit,
} from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import {
APP_CONFIG,
AppConfig,
} from '@dspace/config/app-config.interface';
import { Site } from '@dspace/core/shared/site.model';
import { TranslateModule } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { SuggestionsPopupComponent } from '../notifications/suggestions/popup/suggestions-popup.component';
import { ThemedConfigurationSearchPageComponent } from '../search-page/themed-configuration-search-page.component';
import { ThemedSearchFormComponent } from '../shared/search-form/themed-search-form.component';
import { GeoIpWarningComponent } from './geoip-warning/geoip-warning.component';
import { HomeCoarComponent } from './home-coar/home-coar.component';
import { ThemedHomeNewsComponent } from './home-news/themed-home-news.component';
import { RecentItemListComponent } from './recent-item-list/recent-item-list.component';
import { ThemedTopLevelCommunityListComponent } from './top-level-community-list/themed-top-level-community-list.component';
@Component({
selector: 'ds-base-home-page',
styleUrls: ['./home-page.component.scss'],
templateUrl: './home-page.component.html',
imports: [
GeoIpWarningComponent,
HomeCoarComponent,
NgTemplateOutlet,
RecentItemListComponent,
SuggestionsPopupComponent,
ThemedConfigurationSearchPageComponent,
ThemedHomeNewsComponent,
ThemedSearchFormComponent,
ThemedTopLevelCommunityListComponent,
TranslateModule,
],
})
export class HomePageComponent implements OnInit {
site$: Observable<Site>;
recentSubmissionspageSize: number;
showDiscoverFilters: boolean;
constructor(
@Inject(APP_CONFIG) protected appConfig: AppConfig,
protected route: ActivatedRoute,
) {
this.recentSubmissionspageSize = this.appConfig.homePage.recentSubmissions.pageSize;
this.showDiscoverFilters = this.appConfig.homePage.showDiscoverFilters;
}
ngOnInit(): void {
this.site$ = this.route.data.pipe(
map((data) => data.site as Site),
);
}
}