[Library|Trunk]
apply in all pages domain and baseLink changes (part 3) git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59418 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
479a76b318
commit
43ffddc480
|
@ -112,7 +112,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.properties.baseLink + this.router.url
|
"redirectUrl": this.properties.domain + this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -140,7 +140,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.properties.baseLink + this.router.url
|
"redirectUrl": this.properties.domain + this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -180,7 +180,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl":this.properties.baseLink + this.router.url
|
"redirectUrl":this.properties.domain + this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -246,7 +246,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl":this.properties.baseLink + this.router.url
|
"redirectUrl":this.properties.domain + this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -264,7 +264,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.properties.baseLink + this.router.url
|
"redirectUrl": this.properties.domain + this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -44,7 +44,9 @@ export class OpenAireJsonldConverterService {
|
||||||
searchPage["@type"] = "Website";
|
searchPage["@type"] = "Website";
|
||||||
searchPage["name"] = name;
|
searchPage["name"] = name;
|
||||||
searchPage["url"] = URL + searchRoute;
|
searchPage["url"] = URL + searchRoute;
|
||||||
|
if(logoURL && logoURL.length > 0 ) {
|
||||||
searchPage["logo"] = logoURL;
|
searchPage["logo"] = logoURL;
|
||||||
|
}
|
||||||
if (description) {
|
if (description) {
|
||||||
searchPage["description"] = description;
|
searchPage["description"] = description;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ export class PreviousRouteRecorder implements CanDeactivate<any> {
|
||||||
}
|
}
|
||||||
canDeactivate(component: any): Observable<boolean> | boolean {
|
canDeactivate(component: any): Observable<boolean> | boolean {
|
||||||
if (typeof localStorage !== 'undefined') {
|
if (typeof localStorage !== 'undefined') {
|
||||||
// console.log("In PreviousRouteRecorder : "properties.domain +properties.baseLink + this.router.url );
|
console.log("In PreviousRouteRecorder : " + properties.domain +properties.baseLink + this.router.url );
|
||||||
localStorage.setItem('previousRoute', properties.domain + properties.baseLink + this.router.url);
|
localStorage.setItem('previousRoute', properties.domain + properties.baseLink + this.router.url);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -7,6 +7,7 @@ import {REQUEST} from '@nguniversal/express-engine/tokens';
|
||||||
|
|
||||||
import {EnvProperties} from './env-properties';
|
import {EnvProperties} from './env-properties';
|
||||||
import {properties} from "../../../../environments/environment";
|
import {properties} from "../../../../environments/environment";
|
||||||
|
import {ConnectHelper} from "../../connect/connectHelper";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class EnvironmentSpecificService {
|
export class EnvironmentSpecificService {
|
||||||
|
@ -17,9 +18,13 @@ export class EnvironmentSpecificService {
|
||||||
|
|
||||||
constructor(private http: HttpClient, @Optional() @Inject(REQUEST) private request: Request) {
|
constructor(private http: HttpClient, @Optional() @Inject(REQUEST) private request: Request) {
|
||||||
if(properties.adminToolsCommunity == "connect") {
|
if(properties.adminToolsCommunity == "connect") {
|
||||||
|
if(properties.environment == "development"){
|
||||||
|
properties.domain = "https://beta."+(ConnectHelper.getCommunityFromDomain(properties.domain)?ConnectHelper.getCommunityFromDomain(properties.domain):"connect")+".openaire.eu";
|
||||||
|
}else{
|
||||||
properties.domain = "https://" + this.getDomain();
|
properties.domain = "https://" + this.getDomain();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public loadEnvironment() {
|
public loadEnvironment() {
|
||||||
this.envSpecific = properties;
|
this.envSpecific = properties;
|
||||||
|
|
Loading…
Reference in New Issue