diff --git a/src/components/Stats.vue b/src/components/Stats.vue new file mode 100644 index 0000000..40c06bf --- /dev/null +++ b/src/components/Stats.vue @@ -0,0 +1,231 @@ + + + + + diff --git a/src/components/Streams.vue b/src/components/Streams.vue index 7960c69..2c652f1 100644 --- a/src/components/Streams.vue +++ b/src/components/Streams.vue @@ -12,7 +12,7 @@ Event Matches Casters - Hosts + Stats @@ -41,10 +41,10 @@ - +
- - + +
{{ store.state.casters.filter(x => x._id === p)[0]?.name }}
{{ store.state.stats.filter(x => x._id === p)[0]?.name }}
@@ -76,11 +76,11 @@ -

Hosts

+

Stats

- + @@ -134,8 +134,8 @@ export default { casters.value.push(m) } }) - e.hosts.forEach(m => { - if (hosts.value.length !== e.hosts.length) { + e.stats.forEach(m => { + if (hosts.value.length !== e.stats.length) { hosts.value.push(m) } }) @@ -161,7 +161,7 @@ export default { event: event.value, matches: matches.value, casters: casters.value, - hosts: hosts.value, + stats: hosts.value, }) } else if (name.value !== '') { create('streams', { @@ -171,7 +171,7 @@ export default { event: event.value, matches: matches.value, casters: casters.value, - hosts: hosts.value, + stats: hosts.value, }) } reset() diff --git a/src/store.js b/src/store.js index d63cfdf..c72bba3 100644 --- a/src/store.js +++ b/src/store.js @@ -19,6 +19,7 @@ const state = reactive({ matches: [], casters: [], hosts: [], + stats: [], streams: [], streamsFull: [], brackets: [], diff --git a/src/utils/websocket.js b/src/utils/websocket.js index 05a294b..6a7dbf2 100644 --- a/src/utils/websocket.js +++ b/src/utils/websocket.js @@ -13,6 +13,7 @@ const channels = [ 'matches', 'casters', 'hosts', + 'stats', 'streams', 'brackets', ] diff --git a/src/views/Home.vue b/src/views/Home.vue index 6091042..87624b5 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -7,7 +7,7 @@ - + APL Logo @@ -36,6 +36,7 @@ + @@ -50,6 +51,7 @@ import Rosters from '@/components/Rosters.vue' import Matches from '@/components/Matches.vue' import Casters from '@/components/Casters.vue' import Hosts from '@/components/Hosts.vue' +import Stats from '@/components/Stats.vue' import Streams from '@/components/Streams.vue' import Brackets from '@/components/Brackets.vue' @@ -60,6 +62,7 @@ export default { Matches, Casters, Hosts, + Stats, Streams, Brackets, },