[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:
argiro.kokogiannaki 2020-09-18 13:26:15 +00:00
parent 479a76b318
commit 43ffddc480
4 changed files with 15 additions and 8 deletions

View File

@ -112,7 +112,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.properties.baseLink + this.router.url
"redirectUrl": this.properties.domain + this.properties.baseLink + this.router.url
}
});
} else {
@ -140,7 +140,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.properties.baseLink + this.router.url
"redirectUrl": this.properties.domain + this.properties.baseLink + this.router.url
}
});
} else {
@ -180,7 +180,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl":this.properties.baseLink + this.router.url
"redirectUrl":this.properties.domain + this.properties.baseLink + this.router.url
}
});
} else {
@ -246,7 +246,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl":this.properties.baseLink + this.router.url
"redirectUrl":this.properties.domain + this.properties.baseLink + this.router.url
}
});
} else {
@ -264,7 +264,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.properties.baseLink + this.router.url
"redirectUrl": this.properties.domain + this.properties.baseLink + this.router.url
}
});
} else {

View File

@ -44,7 +44,9 @@ export class OpenAireJsonldConverterService {
searchPage["@type"] = "Website";
searchPage["name"] = name;
searchPage["url"] = URL + searchRoute;
searchPage["logo"] = logoURL;
if(logoURL && logoURL.length > 0 ) {
searchPage["logo"] = logoURL;
}
if (description) {
searchPage["description"] = description;
}

View File

@ -12,7 +12,7 @@ export class PreviousRouteRecorder implements CanDeactivate<any> {
}
canDeactivate(component: any): Observable<boolean> | boolean {
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);
}
return true;

View File

@ -7,6 +7,7 @@ import {REQUEST} from '@nguniversal/express-engine/tokens';
import {EnvProperties} from './env-properties';
import {properties} from "../../../../environments/environment";
import {ConnectHelper} from "../../connect/connectHelper";
@Injectable()
export class EnvironmentSpecificService {
@ -17,7 +18,11 @@ export class EnvironmentSpecificService {
constructor(private http: HttpClient, @Optional() @Inject(REQUEST) private request: Request) {
if(properties.adminToolsCommunity == "connect") {
properties.domain = "https://" + this.getDomain();
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();
}
}
}