Format files

This commit is contained in:
dragongoose
2023-03-29 10:26:55 -04:00
parent ea4e649959
commit 143e81276b
3 changed files with 32 additions and 19 deletions

View File

@ -15,7 +15,13 @@ export default {
},
setup(props) {
let messages: Ref<
{ username: string; channel: string; message: string; messageType: string, tags: Record<string,string> }[]
{
username: string
channel: string
message: string
messageType: string
tags: Record<string, string>
}[]
> = ref([])
let ws = new WebSocket('ws://localhost:7000')
@ -61,7 +67,10 @@ export default {
</script>
<template>
<div v-if="isLive" class="p-3 bg-ctp-crust rounded-lg w-full max-w-[15.625rem] flex flex-col">
<ul class="overflow-y-scroll overflow-x-hidden whitespace-pre-wrap h-[46.875rem]" ref="chatList">
<ul
class="overflow-y-scroll overflow-x-hidden whitespace-pre-wrap h-[46.875rem]"
ref="chatList"
>
<li>
<p ref="initConnectingStatus" class="text-gray-500 text-sm italic">
Connecting to {{ channelName }}.
@ -70,7 +79,10 @@ export default {
<li v-for="message in getChat()" :key="messages.indexOf(message)">
<div class="text-white inline-flex">
<p class="text-sm">
<strong :style="message.tags.color ? `color: ${message.tags.color};` : ``" class="text-ctp-pink font-bold text-sm">{{ message.username }}</strong
<strong
:style="message.tags.color ? `color: ${message.tags.color};` : ``"
class="text-ctp-pink font-bold text-sm"
>{{ message.username }}</strong
>: {{ message.message }}
</p>
</div>

View File

@ -29,8 +29,7 @@ export default {
// initializing the video player
// when the component is being mounted
mounted() {
this.player = videojs('video-player', this.options, () => {
})
this.player = videojs('video-player', this.options, () => {})
}
}
</script>