mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Make eslint work with vue files
This commit is contained in:
parent
3349cd69c9
commit
c8639c2ce7
4 changed files with 6 additions and 6 deletions
|
@ -6,7 +6,7 @@
|
||||||
"serve": "vite",
|
"serve": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"lint": "eslint --fix --color --ignore-path .gitignore ."
|
"lint": "eslint --fix --color --ignore-path .gitignore --ext .js,.vue ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
||||||
|
|
|
@ -40,7 +40,7 @@ export default {
|
||||||
if (this.getPreferenceBoolean("watchHistory", false))
|
if (this.getPreferenceBoolean("watchHistory", false))
|
||||||
if ("indexedDB" in window) {
|
if ("indexedDB" in window) {
|
||||||
const request = indexedDB.open("piped-db", 1);
|
const request = indexedDB.open("piped-db", 1);
|
||||||
request.onupgradeneeded = function() {
|
request.onupgradeneeded = function () {
|
||||||
const db = request.result;
|
const db = request.result;
|
||||||
console.log("Upgrading object store.");
|
console.log("Upgrading object store.");
|
||||||
if (!db.objectStoreNames.contains("watch_history")) {
|
if (!db.objectStoreNames.contains("watch_history")) {
|
||||||
|
@ -56,7 +56,7 @@ export default {
|
||||||
|
|
||||||
const App = this;
|
const App = this;
|
||||||
|
|
||||||
(async function() {
|
(async function () {
|
||||||
const locale = App.getPreferenceString("hl", App.defaultLangage);
|
const locale = App.getPreferenceString("hl", App.defaultLangage);
|
||||||
if (locale !== App.TimeAgoConfig.locale) {
|
if (locale !== App.TimeAgoConfig.locale) {
|
||||||
const localeTime = await import("javascript-time-ago/locale/" + locale + ".json").then(
|
const localeTime = await import("javascript-time-ago/locale/" + locale + ".json").then(
|
||||||
|
|
|
@ -193,7 +193,7 @@ export default {
|
||||||
var tx = window.db.transaction("watch_history", "readonly");
|
var tx = window.db.transaction("watch_history", "readonly");
|
||||||
var store = tx.objectStore("watch_history");
|
var store = tx.objectStore("watch_history");
|
||||||
var request = store.get(this.video.id);
|
var request = store.get(this.video.id);
|
||||||
request.onsuccess = function(event) {
|
request.onsuccess = function (event) {
|
||||||
var video = event.target.result;
|
var video = event.target.result;
|
||||||
if (video && video.currentTime) {
|
if (video && video.currentTime) {
|
||||||
videoEl.currentTime = video.currentTime;
|
videoEl.currentTime = video.currentTime;
|
||||||
|
@ -477,7 +477,7 @@ export default {
|
||||||
var tx = window.db.transaction("watch_history", "readwrite");
|
var tx = window.db.transaction("watch_history", "readwrite");
|
||||||
var store = tx.objectStore("watch_history");
|
var store = tx.objectStore("watch_history");
|
||||||
var request = store.get(this.video.id);
|
var request = store.get(this.video.id);
|
||||||
request.onsuccess = function(event) {
|
request.onsuccess = function (event) {
|
||||||
var video = event.target.result;
|
var video = event.target.result;
|
||||||
if (video) {
|
if (video) {
|
||||||
video.currentTime = time;
|
video.currentTime = time;
|
||||||
|
|
|
@ -199,7 +199,7 @@ export default {
|
||||||
var tx = window.db.transaction("watch_history", "readwrite");
|
var tx = window.db.transaction("watch_history", "readwrite");
|
||||||
var store = tx.objectStore("watch_history");
|
var store = tx.objectStore("watch_history");
|
||||||
var request = store.get(videoId);
|
var request = store.get(videoId);
|
||||||
request.onsuccess = function(event) {
|
request.onsuccess = function (event) {
|
||||||
var video = event.target.result;
|
var video = event.target.result;
|
||||||
if (video) {
|
if (video) {
|
||||||
video.watchedAt = Date.now();
|
video.watchedAt = Date.now();
|
||||||
|
|
Loading…
Reference in a new issue