Add following page and chat badges

This commit is contained in:
dragongoose
2023-03-31 07:50:46 -04:00
parent 620a394211
commit 354ae5a959
7 changed files with 180 additions and 39 deletions

View File

@ -1,5 +1,6 @@
<script lang="ts">
import { ref, type Ref } from 'vue'
import StreamPreviewVue from '@/components/StreamPreview.vue'
export default {
async setup() {
@ -11,7 +12,8 @@ export default {
return {
data,
frontend_url,
filterTags: ''
filterTags: '',
following: ref([])
}
},
methods: {
@ -73,12 +75,32 @@ export default {
},
mounted() {
this.getNextCategory()
let following = localStorage.getItem('following')
if (following) {
this.following = JSON.parse(following)
} else {
this.following = []
}
},
components: {
StreamPreviewVue
}
}
</script>
<template>
<div class="max-w-5xl mx-auto">
<div v-if="following.length > 0" class="p-2 text-white">
<h1 class="font-bold text-5xl">Following</h1>
<p class="text-xl">Streamers you follow</p>
<ul class="flex overflow-x-scroll flex-nowrap h-80 space-x-1">
<li v-for="streamer in following" :key="streamer" class="inline-block">
<stream-preview-vue :name="streamer"></stream-preview-vue>
</li>
</ul>
</div>
<div class="p-2">
<h1 class="font-bold text-5xl text-white">Discover</h1>
<p class="text-xl text-white">Sort through popular categories</p>