From c31def6221bf17cf377989f7bc64950fe8ad817d Mon Sep 17 00:00:00 2001
From: dragongoose <19649813+dragongoose@users.noreply.github.com>
Date: Sat, 18 Mar 2023 13:49:02 -0400
Subject: [PATCH] Run eslint and fix all issues
---
frontend/.eslintrc.cjs | 3 +-
frontend/src/App.vue | 6 +-
frontend/src/assets/index.css | 2 +-
frontend/src/assets/qualitySelector.ts | 37 ++-
frontend/src/components/Navbar.vue | 26 ---
frontend/src/components/NavbarView.vue | 32 +++
frontend/src/components/TwitchChat.vue | 74 +++++-
frontend/src/components/VideoPlayer.vue | 32 +--
frontend/src/main.ts | 28 ++-
frontend/src/router/index.ts | 8 +-
frontend/src/views/HomeView.vue | 7 -
frontend/src/views/PageNotFound.vue | 14 +-
frontend/src/views/PrivacyPageView.vue | 42 ++--
frontend/src/views/UserView.vue | 294 +++++++++++++-----------
14 files changed, 333 insertions(+), 272 deletions(-)
delete mode 100644 frontend/src/components/Navbar.vue
create mode 100644 frontend/src/components/NavbarView.vue
delete mode 100644 frontend/src/views/HomeView.vue
diff --git a/frontend/.eslintrc.cjs b/frontend/.eslintrc.cjs
index 6f40582..51f2c55 100644
--- a/frontend/.eslintrc.cjs
+++ b/frontend/.eslintrc.cjs
@@ -11,5 +11,6 @@ module.exports = {
],
parserOptions: {
ecmaVersion: 'latest'
- }
+ },
+ 'ignorePatterns': ["*.config.*"]
}
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index f4f944d..4612f8c 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -1,12 +1,12 @@
-
+
-
\ No newline at end of file
+
diff --git a/frontend/src/assets/index.css b/frontend/src/assets/index.css
index bd6213e..b5c61c9 100644
--- a/frontend/src/assets/index.css
+++ b/frontend/src/assets/index.css
@@ -1,3 +1,3 @@
@tailwind base;
@tailwind components;
-@tailwind utilities;
\ No newline at end of file
+@tailwind utilities;
diff --git a/frontend/src/assets/qualitySelector.ts b/frontend/src/assets/qualitySelector.ts
index c2f316f..934416b 100644
--- a/frontend/src/assets/qualitySelector.ts
+++ b/frontend/src/assets/qualitySelector.ts
@@ -1,27 +1,22 @@
-import type { VideoJsPlayer } from "video.js";
-import "videojs-contrib-quality-levels";
-import type { QualityLevelList } from "videojs-contrib-quality-levels";
+import 'videojs-contrib-quality-levels'
+import type { QualityLevelList } from 'videojs-contrib-quality-levels'
-export const createQualitySelector = (player: VideoJsPlayer) => {
- const qualityLevels: QualityLevelList = player.qualityLevels()
- let currentIndex = 0
+export const createQualitySelector = (player: any) => {
+ const qualityLevels: QualityLevelList = player.qualityLevels()
- player.hlsQualitySelector()
- var myButton = player.controlBar.addChild("button");
- var myButtonDom = myButton.el();
- myButtonDom.innerHTML = "Hello";
+ const myButton = player.controlBar.addChild('button')
+ const myButtonDom = myButton.el()
+ myButtonDom.innerHTML = 'Hello'
- myButtonDom.addEventListener('click', () => {
-
- })
+ myButtonDom.addEventListener('click', () => {})
- qualityLevels.on('change', function() {
- console.log('Quality Level changed!');
- console.log('New level:', qualityLevels[qualityLevels.selectedIndex]);
- console.log(qualityLevels)
+ qualityLevels.on('change', function () {
+ console.log('Quality Level changed!')
+ console.log('New level:', qualityLevels[qualityLevels.selectedIndex])
+ console.log(qualityLevels)
- const qualityLabel = qualityLevels[qualityLevels.selectedIndex].height?.toString() + 'p'
+ const qualityLabel = qualityLevels[qualityLevels.selectedIndex].height?.toString() + 'p'
- myButtonDom.textContent = qualityLabel ?? ''
- });
-}
\ No newline at end of file
+ myButtonDom.textContent = qualityLabel ?? ''
+ })
+}
diff --git a/frontend/src/components/Navbar.vue b/frontend/src/components/Navbar.vue
deleted file mode 100644
index 137be42..0000000
--- a/frontend/src/components/Navbar.vue
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
Naqvbar
-
-
-
-
-
-
-
- Github
- Preferences
- About
-
-
-
\ No newline at end of file
diff --git a/frontend/src/components/NavbarView.vue b/frontend/src/components/NavbarView.vue
new file mode 100644
index 0000000..831ec05
--- /dev/null
+++ b/frontend/src/components/NavbarView.vue
@@ -0,0 +1,32 @@
+
+
+
+
+
Naqvbar
+
+
+
+
+
+
+ Github
+ Preferences
+ About
+
+
+
diff --git a/frontend/src/components/TwitchChat.vue b/frontend/src/components/TwitchChat.vue
index 99bbf39..717bda8 100644
--- a/frontend/src/components/TwitchChat.vue
+++ b/frontend/src/components/TwitchChat.vue
@@ -1,16 +1,66 @@
-
-
-
\ No newline at end of file
+
+
diff --git a/frontend/src/components/VideoPlayer.vue b/frontend/src/components/VideoPlayer.vue
index eaccb13..d219d47 100644
--- a/frontend/src/components/VideoPlayer.vue
+++ b/frontend/src/components/VideoPlayer.vue
@@ -5,10 +5,12 @@
\ No newline at end of file
+
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 844cfc3..cd87ddb 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -8,13 +8,29 @@ import 'video.js/dist/video-js.css'
const app = createApp(App)
-import { OhVueIcon, addIcons } from "oh-vue-icons";
-import { IoSearchOutline, IoLink, FaCircleNotch, BiTwitter, BiInstagram, BiDiscord, BiYoutube, BiTiktok } from "oh-vue-icons/icons";
+import { OhVueIcon, addIcons } from 'oh-vue-icons'
+import {
+ IoSearchOutline,
+ IoLink,
+ FaCircleNotch,
+ BiTwitter,
+ BiInstagram,
+ BiDiscord,
+ BiYoutube,
+ BiTiktok
+} from 'oh-vue-icons/icons'
-addIcons(IoSearchOutline, IoLink, FaCircleNotch, BiTwitter, BiInstagram, BiDiscord, BiYoutube, BiTiktok)
+addIcons(
+ IoSearchOutline,
+ IoLink,
+ FaCircleNotch,
+ BiTwitter,
+ BiInstagram,
+ BiDiscord,
+ BiYoutube,
+ BiTiktok
+)
-app.component("v-icon", OhVueIcon);
+app.component('v-icon', OhVueIcon)
app.use(router)
app.mount('#app')
-
-
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index 2de42dc..d0f5133 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -1,5 +1,4 @@
import { createRouter, createWebHistory } from 'vue-router'
-import HomeView from '../views/HomeView.vue'
import UserView from '../views/UserView.vue'
import PageNotFound from '../views/PageNotFound.vue'
import PrivacyPageView from '../views/PrivacyPageView.vue'
@@ -7,11 +6,6 @@ import PrivacyPageView from '../views/PrivacyPageView.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
- {
- path: '/',
- name: 'home',
- component: HomeView
- },
{
path: '/privacy',
name: 'about',
@@ -21,7 +15,7 @@ const router = createRouter({
path: '/:username',
component: UserView
},
- { path: '/:pathMatch(.*)*', component: PageNotFound}
+ { path: '/:pathMatch(.*)*', component: PageNotFound }
]
})
diff --git a/frontend/src/views/HomeView.vue b/frontend/src/views/HomeView.vue
deleted file mode 100644
index 36efb52..0000000
--- a/frontend/src/views/HomeView.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/frontend/src/views/PageNotFound.vue b/frontend/src/views/PageNotFound.vue
index d871ef8..6034e85 100644
--- a/frontend/src/views/PageNotFound.vue
+++ b/frontend/src/views/PageNotFound.vue
@@ -1,11 +1,11 @@
-
-
oops....
- this page wasn't found(◞‸◟;)
- maybe go home ?
-
-
\ No newline at end of file
+
+
oops....
+ this page wasn't found(◞‸◟;)
+ maybe go home ?
+
+
diff --git a/frontend/src/views/PrivacyPageView.vue b/frontend/src/views/PrivacyPageView.vue
index d4882c1..301c70f 100644
--- a/frontend/src/views/PrivacyPageView.vue
+++ b/frontend/src/views/PrivacyPageView.vue
@@ -1,26 +1,24 @@
-
- Privacy Policy
- For the oficial instance, no logs are kept except for
- when an error is met that affects the user is encounered.
- An example of this is when data retrieval fails when a user
- requests. No identifying information is kept except for the
- time of request. below is an example of this data
-
-
- {
- "endpoint":"/api/users/chibidoki",
- "level":"warn","message":
- "No element found for selector: li.InjectLayout-sc-1i43xsx-0:nth-child(2) > a:nth-child(1) > div:nth-child(1) > div:nth-child(1) > p:nth-child(1)",
- "origin":"http://localhost:5173",
- "reqId":"fed6f1f6-403f-4d6a-9943-3d07ea7bf9bb",
- "timestamp":"2023-03-07T22:42:37.982Z"
- }
-
-
-
-
\ No newline at end of file
+
+ Privacy Policy
+
+ For the oficial instance, no logs are kept except for when an error is met that affects the
+ user is encounered. An example of this is when data retrieval fails when a user requests. No
+ identifying information is kept except for the time of request. below is an example of this
+ data
+
+
+
+ { "endpoint":"/api/users/chibidoki", "level":"warn","message": "No element found for selector:
+ li.InjectLayout-sc-1i43xsx-0:nth-child(2) > a:nth-child(1) > div:nth-child(1) >
+ div:nth-child(1) > p:nth-child(1)", "origin":"http://localhost:5173",
+ "reqId":"fed6f1f6-403f-4d6a-9943-3d07ea7bf9bb", "timestamp":"2023-03-07T22:42:37.982Z" }
+
+
+
diff --git a/frontend/src/views/UserView.vue b/frontend/src/views/UserView.vue
index 7406865..a0315c8 100644
--- a/frontend/src/views/UserView.vue
+++ b/frontend/src/views/UserView.vue
@@ -1,162 +1,182 @@
-
-
-
-
Searching...
-
-
+
+
+
+
+
oops...
+
this wasn't supposed to happen
-
-
-
oops...
-
this wasn't supposed to happen
+
+ the server was encountered an error while retriving the data, and now we're here :3
+
+
+
+
please contact the administrator with this code
+
error identifier: {{ data.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
LIVE
+
+
+
+
{{ data.username }}
+
+ {{ data.followersAbbv }} Followers
+
+
+
+ {{ truncate(data.stream.title, 75) }}
+
+
+
-
-
the server was encountered an error while retriving the data, and now we're here :3
-
-
-
please contact the administrator with this code
-
error identifier: {{ data.code }}
+
+
+
+
+
+ About
+
+
+
{{ data.about }}
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
LIVE
-
-
-
-
{{ data.username }}
-
{{ data.followersAbbv }} Followers
-
-
{{ truncate(data.stream.title, 75) }}
-
-
-
-
-
-
-
-
-
- About
-
-
-
{{ data.about }}
-
-
-
-
-
-
-
-
-
-
-
+
+