Skip to content

Commit

Permalink
Upgrade helix-front to Angular 7.2 (#2087)
Browse files Browse the repository at this point in the history
Fix security vulnerabilities in helix-front dependencies.
Upgrade helix-front dependencies to improve contributor productivity.
  • Loading branch information
micahstubbs committed Jun 1, 2022
1 parent a0999cd commit ed990b8
Show file tree
Hide file tree
Showing 6 changed files with 4,313 additions and 3,050 deletions.
11 changes: 7 additions & 4 deletions helix-front/client/app/cluster/cluster.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { MediaChange, ObservableMedia } from '@angular/flex-layout';
import { MediaChange, MediaObserver } from '@angular/flex-layout';

@Component({
selector: 'hi-cluster',
Expand All @@ -13,15 +13,18 @@ export class ClusterComponent implements OnInit {
isNarrowView: boolean;

constructor(
protected media: ObservableMedia
protected media: MediaObserver
) { }

ngOnInit() {
// auto adjust side nav only if not embed
this.isNarrowView = (this.media.isActive('xs') || this.media.isActive('sm'));

this.media.subscribe((change: MediaChange) => {
this.isNarrowView = (change.mqAlias === 'xs' || change.mqAlias === 'sm');
this.media.asObservable().subscribe((change: MediaChange[]) => {
change.forEach((item) => {
this.isNarrowView = (item.mqAlias === 'xs' || item.mqAlias === 'sm');
})

});
}

Expand Down
2 changes: 1 addition & 1 deletion helix-front/client/app/core/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class UserService {
private http: HttpClient
) { }

public getCurrentUser(): Observable<string | object> {
public getCurrentUser(): Observable<unknown> {
return this.http
.get(`${ Settings.userAPI }/current`, { headers: this.getHeaders() }).pipe(
catchError(_ => _));
Expand Down
1 change: 0 additions & 1 deletion helix-front/client/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import 'core-js/es6/array';

/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';


/** ALL Firefox browsers require the following to support `@angular/animation`. **/
Expand Down
Loading

0 comments on commit ed990b8

Please sign in to comment.