From 9df52d660feb722404be00a50f3c8a612bec1c15 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 14:42:53 +0200 Subject: Migrate client to eslint --- client/src/assets/player/upnext/end-card.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'client/src/assets/player/upnext') diff --git a/client/src/assets/player/upnext/end-card.ts b/client/src/assets/player/upnext/end-card.ts index 8fabfc3fd..61668e407 100644 --- a/client/src/assets/player/upnext/end-card.ts +++ b/client/src/assets/player/upnext/end-card.ts @@ -9,7 +9,9 @@ function getMainTemplate (options: any) {
- +
@@ -22,7 +24,7 @@ function getMainTemplate (options: any) { } export interface EndCardOptions extends videojs.ComponentOptions { - next: Function, + next: () => void getTitle: () => string timeout: number cancelText: string @@ -99,11 +101,11 @@ class EndCard extends Component { return container } - showCard (cb: Function) { + showCard (cb: (value: boolean) => void) { let timeout: any - this.autoplayRing.setAttribute('stroke-dasharray', '' + this.dashOffsetStart) - this.autoplayRing.setAttribute('stroke-dashoffset', '' + -this.dashOffsetStart) + this.autoplayRing.setAttribute('stroke-dasharray', `${this.dashOffsetStart}`) + this.autoplayRing.setAttribute('stroke-dashoffset', `${-this.dashOffsetStart}`) this.title.innerHTML = this.options_.getTitle() @@ -123,7 +125,7 @@ class EndCard extends Component { }) const goToPercent = (percent: number) => { - const newOffset = Math.max(-this.dashOffsetTotal, - this.dashOffsetStart - percent * this.dashOffsetTotal / 2 / 100) + const newOffset = Math.max(-this.dashOffsetTotal, -this.dashOffsetStart - percent * this.dashOffsetTotal / 2 / 100) this.autoplayRing.setAttribute('stroke-dashoffset', '' + newOffset) } -- cgit v1.2.3