Fix linting issues

This commit is contained in:
Preston 2020-06-19 16:20:06 -04:00
parent 0428891773
commit 6fbccbce4c
17 changed files with 164 additions and 153 deletions

View File

@ -15,7 +15,7 @@ export default Vue.extend({
props: { props: {
label: { label: {
type: String, type: String,
default: "" default: ''
}, },
textColor: { textColor: {
type: String, type: String,

View File

@ -25,8 +25,8 @@
> >
<slot> <slot>
<ul <ul
class="list"
v-if="dropdownNames.length > 0" v-if="dropdownNames.length > 0"
class="list"
> >
<li <li
v-for="(label, index) in dropdownNames" v-for="(label, index) in dropdownNames"

View File

@ -14,8 +14,8 @@
</label> </label>
<input <input
:id="id" :id="id"
:list="idDataList"
v-model="inputData" v-model="inputData"
:list="idDataList"
class="ft-input" class="ft-input"
type="text" type="text"
:placeholder="placeholder" :placeholder="placeholder"

View File

@ -5,11 +5,17 @@
theme="secondary" theme="secondary"
icon="share-alt" icon="share-alt"
dropdown-position-x="left" dropdown-position-x="left"
:forceDropdown="true" :force-dropdown="true"
> >
<div class="shareLinks"> <div class="shareLinks">
<div class="header"> <div class="header">
<img class="youtubeLogo" src="~../../assets/img/yt_logo_mono_dark.png" alt="YouTube" width="794" height="178"> <img
class="youtubeLogo"
src="~../../assets/img/yt_logo_mono_dark.png"
alt="YouTube"
width="794"
height="178"
>
</div> </div>
<div class="buttons"> <div class="buttons">
@ -17,67 +23,69 @@
class="action" class="action"
@click="copyYoutube()" @click="copyYoutube()"
> >
<font-awesome-icon icon="copy"/> <font-awesome-icon icon="copy" />
Copy link Copy link
</ft-button> </ft-button>
<ft-button <ft-button
class="action" class="action"
@click="openYoutube()" @click="openYoutube()"
> >
<font-awesome-icon icon="globe"/> <font-awesome-icon icon="globe" />
Open link Open link
</ft-button> </ft-button>
<ft-button <ft-button
class="action" class="action"
backgroundColor="var(--accent-color-active)" background-color="var(--accent-color-active)"
@click="copyYoutubeEmbed()" @click="copyYoutubeEmbed()"
> >
<font-awesome-icon icon="copy"/> <font-awesome-icon icon="copy" />
Copy embed Copy embed
</ft-button> </ft-button>
<ft-button <ft-button
class="action" class="action"
backgroundColor="var(--accent-color-active)" background-color="var(--accent-color-active)"
@click="openYoutubeEmbed()" @click="openYoutubeEmbed()"
> >
<font-awesome-icon icon="globe"/> <font-awesome-icon icon="globe" />
Open embed Open embed
</ft-button> </ft-button>
</div> </div>
<div class="divider"></div> <div class="divider" />
<div class="header invidious"><span class="invidiousLogo"/>Invidious</div> <div class="header invidious">
<span class="invidiousLogo" />Invidious
</div>
<div class="buttons"> <div class="buttons">
<ft-button <ft-button
class="action" class="action"
@click="copyInvidious()" @click="copyInvidious()"
> >
<font-awesome-icon icon="copy"/> <font-awesome-icon icon="copy" />
Copy link Copy link
</ft-button> </ft-button>
<ft-button <ft-button
class="action" class="action"
@click="openInvidious()" @click="openInvidious()"
> >
<font-awesome-icon icon="globe"/> <font-awesome-icon icon="globe" />
Open link Open link
</ft-button> </ft-button>
<ft-button <ft-button
class="action" class="action"
backgroundColor="var(--accent-color-active)" background-color="var(--accent-color-active)"
@click="copyInvidiousEmbed()" @click="copyInvidiousEmbed()"
> >
<font-awesome-icon icon="copy"/> <font-awesome-icon icon="copy" />
Copy embed Copy embed
</ft-button> </ft-button>
<ft-button <ft-button
class="action" class="action"
backgroundColor="var(--accent-color-active)" background-color="var(--accent-color-active)"
@click="openInvidiousEmbed()" @click="openInvidiousEmbed()"
> >
<font-awesome-icon icon="globe"/> <font-awesome-icon icon="globe" />
Open embed Open embed
</ft-button> </ft-button>
</div> </div>

View File

@ -4,11 +4,11 @@
> >
<input <input
:id="id" :id="id"
v-model.number="currentValue"
type="range" type="range"
:min="minValue" :min="minValue"
:max="maxValue" :max="maxValue"
:step="step" :step="step"
v-model.number="currentValue"
@change="$emit('change', $event.target.value)" @change="$emit('change', $event.target.value)"
> >
<span> <span>

View File

@ -1,12 +1,12 @@
<template> <template>
<div> <div>
<input <input
type="checkbox"
:id="id" :id="id"
v-model="currentValue"
type="checkbox"
name="set-name" name="set-name"
class="switch-input" class="switch-input"
:checked='currentValue' :checked="currentValue"
v-model="currentValue"
@change="$emit('change', currentValue)" @change="$emit('change', currentValue)"
> >
<label <label

View File

@ -15,7 +15,7 @@
:type="source.type || source.mimeType" :type="source.type || source.mimeType"
:label="source.qualityLabel" :label="source.qualityLabel"
:selected="source.qualityLabel === selectedDefaultQuality" :selected="source.qualityLabel === selectedDefaultQuality"
/> >
<track <track
v-for="(caption, index) in captionList" v-for="(caption, index) in captionList"
:key="index + '_caption'" :key="index + '_caption'"

View File

@ -1,6 +1,7 @@
<template> <template>
<ft-card <ft-card
class="card"> class="card"
>
<h3 <h3
class="videoTitle" class="videoTitle"
> >

View File

@ -1,6 +1,7 @@
<template> <template>
<ft-card <ft-card
class="relative card"> class="relative card"
>
<h3 <h3
class="videoTitle" class="videoTitle"
> >

View File

@ -1,6 +1,7 @@
<template> <template>
<ft-card <ft-card
class="relative card"> class="relative card"
>
<h3 <h3
class="videoTitle" class="videoTitle"
> >

View File

@ -1,6 +1,7 @@
<template> <template>
<ft-card <ft-card
class="relative card"> class="relative card"
>
<h3> <h3>
{{ title }} {{ title }}
</h3> </h3>

View File

@ -50,10 +50,10 @@
<div <div
class="likeBar" class="likeBar"
:style="{ background: `linear-gradient(to right, var(--accent-color) ${likePercentageRatio}%, #9E9E9E ${likePercentageRatio}%` }" :style="{ background: `linear-gradient(to right, var(--accent-color) ${likePercentageRatio}%, #9E9E9E ${likePercentageRatio}%` }"
></div> />
<div> <div>
<span class="likeCount"><font-awesome-icon icon="thumbs-up"/> {{ likeCount }}</span> <span class="likeCount"><font-awesome-icon icon="thumbs-up" /> {{ likeCount }}</span>
<span class="dislikeCount"><font-awesome-icon icon="thumbs-down"/> {{ dislikeCount }}</span> <span class="dislikeCount"><font-awesome-icon icon="thumbs-down" /> {{ dislikeCount }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -75,8 +75,8 @@
@click="handleFormatChange" @click="handleFormatChange"
/> />
<ft-share-button <ft-share-button
class="option"
:id="id" :id="id"
class="option"
/> />
</div> </div>
</div> </div>

View File

@ -53,7 +53,7 @@
<img <img
:src="comment.author.thumbnail.url" :src="comment.author.thumbnail.url"
class="channelThumbnail" class="channelThumbnail"
/> >
<p <p
class="superChatContent" class="superChatContent"
:style="{ color: 'var(--text-with-main-color)' }" :style="{ color: 'var(--text-with-main-color)' }"
@ -67,8 +67,8 @@
</div> </div>
</div> </div>
<div <div
class="openedSuperChat"
v-if="showSuperChat" v-if="showSuperChat"
class="openedSuperChat"
:class="superChat.superchat.colorClass" :class="superChat.superchat.colorClass"
@click="showSuperChat = false" @click="showSuperChat = false"
> >
@ -82,7 +82,7 @@
<img <img
:src="superChat.author.thumbnail.url" :src="superChat.author.thumbnail.url"
class="channelThumbnail" class="channelThumbnail"
/> >
<p <p
class="channelName" class="channelName"
> >
@ -95,11 +95,10 @@
</p> </p>
</div> </div>
<p <p
class="chatMessage"
v-if="superChat.message.length > 0" v-if="superChat.message.length > 0"
class="chatMessage"
v-html="superChat.messageHtml" v-html="superChat.messageHtml"
> />
</p>
</div> </div>
</div> </div>
<div <div
@ -107,9 +106,11 @@
:style="{ height: chatHeight }" :style="{ height: chatHeight }"
@mousewheel="e => onScroll(e)" @mousewheel="e => onScroll(e)"
> >
<div v-for="(comment, index) in comments" <div
v-for="(comment, index) in comments"
:key="index" :key="index"
class="comment"> class="comment"
>
<div <div
v-if="typeof (comment.superchat) !== 'undefined'" v-if="typeof (comment.superchat) !== 'undefined'"
class="superChatMessage" class="superChatMessage"
@ -121,7 +122,7 @@
<img <img
:src="comment.author.thumbnail.url" :src="comment.author.thumbnail.url"
class="channelThumbnail" class="channelThumbnail"
/> >
<p <p
class="channelName" class="channelName"
> >
@ -134,11 +135,10 @@
</p> </p>
</div> </div>
<p <p
class="chatMessage"
v-if="comment.message.length > 0" v-if="comment.message.length > 0"
class="chatMessage"
v-html="comment.messageHtml" v-html="comment.messageHtml"
> />
</p>
</div> </div>
<div <div
v-else v-else
@ -146,7 +146,7 @@
<img <img
:src="comment.author.thumbnail.url" :src="comment.author.thumbnail.url"
class="channelThumbnail" class="channelThumbnail"
/> >
<p <p
class="chatContent" class="chatContent"
> >
@ -169,14 +169,13 @@
:alt="comment.author.badge.thumbnail.alt" :alt="comment.author.badge.thumbnail.alt"
:title="comment.author.badge.thumbnail.alt" :title="comment.author.badge.thumbnail.alt"
class="badgeImage" class="badgeImage"
/>
</span>
<span
class="chatMessage"
v-if="comment.message.length > 0"
v-html="comment.messageHtml"
> >
</span> </span>
<span
v-if="comment.message.length > 0"
class="chatMessage"
v-html="comment.messageHtml"
/>
</p> </p>
</div> </div>
</div> </div>

View File

@ -56,7 +56,7 @@ const actions = {
getVideoIdFromUrl ({ state }, url) { getVideoIdFromUrl ({ state }, url) {
console.log('checking for id') console.log('checking for id')
console.log(url) console.log(url)
const rx = /^.*(?:(?:(you|hook)tu\.?be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*/ const rx = /^.*(?:(?:(you|hook)tu\.?be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|&v(?:i)?=))([^#&?]*).*/
const match = url.match(rx) const match = url.match(rx)

View File

@ -14,6 +14,7 @@
<div class="videoAreaMargin"> <div class="videoAreaMargin">
<ft-video-player <ft-video-player
v-if="!isLoading && !hidePlayer" v-if="!isLoading && !hidePlayer"
ref="videoPlayer"
:dash-src="dashSrc" :dash-src="dashSrc"
:source-list="activeSourceList" :source-list="activeSourceList"
:caption-list="captionSourceList" :caption-list="captionSourceList"
@ -22,7 +23,6 @@
:thumbnail="thumbnail" :thumbnail="thumbnail"
class="videoPlayer" class="videoPlayer"
:class="{ theatrePlayer: useTheatreMode }" :class="{ theatrePlayer: useTheatreMode }"
ref="videoPlayer"
@ended="handleVideoEnded" @ended="handleVideoEnded"
@error="handleVideoError" @error="handleVideoError"
/> />
@ -41,9 +41,9 @@
:like-count="videoLikeCount" :like-count="videoLikeCount"
:dislike-count="videoDislikeCount" :dislike-count="videoDislikeCount"
:view-count="videoViewCount" :view-count="videoViewCount"
@theatreMode="toggleTheatreMode"
class="watchVideo" class="watchVideo"
:class="{ theatreWatchVideo: useTheatreMode }" :class="{ theatreWatchVideo: useTheatreMode }"
@theatreMode="toggleTheatreMode"
/> />
<watch-video-description <watch-video-description
v-if="!isLoading" v-if="!isLoading"
@ -71,9 +71,9 @@
<watch-video-playlist <watch-video-playlist
v-if="watchingPlaylist" v-if="watchingPlaylist"
v-show="!isLoading" v-show="!isLoading"
ref="watchVideoPlaylist"
:playlist-id="playlistId" :playlist-id="playlistId"
:video-id="videoId" :video-id="videoId"
ref="watchVideoPlaylist"
class="watchVideoSideBar watchVideoPlaylist" class="watchVideoSideBar watchVideoPlaylist"
:class="{ theatrePlaylist: useTheatreMode }" :class="{ theatrePlaylist: useTheatreMode }"
/> />

View File

@ -143,7 +143,7 @@ function fromCache(request) {
return caches.open(CACHE).then(function (cache) { return caches.open(CACHE).then(function (cache) {
return cache.match(request).then(function (matching) { return cache.match(request).then(function (matching) {
if (!matching || matching.status === 404) { if (!matching || matching.status === 404) {
return Promise.reject('no-match') return Promise.reject(new Error('no-match'))
} }
return matching return matching