Compare commits
2 Commits
master
...
develop-hy
Author | SHA1 | Date |
---|---|---|
Konstantina Galouni | 761339d9b8 | |
Konstantina Galouni | 97d038b729 |
|
@ -30,6 +30,7 @@ import {ISVocabulariesService} from "./openaireLibrary/utils/staticAutoComplete/
|
||||||
[onlyTop]=false [user]="user"
|
[onlyTop]=false [user]="user"
|
||||||
[communityId]="properties.adminToolsCommunity" [userMenuItems]=userMenuItems [menuItems]=menuItems></navbar>
|
[communityId]="properties.adminToolsCommunity" [userMenuItems]=userMenuItems [menuItems]=menuItems></navbar>
|
||||||
<div *ngIf="loading">
|
<div *ngIf="loading">
|
||||||
|
loading... {{isClient ? "client" : "server"}}
|
||||||
<loading [full]="true"></loading>
|
<loading [full]="true"></loading>
|
||||||
</div>
|
</div>
|
||||||
<schema2jsonld *ngIf="properties" [URL]="properties.domain+properties.baseLink"
|
<schema2jsonld *ngIf="properties" [URL]="properties.domain+properties.baseLink"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {APP_ID, NgModule} from '@angular/core';
|
import {APP_ID, NgModule} from '@angular/core';
|
||||||
import {SharedModule} from './openaireLibrary/shared/shared.module';
|
import {SharedModule} from './openaireLibrary/shared/shared.module';
|
||||||
import {BrowserModule} from '@angular/platform-browser';
|
import {BrowserModule, provideClientHydration} from '@angular/platform-browser';
|
||||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||||
import {CommonModule} from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
|
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
|
||||||
|
@ -38,6 +38,7 @@ import {LoadingModule} from "./openaireLibrary/utils/loading/loading.module";
|
||||||
declarations: [AppComponent],
|
declarations: [AppComponent],
|
||||||
exports: [AppComponent],
|
exports: [AppComponent],
|
||||||
providers: [
|
providers: [
|
||||||
|
provideClientHydration(),
|
||||||
{provide: APP_ID, useValue: 'explore'},
|
{provide: APP_ID, useValue: 'explore'},
|
||||||
// {
|
// {
|
||||||
// provide: HTTP_INTERCEPTORS,
|
// provide: HTTP_INTERCEPTORS,
|
||||||
|
|
|
@ -2,10 +2,10 @@ import {
|
||||||
AfterViewInit,
|
AfterViewInit,
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
Component,
|
Component,
|
||||||
ElementRef,
|
ElementRef, Inject, makeStateKey,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
OnInit,
|
OnInit, PLATFORM_ID,
|
||||||
QueryList,
|
QueryList, TransferState,
|
||||||
ViewChild,
|
ViewChild,
|
||||||
ViewChildren
|
ViewChildren
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
@ -25,6 +25,7 @@ import {properties} from "../../environments/environment";
|
||||||
import {Numbers, NumbersComponent} from "../openaireLibrary/sharedComponents/numbers/numbers.component";
|
import {Numbers, NumbersComponent} from "../openaireLibrary/sharedComponents/numbers/numbers.component";
|
||||||
import {StringUtils} from "../openaireLibrary/utils/string-utils.class";
|
import {StringUtils} from "../openaireLibrary/utils/string-utils.class";
|
||||||
import {QuickContactService} from '../openaireLibrary/sharedComponents/quick-contact/quick-contact.service';
|
import {QuickContactService} from '../openaireLibrary/sharedComponents/quick-contact/quick-contact.service';
|
||||||
|
import {isPlatformServer} from "@angular/common";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'home',
|
selector: 'home',
|
||||||
|
@ -109,15 +110,20 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
];
|
];
|
||||||
stringUtils = new StringUtils();
|
stringUtils = new StringUtils();
|
||||||
// disableSelect: boolean = true;
|
// disableSelect: boolean = true;
|
||||||
|
|
||||||
|
public isClient: boolean = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private _router: Router,
|
private _router: Router,
|
||||||
private _piwikService: PiwikService,
|
private _piwikService: PiwikService,
|
||||||
private config: ConfigurationService, private _meta: Meta, private _title: Title, private seoService: SEOService,
|
private config: ConfigurationService, private _meta: Meta, private _title: Title, private seoService: SEOService,
|
||||||
private helper: HelperService,
|
private helper: HelperService,
|
||||||
private cdr: ChangeDetectorRef,
|
private cdr: ChangeDetectorRef,
|
||||||
private quickContactService: QuickContactService
|
private quickContactService: QuickContactService,
|
||||||
|
@Inject(PLATFORM_ID) private platform: any,
|
||||||
|
private transferState: TransferState
|
||||||
) {
|
) {
|
||||||
|
this.isClient = !isPlatformServer(this.platform);
|
||||||
let description = "OpenAIRE Explore: Over 100M of research deduplicated, 170K research software, 11M research data. One of the largest open scholarly records collection worldwide.";
|
let description = "OpenAIRE Explore: Over 100M of research deduplicated, 170K research software, 11M research data. One of the largest open scholarly records collection worldwide.";
|
||||||
let title = "OpenAIRE | Find and Share research";
|
let title = "OpenAIRE | Find and Share research";
|
||||||
this._title.setTitle(title);
|
this._title.setTitle(title);
|
||||||
|
@ -221,7 +227,12 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
this.resultTypes.values.push({name: this.openaireEntities.OTHER, id: "other", selected: false, number: 0});
|
this.resultTypes.values.push({name: this.openaireEntities.OTHER, id: "other", selected: false, number: 0});
|
||||||
}
|
}
|
||||||
if(this.numbersComponent) {
|
if(this.numbersComponent) {
|
||||||
this.numbersComponent.init(this.numbersComponent.showDatasets, this.numbersComponent.showSoftware, this.numbersComponent.showPublications, this.numbersComponent.showDatasets, this.numbersComponent.showSoftware, this.numbersComponent.showOrp, this.numbersComponent.showProjects, this.numbersComponent.showDataProviders, this.numbersComponent.showOrganizations);
|
let stateKey = makeStateKey<Numbers>("numbers");
|
||||||
|
// if(this.isClient && this.transferState.hasKey(stateKey)) {
|
||||||
|
// this.numbers = this.transferState.get(stateKey, null);
|
||||||
|
// } else {
|
||||||
|
this.numbersComponent.init(this.numbersComponent.showDatasets, this.numbersComponent.showSoftware, this.numbersComponent.showPublications, this.numbersComponent.showDatasets, this.numbersComponent.showSoftware, this.numbersComponent.showOrp, this.numbersComponent.showProjects, this.numbersComponent.showDataProviders, this.numbersComponent.showOrganizations);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8d6c45abe39953e70764bca0fb0e5446055d6325
|
Subproject commit 0aacac2de9b8779babb5ba5a2a11d3368aee463f
|
Loading…
Reference in New Issue