Skip to content

Commit

Permalink
fix(user-button): show buttons only if api
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau committed Oct 30, 2019
1 parent 5ad989f commit adad9b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div *ngIf="visible" class="igo-user-button-container">
<div class="igo-user-button-more-container" [@userButtonState]="expand ? 'expand' : 'collapse'">

<igo-poi-button [color]="color" [map]="map"></igo-poi-button>
<igo-bookmark-button [color]="color" [map]="map"></igo-bookmark-button>
<igo-poi-button *ngIf="hasApi" [color]="color" [map]="map"></igo-poi-button>
<igo-bookmark-button *ngIf="hasApi" [color]="color" [map]="map"></igo-bookmark-button>

<button
mat-icon-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ export class UserButtonComponent {

public expand = false;
public visible = false;
public hasApi = false;

constructor(
private dialog: MatDialog,
private config: ConfigService,
public auth: AuthService
) {
this.visible = this.config.getConfig('auth') ? true : false;
this.hasApi = this.config.getConfig('context.url') !== undefined;
}

accountClick() {
Expand Down

0 comments on commit adad9b1

Please sign in to comment.