Small code style fixs

This commit is contained in:
Zoe Roux 2021-03-06 22:53:30 +01:00
parent 833458ac60
commit d36e332bcb
4 changed files with 16 additions and 16 deletions

View File

@ -1,20 +1,19 @@
import { Component, Input, QueryList, ViewChild, ViewChildren } from "@angular/core";
import { Component, Input, QueryList, ViewChildren } from "@angular/core";
import { MatMenuTrigger } from "@angular/material/menu";
import { DomSanitizer } from "@angular/platform-browser";
import { first } from "rxjs/operators";
import { DomSanitizer, SafeStyle } from "@angular/platform-browser";
import { Episode } from "../../models/resources/episode";
import { HorizontalScroller } from "../../misc/horizontal-scroller";
import { Page } from "../../models/page";
import { HttpClient } from "@angular/common/http";
@Component({
selector: 'app-episodes-list',
templateUrl: './episodes-list.component.html',
styleUrls: ['./episodes-list.component.scss']
selector: "app-episodes-list",
templateUrl: "./episodes-list.component.html",
styleUrls: ["./episodes-list.component.scss"]
})
export class EpisodesListComponent extends HorizontalScroller
{
@Input() displayShowTitle: boolean = false;
@Input() displayShowTitle = false;
@Input() episodes: Page<Episode>;
@ViewChildren(MatMenuTrigger) menus: QueryList<MatMenuTrigger>;
openedIndex: number = undefined;
@ -24,7 +23,7 @@ export class EpisodesListComponent extends HorizontalScroller
super();
}
sanitize(url: string)
sanitize(url: string): SafeStyle
{
return this.sanitizer.bypassSecurityTrustStyle("url(" + url + ")");
}

View File

@ -78,7 +78,7 @@
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
margin-bottom: 0px;
margin-bottom: 0;
&.role
{

View File

@ -1,7 +1,8 @@
import {Directive, ElementRef, HostListener, Input} from '@angular/core';
import { Directive, ElementRef, HostListener, Input } from "@angular/core";
/* tslint:disable:directive-selector */
@Directive({
selector: 'img[fallback]'
selector: "img[fallback]"
})
export class FallbackDirective
{
@ -10,7 +11,7 @@ export class FallbackDirective
constructor(private img: ElementRef) { }
@HostListener("error")
onError()
onError(): void
{
const html: HTMLImageElement = this.img.nativeElement;
html.src = this.fallback;