[DEV] remove unneeded variable

This commit is contained in:
Edouard DUPIN 2022-12-18 08:28:32 +01:00
parent 807f9e68c2
commit 0ea9895024
4 changed files with 3 additions and 21 deletions

View File

@ -8,7 +8,6 @@ import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { ArianeService } from 'app/service/ariane';
import { environment } from 'environments/environment';
@Component({
selector: 'app-playlist',
@ -44,11 +43,7 @@ export class PlaylistScene implements OnInit {
onSelectTrack(event: any, idSelected: number):void {
if(event.which === 2) {
if(environment.frontBaseUrl === undefined || environment.frontBaseUrl === null || environment.frontBaseUrl === '') {
window.open(`/track/${ idSelected}`);
} else {
window.open(`/${ environment.frontBaseUrl }/track/${ idSelected}`);
}
window.open(`/track/${ idSelected}`);
} else {
this.router.navigate([ `track/${ idSelected}` ]);
this.arianeService.setTrack(idSelected);

View File

@ -311,11 +311,7 @@ export class ArianeService {
}
});
if(!isNullOrUndefined(newWindows) && newWindows === true) {
if(isNullOrUndefined(environment.frontBaseUrl) || environment.frontBaseUrl === '') {
window.open(`/${ addressOffset}`);
} else {
window.open(`/${ environment.frontBaseUrl }/${ addressOffset}`);
}
window.open(`/${ addressOffset}`);
} else {
this.router.navigate([ addressOffset ], { replaceUrl: replaceCurrentPage });
}
@ -327,11 +323,7 @@ export class ArianeService {
replaceCurrentPage: boolean = false): void {
let addressOffset = `${destination }/${ id }`;
if(!isNullOrUndefined(newWindows) && newWindows === true) {
if(isNullOrUndefined(environment.frontBaseUrl) || environment.frontBaseUrl === '') {
window.open(`/${ addressOffset}/edit`);
} else {
window.open(`/${ environment.frontBaseUrl }/${ addressOffset}/edit`);
}
window.open(`/${ addressOffset}/edit`);
} else {
this.router.navigate([ `${addressOffset}/edit` ], { replaceUrl: replaceCurrentPage });
}

View File

@ -15,6 +15,5 @@ export const environment = {
ssoSignIn: `${location.origin}/karso/signin/karusic/`,
ssoSignUp: `${location.origin}/karso/signup/karusic/`,
ssoSignOut: `${location.origin}/karso/signout/karusic/`,
frontBaseUrl: '',
tokenStoredInPermanentStorage: false,
};

View File

@ -15,7 +15,6 @@ const environment_back_prod = {
ssoSignIn: 'http://192.168.1.156/karso/signin/karusic-dev/',
ssoSignUp: 'http://192.168.1.156/karso/signup/karusic-dev/',
ssoSignOut: 'http://192.168.1.156/karso/signout/karusic-dev/',
frontBaseUrl: '',
tokenStoredInPermanentStorage: false,
};
@ -31,7 +30,6 @@ const environment_local = {
ssoSignIn: 'http://192.168.1.156/karso/signin/karusic-dev/',
ssoSignUp: 'http://192.168.1.156/karso/signup/karusic-dev/',
ssoSignOut: 'http://192.168.1.156/karso/signout/karusic-dev/',
frontBaseUrl: '',
tokenStoredInPermanentStorage: false,
};
@ -47,7 +45,6 @@ const environment_full_local = {
ssoSignIn: 'http://localhost:4200/signin/karusic-dev/',
ssoSignUp: 'http://localhost:4200/signup/karusic-dev/',
ssoSignOut: 'http://localhost:4200/signout/karusic-dev/',
frontBaseUrl: '',
tokenStoredInPermanentStorage: false,
};
@ -63,7 +60,6 @@ const environment_hybrid = {
ssoSignIn: 'http://localhost:4200/signin/karusic-dev/',
ssoSignUp: 'http://localhost:4200/signup/karusic-dev/',
ssoSignOut: 'http://localhost:4200/signout/karusic-dev/',
frontBaseUrl: '',
tokenStoredInPermanentStorage: false,
};
export const environment = environment_back_prod;