itube-specs 0.0.802 → 0.0.803

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@
12
12
  {{ $n(card.videosCount, 'compact') }}
13
13
  </span>
14
14
  <span
15
- v-if="$features.FeatureFollowEnabled"
15
+ v-if="featureFlags.FeatureFollowEnabled"
16
16
  class="card-category-mini__detail"
17
17
  >{{ $n(8400, 'compact') }}</span>
18
18
  </div>
@@ -27,7 +27,7 @@ defineProps<{
27
27
  card: ICategoryCard
28
28
  }>();
29
29
 
30
- const { $features } = useNuxtApp();
30
+ const featureFlags = useRuntimeConfig().public.featureFlags;
31
31
  </script>
32
32
 
33
33
  <style lang="scss">
@@ -27,7 +27,7 @@
27
27
  {{ card.videosCount }}
28
28
  </span>
29
29
  <span
30
- v-if="$features.FeatureFollowEnabled"
30
+ v-if="featureFlags.FeatureFollowEnabled"
31
31
  class="card-channel-mini__detail"
32
32
  >{{ $n(8400, 'compact') }}</span>
33
33
  </div>
@@ -42,7 +42,7 @@ defineProps<{
42
42
  card: IChannelCard
43
43
  }>();
44
44
 
45
- const { $features } = useNuxtApp();
45
+ const featureFlags = useRuntimeConfig().public.featureFlags;
46
46
  const imageError = ref(false);
47
47
  </script>
48
48
 
@@ -114,7 +114,7 @@
114
114
  <LazyCardVideoDropdown
115
115
  v-if="dropdownMounted"
116
116
  :card="card"
117
- :show-watch-later="FeatureFlags.FeatureWatchLaterEnabled"
117
+ :show-watch-later="featureFlags.FeatureWatchLaterEnabled"
118
118
  class="card-video__dropdown"
119
119
  show-report
120
120
  auto-open
@@ -138,9 +138,10 @@
138
138
  <script setup lang="ts">
139
139
  import type { IVideoCard } from '../../../types';
140
140
  import { convertString, getDuration } from '../../../runtime';
141
- import { FeatureFlags } from '~/config/feature-flags.config';
142
141
  import { CSS_BREAKPOINTS } from '~/lib/css-breakpoints';
143
142
 
143
+ const featureFlags = useRuntimeConfig().public.featureFlags;
144
+
144
145
  const props = defineProps<{
145
146
  card: IVideoCard
146
147
  mini?: boolean
@@ -153,8 +154,6 @@ const props = defineProps<{
153
154
 
154
155
  const { t } = useI18n();
155
156
 
156
- const { $features } = useNuxtApp();
157
-
158
157
  const NuxtLinkComponent = resolveComponent('NuxtLink');
159
158
 
160
159
  const component = computed(() => props.card.channelName ? NuxtLinkComponent : 'div');
@@ -204,7 +203,7 @@ const duration = computed(() => {
204
203
 
205
204
  const rootPath = computed(() => props.playlistId ? `playlists/${props.playlistId}` : 'videos');
206
205
 
207
- const link = computed(() => localePath(`/${rootPath.value}/${props.card[ $features.FetchByUrlEnabled ? 'url' : 'id' ]}`));
206
+ const link = computed(() => localePath(`/${rootPath.value}/${props.card[ featureFlags.FetchByUrlEnabled ? 'url' : 'id' ]}`));
208
207
 
209
208
  const slug = useSlug();
210
209
 
@@ -31,7 +31,7 @@
31
31
  icon="video-camera"
32
32
  >{{ videosCount || card.videosCount }}</UiCount>
33
33
  <UiBtn
34
- v-if="$features.FeatureFollowEnabled"
34
+ v-if="featureFlags.FeatureFollowEnabled"
35
35
  theme="muted"
36
36
  size="s"
37
37
  @click="onFollowClick"
@@ -174,7 +174,7 @@ const groupedParameters = computed<IGroupedParameter[]>(() =>
174
174
  groupParametersByGroup(props.card.parameters ?? []),
175
175
  );
176
176
 
177
- const { $features } = useNuxtApp();
177
+ const featureFlags = useRuntimeConfig().public.featureFlags;
178
178
 
179
179
  const isShareOpen = ref(false);
180
180
 
@@ -81,10 +81,11 @@ import { AuthSteps, onBackdropClick, checkDeviceWidth } from '../../runtime';
81
81
  import type { CssBreakpoints, IProfileData } from '../../types';
82
82
  import { AuthorizationApiService } from '../../services/api/authorization.service';
83
83
 
84
- import { navigationItems } from '~/lib/scheme';
84
+ import { getNavigationItems } from '~/lib/scheme';
85
85
 
86
86
  const { t } = useI18n();
87
87
  const { generateLink } = useGenerateLink();
88
+ const navigationItems = getNavigationItems();
88
89
  const topItems = navigationItems.filter(item => item.top);
89
90
  const restItems = navigationItems.filter(item => !item.top);
90
91
 
@@ -53,13 +53,15 @@
53
53
  </template>
54
54
 
55
55
  <script setup lang="ts">
56
- import { navigationItems } from '~/lib/scheme';
56
+ import { getNavigationItems } from '~/lib/scheme';
57
57
  import type { INavigationItems } from '../../types';
58
58
 
59
59
  defineProps<{
60
60
  items?: INavigationItems[];
61
61
  }>();
62
62
 
63
+ const navigationItems = getNavigationItems();
64
+
63
65
  const { generateLink } = useGenerateLink();
64
66
  const route = useRoute();
65
67
 
@@ -6,7 +6,7 @@
6
6
  ]"
7
7
  class="player-aside-videos _from-md"
8
8
  >
9
- <AdvNtv v-if="FeatureFlags.AdsNTVEnabled" />
9
+ <AdvNtv v-if="featureFlags.AdsNTVEnabled" />
10
10
 
11
11
  <template v-else>
12
12
  <CardVideo
@@ -22,7 +22,8 @@
22
22
  <script setup lang="ts">
23
23
  import type { IVideoCard, PaginatedResponse } from '../../types';
24
24
  import type { AsyncDataRequestStatus } from '#app';
25
- import { FeatureFlags } from '~/config/feature-flags.config';
25
+
26
+ const featureFlags = useRuntimeConfig().public.featureFlags;
26
27
 
27
28
  defineProps<{
28
29
  asideVideos?: PaginatedResponse<IVideoCard> | null
@@ -24,7 +24,7 @@
24
24
  class="player-channel__name"
25
25
  >{{ name }}</NuxtLink>
26
26
  <button
27
- v-if="$features.FeatureFollowEnabled"
27
+ v-if="featureFlags.FeatureFollowEnabled"
28
28
  type="button"
29
29
  class="player-channel__subscribe"
30
30
  @click="onSubscribeClick"
@@ -49,7 +49,7 @@ const props = defineProps<{
49
49
  subscribersCount?: number
50
50
  }>();
51
51
 
52
- const { $features } = useNuxtApp();
52
+ const featureFlags = useRuntimeConfig().public.featureFlags;
53
53
 
54
54
  const emit = defineEmits<{
55
55
  (eventName: 'subscribe'): void
@@ -17,7 +17,7 @@
17
17
  <p class="player-follow__count">{{ $t('plural.videos', Number(card.videosCount)) }}</p>
18
18
  </div>
19
19
  <UiBtn
20
- v-if="$features.FeatureFollowEnabled"
20
+ v-if="featureFlags.FeatureFollowEnabled"
21
21
  theme="primary"
22
22
  @click="onButtonClick"
23
23
  >
@@ -39,7 +39,7 @@ const props = defineProps<{
39
39
  card: IChannelCard
40
40
  }>();
41
41
 
42
- const { $features } = useNuxtApp();
42
+ const featureFlags = useRuntimeConfig().public.featureFlags;
43
43
 
44
44
  const emit = defineEmits<{
45
45
  (eventName: 'click'): void
@@ -7,7 +7,7 @@
7
7
  <span class="player-playlist__user-name">{{ `${$t('by')} ${user}` }}</span>
8
8
  <div class="player-playlist__middle">
9
9
  <UiBtn
10
- v-if="$features.FeatureFollowEnabled"
10
+ v-if="featureFlags.FeatureFollowEnabled"
11
11
  theme="muted"
12
12
  size="s"
13
13
  @click="onFollowClick"
@@ -154,7 +154,7 @@ const props = defineProps<{
154
154
  dislikes: number
155
155
  }>();
156
156
 
157
- const { $features } = useNuxtApp();
157
+ const featureFlags = useRuntimeConfig().public.featureFlags;
158
158
 
159
159
  const isShareOpen = ref(false);
160
160
 
@@ -244,7 +244,7 @@ const videoShareCard = ref<IVideoCard | null>(null);
244
244
 
245
245
  const videoShareUrl = computed(() => {
246
246
  if (!videoShareCard.value) return '';
247
- const videoPath = videoShareCard.value[ $features.FetchByUrlEnabled ? 'url' : 'id' ];
247
+ const videoPath = videoShareCard.value[ featureFlags.FetchByUrlEnabled ? 'url' : 'id' ];
248
248
  return `/videos/${videoPath}`;
249
249
  });
250
250
 
@@ -41,7 +41,7 @@
41
41
  >
42
42
  <template #grid-end>
43
43
  <LazyAdvNativeBottom
44
- v-if="FeatureFlags.AdsNativeEnabled"
44
+ v-if="featureFlags.AdsNativeEnabled"
45
45
  hydrate-on-visible
46
46
  />
47
47
  </template>
@@ -116,9 +116,10 @@ import type {
116
116
  } from '../../types';
117
117
  import type { AsyncDataRequestStatus } from '#app';
118
118
  import { convertString, convertModelToRoundCard } from '../../runtime';
119
- import { FeatureFlags } from '~/config/feature-flags.config';
120
119
  import { computed } from 'vue';
121
120
 
121
+ const featureFlags = useRuntimeConfig().public.featureFlags;
122
+
122
123
  const props = defineProps<{
123
124
  title: string
124
125
  data: PaginatedResponse<IVideoCard> | null
@@ -65,14 +65,14 @@
65
65
  >
66
66
  <template #grid-start>
67
67
  <LazyAdvNativePlayer
68
- v-if="FeatureFlags.AdsNativeEnabled"
68
+ v-if="featureFlags.AdsNativeEnabled"
69
69
  hydrate-on-visible
70
70
  />
71
71
  </template>
72
72
 
73
73
  <template #grid-end>
74
74
  <LazyAdvNativeBottom
75
- v-if="FeatureFlags.AdsNativeEnabled"
75
+ v-if="featureFlags.AdsNativeEnabled"
76
76
  hydrate-on-visible
77
77
  />
78
78
  </template>
@@ -117,7 +117,8 @@
117
117
  import type { IChipsItem, IModelCard, IVideoCard, IVideoData, PaginatedResponse } from '../../types';
118
118
  import { convertModelToRoundCard } from '../../runtime';
119
119
  import type { AsyncDataRequestStatus } from '#app';
120
- import { FeatureFlags } from '~/config/feature-flags.config';
120
+
121
+ const featureFlags = useRuntimeConfig().public.featureFlags;
121
122
 
122
123
  const props = defineProps<{
123
124
  related?: Array<IVideoCard> | undefined,
@@ -45,7 +45,7 @@
45
45
  >
46
46
  <template #grid-end>
47
47
  <LazyAdvNativeBottom
48
- v-if="FeatureFlags.AdsNativeEnabled"
48
+ v-if="featureFlags.AdsNativeEnabled"
49
49
  hydrate-on-visible
50
50
  />
51
51
  </template>
@@ -92,9 +92,10 @@ import type {
92
92
  IVideoCard,
93
93
  PaginatedResponse
94
94
  } from '../../types';
95
- import { FeatureFlags } from '~/config/feature-flags.config';
96
95
  import { convertModelToRoundCard } from '../../runtime';
97
96
 
97
+ const featureFlags = useRuntimeConfig().public.featureFlags;
98
+
98
99
  const props = defineProps<{
99
100
  data: PaginatedResponse<IVideoCard> | undefined
100
101
  status: string
@@ -25,13 +25,13 @@ interface UseNextVideoParams {
25
25
  */
26
26
  export function useNextVideo({ data, suggestedVideos, basePath }: UseNextVideoParams) {
27
27
  const route = useRoute();
28
- const { $features } = useNuxtApp();
28
+ const featureFlags = useRuntimeConfig().public.featureFlags;
29
29
  const lang = useLang() as Language;
30
30
  const slug = useSlug();
31
31
  const isMobile = useState<boolean>('isMobile');
32
32
  const perPage = computed(() => isMobile.value ? 6 : 14);
33
33
 
34
- const cardKey = computed<'url' | 'id'>(() => $features.FetchByUrlEnabled ? 'url' : 'id');
34
+ const cardKey = computed<'url' | 'id'>(() => featureFlags.FetchByUrlEnabled ? 'url' : 'id');
35
35
  const currentCardId = computed(() => String(route.query.view || data()?.[cardKey.value] || ''));
36
36
 
37
37
  const currentItems = computed<IVideoCard[]>(() => suggestedVideos()?.items ?? []);
@@ -65,7 +65,7 @@ export function useNextVideo({ data, suggestedVideos, basePath }: UseNextVideoPa
65
65
  });
66
66
 
67
67
  const { execute: fetchRelated } = useApiAction(
68
- $features.FetchByUrlEnabled ? VideosApiService.getRelatedVideosByUrl : VideosApiService.getRelatedVideosById,
68
+ featureFlags.FetchByUrlEnabled ? VideosApiService.getRelatedVideosByUrl : VideosApiService.getRelatedVideosById,
69
69
  true,
70
70
  );
71
71
  let loadingMore = false;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.802",
4
+ "version": "0.0.803",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {