From 20a7641119832baea2dca3e56c9fae5ee608a4e2 Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Sat, 14 May 2022 00:16:15 -0400 Subject: [PATCH] channel global state setup --- NUXT/pages/channel/_id.vue | 72 ++++++---------------- NUXT/pages/channel/about.vue | 10 ++- NUXT/pages/watch.vue | 3 +- NUXT/store/channel/index.js | 46 ++++++++++++++ android/.idea/deploymentTargetDropDown.xml | 2 +- 5 files changed, 76 insertions(+), 57 deletions(-) create mode 100644 NUXT/store/channel/index.js diff --git a/NUXT/pages/channel/_id.vue b/NUXT/pages/channel/_id.vue index 0d07604..ce3a199 100644 --- a/NUXT/pages/channel/_id.vue +++ b/NUXT/pages/channel/_id.vue @@ -2,14 +2,14 @@
- + -

{{ title }}

+

{{ $store.state.channel.title }}

- {{ subscribe }} + {{ $store.state.channel.subscribe }}
- {{ subscribers }} · {{ videos }} + {{ $store.state.channel.subscribers }} · + {{ $store.state.channel.videos }}
-
- {{ descriptionPreview }} + {{ $store.state.channel.descriptionPreview }} mdi-chevron-right -
+
- - diff --git a/NUXT/pages/channel/about.vue b/NUXT/pages/channel/about.vue index 7b8b46c..ca70792 100644 --- a/NUXT/pages/channel/about.vue +++ b/NUXT/pages/channel/about.vue @@ -1,3 +1,11 @@ diff --git a/NUXT/pages/watch.vue b/NUXT/pages/watch.vue index 4942d94..a0b84f5 100644 --- a/NUXT/pages/watch.vue +++ b/NUXT/pages/watch.vue @@ -133,7 +133,7 @@ : 'background darken-1' : '' " - :to="video.channelUrl" + to="/channel" :style="{ borderRadius: $store.state.tweaks.roundWatch ? `${$store.state.tweaks.roundTweak / 2}rem` @@ -144,6 +144,7 @@ ? '1rem' : '0', }" + @click="$store.dispatch('channel/fetchChannel', video.channelUrl)" >