diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-17 14:42:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-18 08:35:06 +0200 |
commit | 9df52d660feb722404be00a50f3c8a612bec1c15 (patch) | |
tree | dde52880fa012874d24c60f64eb596b0a789cc8b /client/src/assets/player/upnext | |
parent | adb8809d43648ea0a64d6845bb39aa3bd0e005a6 (diff) | |
download | PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.tar.gz PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.tar.zst PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.zip |
Migrate client to eslint
Diffstat (limited to 'client/src/assets/player/upnext')
-rw-r--r-- | client/src/assets/player/upnext/end-card.ts | 14 |
1 files changed, 8 insertions, 6 deletions
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) { | |||
9 | <div class="vjs-upnext-autoplay-icon"> | 9 | <div class="vjs-upnext-autoplay-icon"> |
10 | <svg height="100%" version="1.1" viewbox="0 0 98 98" width="100%"> | 10 | <svg height="100%" version="1.1" viewbox="0 0 98 98" width="100%"> |
11 | <circle class="vjs-upnext-svg-autoplay-circle" cx="49" cy="49" fill="#000" fill-opacity="0.8" r="48"></circle> | 11 | <circle class="vjs-upnext-svg-autoplay-circle" cx="49" cy="49" fill="#000" fill-opacity="0.8" r="48"></circle> |
12 | <circle class="vjs-upnext-svg-autoplay-ring" cx="-49" cy="49" fill-opacity="0" r="46.5" stroke="#FFFFFF" stroke-width="4" transform="rotate(-90)"></circle> | 12 | <circle class="vjs-upnext-svg-autoplay-ring" cx="-49" cy="49" fill-opacity="0" r="46.5" |
13 | stroke="#FFFFFF" stroke-width="4" transform="rotate(-90)" | ||
14 | ></circle> | ||
13 | <polygon class="vjs-upnext-svg-autoplay-triangle" fill="#fff" points="32,27 72,49 32,71"></polygon></svg> | 15 | <polygon class="vjs-upnext-svg-autoplay-triangle" fill="#fff" points="32,27 72,49 32,71"></polygon></svg> |
14 | </div> | 16 | </div> |
15 | <span class="vjs-upnext-bottom"> | 17 | <span class="vjs-upnext-bottom"> |
@@ -22,7 +24,7 @@ function getMainTemplate (options: any) { | |||
22 | } | 24 | } |
23 | 25 | ||
24 | export interface EndCardOptions extends videojs.ComponentOptions { | 26 | export interface EndCardOptions extends videojs.ComponentOptions { |
25 | next: Function, | 27 | next: () => void |
26 | getTitle: () => string | 28 | getTitle: () => string |
27 | timeout: number | 29 | timeout: number |
28 | cancelText: string | 30 | cancelText: string |
@@ -99,11 +101,11 @@ class EndCard extends Component { | |||
99 | return container | 101 | return container |
100 | } | 102 | } |
101 | 103 | ||
102 | showCard (cb: Function) { | 104 | showCard (cb: (value: boolean) => void) { |
103 | let timeout: any | 105 | let timeout: any |
104 | 106 | ||
105 | this.autoplayRing.setAttribute('stroke-dasharray', '' + this.dashOffsetStart) | 107 | this.autoplayRing.setAttribute('stroke-dasharray', `${this.dashOffsetStart}`) |
106 | this.autoplayRing.setAttribute('stroke-dashoffset', '' + -this.dashOffsetStart) | 108 | this.autoplayRing.setAttribute('stroke-dashoffset', `${-this.dashOffsetStart}`) |
107 | 109 | ||
108 | this.title.innerHTML = this.options_.getTitle() | 110 | this.title.innerHTML = this.options_.getTitle() |
109 | 111 | ||
@@ -123,7 +125,7 @@ class EndCard extends Component { | |||
123 | }) | 125 | }) |
124 | 126 | ||
125 | const goToPercent = (percent: number) => { | 127 | const goToPercent = (percent: number) => { |
126 | const newOffset = Math.max(-this.dashOffsetTotal, - this.dashOffsetStart - percent * this.dashOffsetTotal / 2 / 100) | 128 | const newOffset = Math.max(-this.dashOffsetTotal, -this.dashOffsetStart - percent * this.dashOffsetTotal / 2 / 100) |
127 | this.autoplayRing.setAttribute('stroke-dashoffset', '' + newOffset) | 129 | this.autoplayRing.setAttribute('stroke-dashoffset', '' + newOffset) |
128 | } | 130 | } |
129 | 131 | ||