Customization changes: add suffix for connect and default css files, add css only in server, add property for build date
This commit is contained in:
parent
b62551e642
commit
bbe1cbe3eb
|
@ -95,9 +95,9 @@ function buildAll(res: Response = null) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
buildCss('connect');
|
||||
buildCss('default');
|
||||
properties.portalBuildTime = (new Date()).valueOf();
|
||||
buildCss('connect', properties.portalBuildTime);
|
||||
buildCss('default', properties.portalBuildTime);
|
||||
buildAll();
|
||||
|
||||
// The Express app is exported so that it can be used by serverless Functions.
|
||||
|
|
|
@ -154,9 +154,6 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
if (this.properties.environment == "production" || this.properties.environment == "development") {
|
||||
this.subscriptions.push(this.route.queryParams.subscribe(data => {
|
||||
this.previewLayout = (data['previewLayout'] && data['previewLayout'].length >0 ? data['previewLayout']: null);
|
||||
if(this.previewLayout){
|
||||
// this.initCss(this.previewLayout);
|
||||
}
|
||||
this._meta.updateTag({content: 'all', name: 'robots'});
|
||||
this.seoService.removeLinkForPrevURL();
|
||||
this.seoService.removeLinkForNextURL();
|
||||
|
@ -246,10 +243,14 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
initAdminToolCommunity(communityId) {
|
||||
if (communityId) {
|
||||
this.properties.adminToolsPortalType = "community";
|
||||
this.initLayout(communityId);
|
||||
if (typeof document === 'undefined') {
|
||||
this.initLayout(communityId);
|
||||
}
|
||||
}else{
|
||||
this.properties.adminToolsPortalType = "connect";
|
||||
this.initCss("connect");
|
||||
if (typeof document === 'undefined') {
|
||||
this.initCss("connect", this.properties.portalBuildTime);
|
||||
}
|
||||
}
|
||||
this.configurationService.initCommunityInformation(this.properties, (communityId) ? communityId : this.properties.adminToolsPortalType);
|
||||
|
||||
|
@ -267,13 +268,13 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
// this.initCss("default");
|
||||
} else {
|
||||
// this.layout.layoutOptions = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor, CustomizationOptions.getIdentity(communityId).secondaryColor);
|
||||
this.initCss("default");
|
||||
this.initCss("default", this.properties.portalBuildTime);
|
||||
}
|
||||
|
||||
},
|
||||
error => {
|
||||
this.layout.layoutOptions = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor, CustomizationOptions.getIdentity(communityId).secondaryColor);
|
||||
this.initCss("default");
|
||||
this.initCss("default", this.properties.portalBuildTime);
|
||||
}
|
||||
);
|
||||
}else if(this.previewLayout && this.previewLayout.split("-preview-")[0] == communityId){
|
||||
|
|
|
@ -116,5 +116,6 @@ export let properties: EnvProperties = {
|
|||
altMetricsAPIURL: "https://api.altmetric.com/v1/doi/",
|
||||
b2noteAPIURL: 'https://b2note.eudat.eu/',
|
||||
adminPortalURL: "https://beta.admin.connect.openaire.eu",
|
||||
myOrcidLinksPage: "/my-orcid-links"
|
||||
myOrcidLinksPage: "/my-orcid-links",
|
||||
portalBuildTime: null
|
||||
};
|
||||
|
|
|
@ -116,5 +116,6 @@ export let properties: EnvProperties = {
|
|||
altMetricsAPIURL: "https://api.altmetric.com/v1/doi/",
|
||||
b2noteAPIURL: 'https://b2note.eudat.eu/',
|
||||
adminPortalURL: "https://admin.connect.openaire.eu",
|
||||
myOrcidLinksPage: "/my-orcid-links"
|
||||
myOrcidLinksPage: "/my-orcid-links",
|
||||
portalBuildTime: null
|
||||
};
|
||||
|
|
|
@ -121,5 +121,6 @@ export let properties: EnvProperties = {
|
|||
altMetricsAPIURL: 'https://api.altmetric.com/v1/doi/',
|
||||
b2noteAPIURL: 'https://b2note.eudat.eu/',
|
||||
adminPortalURL: 'https://beta.admin.connect.openaire.eu',
|
||||
myOrcidLinksPage: "/my-orcid-links"
|
||||
myOrcidLinksPage: "/my-orcid-links",
|
||||
portalBuildTime: null
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue