From fd054bd207fc7bf8f43a0da14e66015102234a1a Mon Sep 17 00:00:00 2001 From: dragongoose Date: Tue, 4 Jul 2023 20:53:02 -0400 Subject: [PATCH] Add support for displaying VODS --- src/components/user/VideoPreview.vue | 44 +++++++++++++++++++++ src/components/user/VideoTab.vue | 57 ++++++++++++++++++++++++++++ src/types/VOD.ts | 30 +++++++++++++++ src/views/UserView.vue | 8 +++- 4 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 src/components/user/VideoPreview.vue create mode 100644 src/components/user/VideoTab.vue create mode 100644 src/types/VOD.ts diff --git a/src/components/user/VideoPreview.vue b/src/components/user/VideoPreview.vue new file mode 100644 index 0000000..adbc5b5 --- /dev/null +++ b/src/components/user/VideoPreview.vue @@ -0,0 +1,44 @@ + + + \ No newline at end of file diff --git a/src/components/user/VideoTab.vue b/src/components/user/VideoTab.vue new file mode 100644 index 0000000..82e6d1e --- /dev/null +++ b/src/components/user/VideoTab.vue @@ -0,0 +1,57 @@ + + + + + \ No newline at end of file diff --git a/src/types/VOD.ts b/src/types/VOD.ts new file mode 100644 index 0000000..0e48937 --- /dev/null +++ b/src/types/VOD.ts @@ -0,0 +1,30 @@ + +export interface MinifiedCategory { + image: string + id: string + name: string + displayName: 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: MinifiedStreamer +} + +export interface Shelve { + title: string + videos: Video[] +} \ No newline at end of file diff --git a/src/views/UserView.vue b/src/views/UserView.vue index 68f6483..18ea196 100644 --- a/src/views/UserView.vue +++ b/src/views/UserView.vue @@ -7,6 +7,7 @@ import TwitchChat from '@/components/TwitchChat.vue' import ErrorMessage from '@/components/ErrorMessage.vue' 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 { truncate, abbreviate, getEndpoint } from '@/mixins' @@ -53,7 +54,8 @@ export default { TwitchChat, ErrorMessage, FollowButton, - LoadingScreen + LoadingScreen, + VideoTab }, methods: { truncate, abbreviate @@ -134,6 +136,10 @@ export default { + + + +
{{ $t("streamer.about") }}