mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-12 04:23:04 +00:00
Autofix lint issues
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
import { Component, HostListener, Inject, Injector, OnInit } from '@angular/core';
|
||||
import { NavbarSectionComponent } from '../navbar-section/navbar-section.component';
|
||||
import { MenuService } from '../../shared/menu/menu.service';
|
||||
import { slide } from '../../shared/animations/slide';
|
||||
import { first } from 'rxjs/operators';
|
||||
import { HostWindowService } from '../../shared/host-window.service';
|
||||
import { MenuID } from '../../shared/menu/menu-id.model';
|
||||
import {
|
||||
Component,
|
||||
HostListener,
|
||||
Inject,
|
||||
Injector,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { first } from 'rxjs/operators';
|
||||
|
||||
import { slide } from '../../shared/animations/slide';
|
||||
import { HostWindowService } from '../../shared/host-window.service';
|
||||
import { MenuService } from '../../shared/menu/menu.service';
|
||||
import { MenuID } from '../../shared/menu/menu-id.model';
|
||||
import { NavbarSectionComponent } from '../navbar-section/navbar-section.component';
|
||||
|
||||
/**
|
||||
* Represents an expandable section in the navbar
|
||||
@@ -40,7 +47,7 @@ export class ExpandableNavbarSectionComponent extends NavbarSectionComponent imp
|
||||
@HostListener('window:resize', ['$event'])
|
||||
onResize() {
|
||||
this.isMobile$.pipe(
|
||||
first()
|
||||
first(),
|
||||
).subscribe((isMobile) => {
|
||||
// When switching between desktop and mobile active sections should be deactivated
|
||||
if (isMobile !== this.wasMobile) {
|
||||
@@ -71,7 +78,7 @@ export class ExpandableNavbarSectionComponent extends NavbarSectionComponent imp
|
||||
*/
|
||||
onMouseEnter($event: Event, isActive: boolean) {
|
||||
this.isMobile$.pipe(
|
||||
first()
|
||||
first(),
|
||||
).subscribe((isMobile) => {
|
||||
if (!isMobile && !isActive && !this.mouseEntered) {
|
||||
this.activateSection($event);
|
||||
@@ -87,7 +94,7 @@ export class ExpandableNavbarSectionComponent extends NavbarSectionComponent imp
|
||||
*/
|
||||
onMouseLeave($event: Event, isActive: boolean) {
|
||||
this.isMobile$.pipe(
|
||||
first()
|
||||
first(),
|
||||
).subscribe((isMobile) => {
|
||||
if (!isMobile && isActive && this.mouseEntered) {
|
||||
this.deactivateSection($event);
|
||||
|
Reference in New Issue
Block a user