Skip to content

Commit

Permalink
refactor: move the offline configuration in app options
Browse files Browse the repository at this point in the history
  • Loading branch information
alecarn committed Nov 11, 2024
1 parent 68036be commit 45bdaf2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/app/pages/portal/portal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { BehaviorSubject, Subscription, combineLatest, of } from 'rxjs';
import { debounceTime, first, pairwise, skipWhile, take } from 'rxjs/operators';
import { getAppVersion } from 'src/app/app.utils';
import { environment } from 'src/environments/environment';
import { EnvironmentOptions } from 'src/environments/environnement.interface';

import { ExpansionPanelButtonComponent } from './expansion-panel/expansion-panel-button/expansion-panel-button.component';
Expand Down Expand Up @@ -598,7 +597,7 @@ export class PortalComponent implements OnInit, OnDestroy {
.subscribe(() => this.computeToastPanelOffsetX());

if (
environment.igo.offline?.enable &&
this.appConfig.app.offline?.enable &&
this.appConfig.importExport?.configFileToGeoDBService
) {
this.configFileToGeoDBService?.load(
Expand Down
6 changes: 3 additions & 3 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export const environment: AppEnvironmentOptions = {
},
pwa: {
enabled: false
},
offline: {
enable: true
}
},
auth: {
Expand Down Expand Up @@ -238,9 +241,6 @@ export const environment: AppEnvironmentOptions = {
tourInMobile: true,
pathToConfigFile: './config/interactiveTour.json'
},
offline: {
enable: true
},
importExport: {
importWithStyle: false,
url: '/apis/ogre',
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ bootstrapApplication(AppComponent, {
withMicrosoftSupport('add'),
withMicrosoftSupport('b2c')
),
provideOffline(environment.igo.offline),
provideOffline(environment.igo.app.offline),
provideIcon(),
provideTheme(),
RouteService,
Expand Down

0 comments on commit 45bdaf2

Please sign in to comment.