API: Use noOptions for parameters
Move config.service to _services/ Rationalise bootstrap and conf (WIP) Fix auth: - Add HTTP interceptor - Bootstrap after login/logout Some cleanups
This commit is contained in:
parent
8593d0b5cd
commit
4eb4c0d0dd
29 changed files with 223 additions and 296 deletions
|
@ -3,7 +3,7 @@ import { Component, OnInit } from '@angular/core'
|
|||
import { FormControl } from '@angular/forms'
|
||||
import { MatSnackBar } from '@angular/material/snack-bar'
|
||||
|
||||
import { ConfigService } from '../../config.service'
|
||||
import { ConfigService } from '../../_services/config.service'
|
||||
import { MapControlService } from '../map-control.service'
|
||||
import { TreeLayerItemComponent } from '../tree-layer-item/tree-layer-item.component'
|
||||
import { InfoDataService, TaggedLayer } from '../../info/info-data.service'
|
||||
|
@ -30,11 +30,11 @@ export class MapControlsComponent implements OnInit {
|
|||
|
||||
baseStyles: BaseStyle[]
|
||||
|
||||
baseStyleOpacity: number = this.configService.conf.value.map['opacity']
|
||||
baseStyleOpacity: number = this.configService.conf.value.bsData?.map.opacity
|
||||
|
||||
status = new FormControl([])
|
||||
|
||||
canCreateBaseMap: boolean = false
|
||||
// canCreateBaseMap: boolean = false
|
||||
|
||||
constructor(
|
||||
public snackBar: MatSnackBar,
|
||||
|
@ -42,7 +42,7 @@ export class MapControlsComponent implements OnInit {
|
|||
public mapControlService: MapControlService,
|
||||
protected infoDataService: InfoDataService,
|
||||
public mapDataService: MapDataService,
|
||||
private authenticationService: AuthenticationService,
|
||||
public authenticationService: AuthenticationService,
|
||||
public dialog: MatDialog,
|
||||
) {
|
||||
}
|
||||
|
@ -102,11 +102,11 @@ export class MapControlsComponent implements OnInit {
|
|||
this.mapControlService.status.next(value)
|
||||
}
|
||||
)
|
||||
this.status.setValue(this.configService.conf.value.map['defaultStatus'])
|
||||
this.status.setValue(this.configService.conf.value.bsData?.map['defaultStatus'])
|
||||
|
||||
this.mapControlService.baseStyleOpacity.next(this.baseStyleOpacity)
|
||||
|
||||
this.canCreateBaseMap = this.authenticationService.isAuthorized(['base_map_creator'])
|
||||
// this.canCreateBaseMap = this.authenticationService.isAuthorized(['base_map_creator'])
|
||||
}
|
||||
|
||||
openSnackBar(msg: string):void {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue