From adcbfcb1be3bfba9782c4eb6c24a72ba75be95a3 Mon Sep 17 00:00:00 2001 From: dragongoose Date: Thu, 20 Jul 2023 13:57:01 -0400 Subject: [PATCH] LINT --- src/assets/badges.ts | 2 +- src/assets/messageParser.ts | 8 +- src/assets/qualitySelector.ts | 6 +- src/assets/types/index.ts | 2 +- src/components/CategoryPreview.vue | 78 ++++++------ src/components/ChannelPreview.vue | 48 ++++---- src/components/DevWarning.vue | 2 +- src/components/ErrorMessage.vue | 6 +- src/components/FollowButton.vue | 4 +- src/components/FooterView.vue | 10 +- src/components/LanguageSwitcher.vue | 55 +++++---- src/components/LoadingScreen.vue | 2 +- src/components/NavbarView.vue | 4 +- src/components/SearchBar.vue | 32 ++--- src/components/TwitchChat.vue | 2 +- src/components/VideoPlayer.vue | 3 +- src/components/user/VideoPreview.vue | 85 +++++++------- src/components/user/VideoTab.vue | 84 +++++++------ src/i18n.ts | 2 +- src/main.ts | 9 +- src/mixins.ts | 64 +++++----- src/types/ApiResponse.ts | 8 +- src/types/Category.ts | 16 +-- src/types/CategoryData.ts | 39 +++--- src/types/Chat.ts | 22 ++-- src/types/Emote.ts | 10 +- src/types/Search.ts | 14 +-- src/types/Streamer.ts | 46 ++++---- src/types/VOD.ts | 68 ++++++----- src/types/index.ts | 2 +- src/views/CategoryView.vue | 68 +++++++---- src/views/HomepageView.vue | 32 ++--- src/views/PageNotFound.vue | 4 +- src/views/PrivacyPageView.vue | 22 ++-- src/views/SearchPageView.vue | 170 ++++++++++++++------------- src/views/UserView.vue | 57 +++++---- src/views/VodView.vue | 69 +++++------ 37 files changed, 601 insertions(+), 554 deletions(-) diff --git a/src/assets/badges.ts b/src/assets/badges.ts index ef9f532..8ce4b4d 100644 --- a/src/assets/badges.ts +++ b/src/assets/badges.ts @@ -27,4 +27,4 @@ export const getBadgesFromMessage = (tags: any, allBadges: Badge[]) => { }) return getBadges(allBadges, formatedBadges) -} \ No newline at end of file +} diff --git a/src/assets/messageParser.ts b/src/assets/messageParser.ts index 758bc5d..e12eb32 100644 --- a/src/assets/messageParser.ts +++ b/src/assets/messageParser.ts @@ -4,7 +4,7 @@ import { getBadgesFromMessage } from './badges' export function parseMessage(messageData: any, allBadges: Badge[]): ParsedMessage { const message = JSON.parse(messageData) - if (message.type === undefined && message.cursor !== "") { + if (message.type === undefined && message.cursor !== '') { const data: ParsedMessage = { type: 'PRIVMSG', data: { @@ -23,9 +23,9 @@ export function parseMessage(messageData: any, allBadges: Badge[]): ParsedMessag case 'PRIVMSG': { const data: ParsedMessage = { type: 'PRIVMSG', - data: { - message: message.message, - username: message.username, + data: { + message: message.message, + username: message.username, color: message.tags.color, badges: getBadgesFromMessage(message.tags, allBadges) } diff --git a/src/assets/qualitySelector.ts b/src/assets/qualitySelector.ts index 1699893..009ed5a 100644 --- a/src/assets/qualitySelector.ts +++ b/src/assets/qualitySelector.ts @@ -11,7 +11,7 @@ export const createQualitySelector = (player: any) => { const MenuItem = videojs.getComponent('MenuItem') let formatedQualities: { name: string; index: number; id: string }[] - let t = i18n.global.t + const t = i18n.global.t const setQuality = (id: string) => { const found = formatedQualities.find((i) => i.id === id) @@ -56,10 +56,10 @@ export const createQualitySelector = (player: any) => { videojs.registerComponent('CustomMenuButton', CustomMenuButton) const formattedLevels = [] - const updateLevels = (items: { name: string; index: number; id: string; }[]) => { + const updateLevels = () => { player.controlBar.removeChild('CustomMenuButton') player.controlBar.addChild('CustomMenuButton', { - title: t("player.quality"), + title: t('player.quality'), items: formatedQualities }) } diff --git a/src/assets/types/index.ts b/src/assets/types/index.ts index b199bcb..f85d431 100644 --- a/src/assets/types/index.ts +++ b/src/assets/types/index.ts @@ -1,2 +1,2 @@ export * from './Badge' -export * from './ParsedMessage' \ No newline at end of file +export * from './ParsedMessage' diff --git a/src/components/CategoryPreview.vue b/src/components/CategoryPreview.vue index 70ee3c6..428031b 100644 --- a/src/components/CategoryPreview.vue +++ b/src/components/CategoryPreview.vue @@ -1,48 +1,50 @@ \ No newline at end of file + + diff --git a/src/components/ChannelPreview.vue b/src/components/ChannelPreview.vue index c7601b9..145f916 100644 --- a/src/components/ChannelPreview.vue +++ b/src/components/ChannelPreview.vue @@ -1,31 +1,33 @@ \ No newline at end of file + + + + diff --git a/src/components/DevWarning.vue b/src/components/DevWarning.vue index 5d949e4..67522eb 100644 --- a/src/components/DevWarning.vue +++ b/src/components/DevWarning.vue @@ -1,7 +1,7 @@ diff --git a/src/components/ErrorMessage.vue b/src/components/ErrorMessage.vue index 57577b8..81b87cb 100644 --- a/src/components/ErrorMessage.vue +++ b/src/components/ErrorMessage.vue @@ -7,12 +7,12 @@ export default {} class="flex flex-col max-w-prose justify-center text-center mx-auto p-6 bg-ctp-crust rounded-lg text-white" >
-

{{ $t("error.oops") }}

-

{{ $t("error.notsupposedtohappen") }}

+

{{ $t('error.oops') }}

+

{{ $t('error.notsupposedtohappen') }}

- {{ $t("error.serverexplain") }} + {{ $t('error.serverexplain') }}

diff --git a/src/components/FollowButton.vue b/src/components/FollowButton.vue index bfdd225..16f7865 100644 --- a/src/components/FollowButton.vue +++ b/src/components/FollowButton.vue @@ -56,7 +56,7 @@ export default { class="text-white text-sm font-bold p-2 py-1 rounded-md bg-purple-600" > - {{ $t("streamer.unfollow") }} - {{ $t("streamer.follow") }} + {{ $t('streamer.unfollow') }} + {{ $t('streamer.follow') }} diff --git a/src/components/FooterView.vue b/src/components/FooterView.vue index 5d79c1f..406c218 100644 --- a/src/components/FooterView.vue +++ b/src/components/FooterView.vue @@ -5,14 +5,14 @@ export default { setup() { const version = inject('version') return { - version + version } } } \ No newline at end of file +
+

SafeTwitch v{{ version }}

+
+ diff --git a/src/components/LanguageSwitcher.vue b/src/components/LanguageSwitcher.vue index 080e1bd..7a71625 100644 --- a/src/components/LanguageSwitcher.vue +++ b/src/components/LanguageSwitcher.vue @@ -1,32 +1,37 @@ \ No newline at end of file + diff --git a/src/components/LoadingScreen.vue b/src/components/LoadingScreen.vue index 4088bfc..f2132d0 100644 --- a/src/components/LoadingScreen.vue +++ b/src/components/LoadingScreen.vue @@ -1,7 +1,7 @@ diff --git a/src/components/TwitchChat.vue b/src/components/TwitchChat.vue index c674d37..98cb676 100644 --- a/src/components/TwitchChat.vue +++ b/src/components/TwitchChat.vue @@ -1,5 +1,5 @@ \ No newline at end of file + diff --git a/src/components/user/VideoTab.vue b/src/components/user/VideoTab.vue index 82e6d1e..22a4ec7 100644 --- a/src/components/user/VideoTab.vue +++ b/src/components/user/VideoTab.vue @@ -3,26 +3,32 @@ --> \ No newline at end of file + diff --git a/src/i18n.ts b/src/i18n.ts index 1c2f573..ea6d929 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -17,6 +17,6 @@ export default createI18n({ 'nl-NL': nl, 'pt-PT': pt, 'fa-IR': fa, - 'he-IL': he, + 'he-IL': he } }) diff --git a/src/main.ts b/src/main.ts index 93bc303..7db08af 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,9 +2,8 @@ import { createApp } from 'vue' import App from './App.vue' import router from './router' import './assets/index.css' -import i18n from "./i18n" -import { version } from "../package.json" - +import i18n from './i18n' +import { version } from '../package.json' const app = createApp(App).use(i18n) @@ -12,7 +11,7 @@ const app = createApp(App).use(i18n) // For some reason, import.meta.env.VITE_HTTPS === "true" // returns false, even if it is true. // Making a copy of the variable seems to work -const https = (import.meta.env.SAFETWITCH_HTTPS.slice() === "true") +const https = import.meta.env.SAFETWITCH_HTTPS.slice() === 'true' const protocol = https ? 'https://' : 'http://' const wsProtocol = https ? 'wss://' : 'ws://' @@ -51,4 +50,4 @@ addIcons( app.component('v-icon', OhVueIcon) app.use(router) -app.mount('#app') \ No newline at end of file +app.mount('#app') diff --git a/src/mixins.ts b/src/mixins.ts index 310f18d..ed86740 100644 --- a/src/mixins.ts +++ b/src/mixins.ts @@ -1,48 +1,42 @@ export function truncate(value: string, length: number) { - if (value.length > length) { - return value.substring(0, length) + '...' - } else { - return value - } + if (value.length > length) { + return value.substring(0, length) + '...' + } else { + return value + } } -let language = localStorage.getItem("language") || "en-us" +const language = localStorage.getItem('language') || 'en-us' export function abbreviate(text: number) { - return Intl.NumberFormat(language, { - //@ts-ignore - notation: 'compact', - maximumFractionDigits: 1 - }).format(text) + return Intl.NumberFormat(language, { + //@ts-ignore + notation: 'compact', + maximumFractionDigits: 1 + }).format(text) } -const https = (import.meta.env.SAFETWITCH_HTTPS.slice() === "true") +const https = import.meta.env.SAFETWITCH_HTTPS.slice() === 'true' const protocol = https ? 'https://' : 'http://' const rootBackendUrl = `${protocol}${import.meta.env.SAFETWITCH_BACKEND_DOMAIN}/` export async function getEndpoint(endpoint: string) { - let data - - try { - const res = await fetch(rootBackendUrl + endpoint, { - method: 'GET', - headers: { - "Accept-Language": language - } - }) - const rawData = await res.json() - - if (!res.ok) { - throw res - } - if (rawData.status !== 'ok') { - throw rawData - } - - data = rawData.data - } catch (error) { - throw error + const res = await fetch(rootBackendUrl + endpoint, { + method: 'GET', + headers: { + 'Accept-Language': language } + }) + const rawData = await res.json() - return data -} \ No newline at end of file + if (!res.ok) { + throw res + } + if (rawData.status !== 'ok') { + throw rawData + } + + const data = rawData.data + + return data +} diff --git a/src/types/ApiResponse.ts b/src/types/ApiResponse.ts index 69777c4..a17aa68 100644 --- a/src/types/ApiResponse.ts +++ b/src/types/ApiResponse.ts @@ -1,6 +1,4 @@ -import type * as all from "./" - export interface ApiResponse { - status: "ok" | "error", - data: any -} \ No newline at end of file + status: 'ok' | 'error' + data: any +} diff --git a/src/types/Category.ts b/src/types/Category.ts index aa7696d..8d40efc 100644 --- a/src/types/Category.ts +++ b/src/types/Category.ts @@ -1,11 +1,11 @@ export type Tag = string export interface CategoryPreview { - name: string - displayName: string - viewers: number - tags: Tag[] - createdAt?: Date - cursor?: string - image: string -} \ No newline at end of file + name: string + displayName: string + viewers: number + tags: Tag[] + createdAt?: Date + cursor?: string + image: string +} diff --git a/src/types/CategoryData.ts b/src/types/CategoryData.ts index d47cfc0..5492f09 100644 --- a/src/types/CategoryData.ts +++ b/src/types/CategoryData.ts @@ -1,25 +1,24 @@ -import type { Tag } from "./" -import type { StreamData } from "./" +import type { Tag } from './' export interface CategoryMinifiedStream { - title: string - viewers: number - preview: string - tags: Tag[] - cursor: string - streamer: { - name: string - pfp: string - colorHex: string - } + title: string + viewers: number + preview: string + tags: Tag[] + cursor: string + streamer: { + name: string + pfp: string + colorHex: string } +} export interface CategoryData { - name: string - cover: string - description: string - viewers: number - followers: number - tags: Tag[] - streams: CategoryMinifiedStream[] - } \ No newline at end of file + name: string + cover: string + description: string + viewers: number + followers: number + tags: Tag[] + streams: CategoryMinifiedStream[] +} diff --git a/src/types/Chat.ts b/src/types/Chat.ts index cdee99e..b964492 100644 --- a/src/types/Chat.ts +++ b/src/types/Chat.ts @@ -1,18 +1,18 @@ export interface TwitchChatOptions { - login: { - username: string, - password: string - }, - channels: string[] + login: { + username: string + password: string + } + channels: string[] } export const MessageTypes = ['PRIVMSG', 'WHISPER'] -export type MessageType = typeof MessageTypes[number]; +export type MessageType = (typeof MessageTypes)[number] export interface Metadata { - username: string - messageType: MessageType - channel: string - message: string - tags: { [k:string]:any } + username: string + messageType: MessageType + channel: string + message: string + tags: { [k: string]: any } } diff --git a/src/types/Emote.ts b/src/types/Emote.ts index 89d9ad6..3cde0c2 100644 --- a/src/types/Emote.ts +++ b/src/types/Emote.ts @@ -1,6 +1,6 @@ export interface Emote { - name: string, - urls : { - [k: string]: string - } -} \ No newline at end of file + name: string + urls: { + [k: string]: string + } +} diff --git a/src/types/Search.ts b/src/types/Search.ts index 1c949d8..545b54f 100644 --- a/src/types/Search.ts +++ b/src/types/Search.ts @@ -1,9 +1,9 @@ -import type { StreamData, StreamerData } from "./" -import type { CategoryPreview } from "./" +import type { StreamerData } from './' +import type { CategoryPreview } from './' export interface SearchResult { - channels: StreamerData[] - categories: CategoryPreview[] - relatedChannels: StreamerData[] - channelsWithTag: StreamerData[] -} \ No newline at end of file + channels: StreamerData[] + categories: CategoryPreview[] + relatedChannels: StreamerData[] + channelsWithTag: StreamerData[] +} diff --git a/src/types/Streamer.ts b/src/types/Streamer.ts index e5a0f9f..7a69566 100644 --- a/src/types/Streamer.ts +++ b/src/types/Streamer.ts @@ -1,30 +1,30 @@ export interface Social { - type: string | null - name: string, - link: string + type: string | null + name: string + link: string } export interface StreamData { - tags: string[] - title: string - topic: string - startedAt: number - viewers: number - preview: string - cursor?: string + tags: string[] + title: string + topic: string + startedAt: number + viewers: number + preview: string + cursor?: string } export interface StreamerData { - username: string - login: string - followers: number - isLive: boolean - about: string - socials?: Social[] - pfp: string - banner: string - stream?: StreamData | null - isPartner: boolean | null - colorHex: string - id: number -} \ No newline at end of file + username: string + login: string + followers: number + isLive: boolean + about: string + socials?: Social[] + pfp: string + banner: string + stream?: StreamData | null + isPartner: boolean | null + colorHex: string + id: number +} diff --git a/src/types/VOD.ts b/src/types/VOD.ts index a565d12..7d97a53 100644 --- a/src/types/VOD.ts +++ b/src/types/VOD.ts @@ -1,51 +1,49 @@ -import type { StreamerData } from "./Streamer" +import type { StreamerData } from './Streamer' -export interface MinifiedCategory { - image: string - id: string - name: string - displayName: string +export interface MinifiedCategory { + image: string + id: string + name: string + displayName: string } -export interface MinifiedStreamer { - name: string - login: string - pfp: string - colorHex: string +export interface MinifiedStreamer { + name: string + login: string + pfp: string + colorHex: string } -export interface Video { - preview: string - game: MinifiedCategory - duration: number - title: string - publishedAt: string - views: number - tag: string[] - streamer: StreamerData +export interface Video { + preview: string + game: MinifiedCategory + duration: number + title: string + publishedAt: string + views: number + tag: string[] + streamer: StreamerData } -export interface Shelve { - title: string - videos: Video[] +export interface Shelve { + title: string + videos: Video[] } - - export interface VodMessager { - name: string - login: string + name: string + login: string } export interface VodCommentBadge { - version: number - setId: string + version: number + setId: string } export interface VodComment { - message: string - messager: MinifiedStreamer - offset: number - cursor: string - badges: VodCommentBadge[] -} \ No newline at end of file + message: string + messager: MinifiedStreamer + offset: number + cursor: string + badges: VodCommentBadge[] +} diff --git a/src/types/index.ts b/src/types/index.ts index d947657..145820d 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -5,4 +5,4 @@ export * from './Chat' export * from './Category' export * from './CategoryData' export * from './ApiResponse' -export * from './VOD' \ No newline at end of file +export * from './VOD' diff --git a/src/views/CategoryView.vue b/src/views/CategoryView.vue index 2960448..3f5c4ed 100644 --- a/src/views/CategoryView.vue +++ b/src/views/CategoryView.vue @@ -8,12 +8,11 @@ import LoadingScreen from '@/components/LoadingScreen.vue' import type { CategoryData } from '@/types' import { getEndpoint, abbreviate } from '@/mixins' - export default { inject: ['protocol'], async setup() { let data = ref() - let status = ref<"ok" | "error">() + let status = ref<'ok' | 'error'>() return { data, @@ -21,13 +20,13 @@ export default { } }, async mounted() { - await getEndpoint("api/discover/" + this.$route.params.game) - .catch(() => { - this.status = "error" - }) - .then((data: CategoryData) => { - this.data = data - }) + await getEndpoint('api/discover/' + this.$route.params.game) + .catch(() => { + this.status = 'error' + }) + .then((data: CategoryData) => { + this.data = data + }) this.getMoreStreams() }, @@ -45,10 +44,11 @@ export default { if (!cursor) return // get rest of streams from api - const resData = await getEndpoint(`api/discover/${this.$route.params.game}/?cursor=${cursor}`) - .catch((err) => { - throw err - }) + const resData = await getEndpoint( + `api/discover/${this.$route.params.game}/?cursor=${cursor}` + ).catch((err) => { + throw err + }) for (let stream of resData.streams) { this.data!.streams.push(stream) @@ -56,7 +56,7 @@ export default { } } }, - abbreviate, + abbreviate }, components: { StreamPreviewVue, @@ -80,35 +80,47 @@ export default { - +
-

{{ $t("main.followers") }}: {{ abbreviate(data.followers) }}

-

{{ $t("main.viewers") }}: {{ abbreviate(data.viewers) }}

+

+ {{ $t('main.followers') }}: {{ abbreviate(data.followers) }} +

+

+ {{ $t('main.viewers') }}: {{ abbreviate(data.viewers) }} +

  • - {{ - tag - }} + {{ tag }}
@@ -118,7 +130,11 @@ export default {
    -
  • +
diff --git a/src/views/HomepageView.vue b/src/views/HomepageView.vue index cfe8e50..eea2bb5 100644 --- a/src/views/HomepageView.vue +++ b/src/views/HomepageView.vue @@ -13,7 +13,7 @@ export default { inject: ['protocol'], async setup() { let data = ref() - let status = ref<"ok" | "error">() + let status = ref<'ok' | 'error'>() return { data, @@ -57,7 +57,9 @@ export default { const cursor = this.data[this.data.length - 1].cursor if (!cursor) return const res = await fetch( - `${this.protocol}${import.meta.env.SAFETWITCH_BACKEND_DOMAIN}/api/discover/?cursor=${cursor}` + `${this.protocol}${ + import.meta.env.SAFETWITCH_BACKEND_DOMAIN + }/api/discover/?cursor=${cursor}` ) if (!res.ok) { throw new Error('Failed to fetch data') @@ -81,14 +83,13 @@ export default { this.following = [] } - await getEndpoint("api/discover") - .catch(() => { - this.status = "error" - }) - .then((data: CategoryPreviewInterface[]) => { - this.data = data - }) - + await getEndpoint('api/discover') + .catch(() => { + this.status = 'error' + }) + .then((data: CategoryPreviewInterface[]) => { + this.data = data + }) }, components: { StreamPreviewVue, @@ -119,13 +120,13 @@ export default {
-

{{ $t("home.discover") }}

-

{{ $t("home.discoverDescription") }}

+

{{ $t('home.discover') }}

+

{{ $t('home.discoverDescription') }}

-

{{ $t("home.tagDescription") }}

+

{{ $t('home.tagDescription') }}

- +
  • - +
  • diff --git a/src/views/PageNotFound.vue b/src/views/PageNotFound.vue index 490f0a2..7c799fc 100644 --- a/src/views/PageNotFound.vue +++ b/src/views/PageNotFound.vue @@ -4,8 +4,8 @@ export default {} diff --git a/src/views/PrivacyPageView.vue b/src/views/PrivacyPageView.vue index a6b643a..12075af 100644 --- a/src/views/PrivacyPageView.vue +++ b/src/views/PrivacyPageView.vue @@ -3,22 +3,22 @@ export default {} diff --git a/src/views/SearchPageView.vue b/src/views/SearchPageView.vue index c2d60dc..72afadf 100644 --- a/src/views/SearchPageView.vue +++ b/src/views/SearchPageView.vue @@ -8,90 +8,102 @@ import StreamPreviewVue from '@/components/StreamPreview.vue' import ChannelPreview from '@/components/ChannelPreview.vue' import { getEndpoint } from '@/mixins' -import type { ApiResponse, SearchResult, StreamerData } from '@/types' +import type { SearchResult, StreamerData } from '@/types' export default { - inject: ['protocol'], - setup() { - let data = ref() - const status = ref<"ok" | "error">() - return { - data, - status, - } - }, - async mounted() { - await getEndpoint("api/search/?query=" + this.$route.query.query) - .catch(() => { - this.status = "error" - }) - .then((data) => { - this.data = data as SearchResult - }) - }, - methods: { - getStream(channel: StreamerData) { - return { - ...channel.stream, - streamer: { - name: channel.username, - pfp: channel.pfp - } - } - } - }, - components: { - CategoryPreview, - ErrorMessage, - LoadingScreen, - StreamPreviewVue, - ChannelPreview + inject: ['protocol'], + setup() { + let data = ref() + const status = ref<'ok' | 'error'>() + return { + data, + status } + }, + async mounted() { + await getEndpoint('api/search/?query=' + this.$route.query.query) + .catch(() => { + this.status = 'error' + }) + .then((data) => { + this.data = data as SearchResult + }) + }, + methods: { + getStream(channel: StreamerData) { + return { + ...channel.stream, + streamer: { + name: channel.username, + pfp: channel.pfp + } + } + } + }, + components: { + CategoryPreview, + ErrorMessage, + LoadingScreen, + StreamPreviewVue, + ChannelPreview + } } \ No newline at end of file + +
    +

    + Categories related to "{{ $route.query.query }}" +

    +
      +
    • + +
    • +
    +
    + +
    +

    + Live channels with the tag "{{ $route.query.query }}" +

    +
      +
    • + +
    • +
    +
    + +
    +

    + Channels with the tag "{{ $route.query.query }}" +

    +
      +
    • + +
    • +
    +
    +
    + diff --git a/src/views/UserView.vue b/src/views/UserView.vue index 8c8d650..b7344f4 100644 --- a/src/views/UserView.vue +++ b/src/views/UserView.vue @@ -9,16 +9,16 @@ import FollowButton from '@/components/FollowButton.vue' import LoadingScreen from '@/components/LoadingScreen.vue' import VideoTab from '@/components/user/VideoTab.vue' -import type { StreamerData, ApiResponse } from '@/types' +import type { StreamerData } from '@/types' import { truncate, abbreviate, getEndpoint } from '@/mixins' export default { - inject: ["rootBackendUrl"], + inject: ['rootBackendUrl'], async setup() { const route = useRoute() const username = route.params.username const data = ref() - const status = ref<"ok" | "error">() + const status = ref<'ok' | 'error'>() const rootBackendUrl = inject('rootBackendUrl') const videoOptions = { autoplay: true, @@ -35,19 +35,19 @@ export default { return { data, status, - videoOptions, + videoOptions } }, async mounted() { const username = this.$route.params.username - await getEndpoint("api/users/" + username) - .then((data) => { - this.data = data - }) - .catch(() => { - this.status = "error" - }) + await getEndpoint('api/users/' + username) + .then((data) => { + this.data = data + }) + .catch(() => { + this.status = 'error' + }) }, components: { VideoPlayer, @@ -58,28 +58,33 @@ export default { VideoTab }, methods: { - truncate, abbreviate + truncate, + abbreviate } }