itube-specs 0.0.728 → 0.0.730

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.
@@ -11,13 +11,27 @@
11
11
  :key="`video-${item.guid}`"
12
12
  class="s-grid-videos__card"
13
13
  :card="item"
14
- :priority="priority && index < 4"
15
- :loading="index < 8 && !related ? 'eager' : 'lazy'"
14
+ :priority="priority && index < eagerCount"
15
+ :loading="!related ? 'eager' : 'lazy'"
16
16
  :top-chips="topChips"
17
17
  :playlist-id="playlistId"
18
18
  :playlist="playlist"
19
19
  />
20
20
  <slot/>
21
+ <NuxtLazyHydrate when-idle v-if="idleItems.length > 0">
22
+ <div class="s-grid-videos__idle">
23
+ <FVideoCard
24
+ v-for="item in idleItems"
25
+ :key="`video-idle-${item.guid}`"
26
+ class="s-grid-videos__card"
27
+ :card="item"
28
+ loading="lazy"
29
+ :top-chips="topChips"
30
+ :playlist-id="playlistId"
31
+ :playlist="playlist"
32
+ />
33
+ </div>
34
+ </NuxtLazyHydrate>
21
35
  <NuxtLazyHydrate when-visible v-if="lazyItems.length > 0">
22
36
  <div class="s-grid-videos__lazy">
23
37
  <FVideoCard
@@ -38,8 +52,9 @@
38
52
 
39
53
  <script setup lang="ts">
40
54
  import type { IVideoCard } from '../../types';
55
+ import { isMobileDevice } from '../../runtime';
41
56
 
42
- const EAGER_COUNT = 12;
57
+ const IDLE_COUNT = 4;
43
58
 
44
59
  const props = defineProps<{
45
60
  items: Array<IVideoCard>
@@ -51,6 +66,12 @@ const props = defineProps<{
51
66
  topChips?: string[]
52
67
  }>()
53
68
 
54
- const eagerItems = computed(() => props.items.slice(0, EAGER_COUNT));
55
- const lazyItems = computed(() => props.items.slice(EAGER_COUNT));
69
+ const isMobile = useState('isMobile', () =>
70
+ isMobileDevice(useRequestHeaders()['user-agent'] ?? '')
71
+ );
72
+ const eagerCount = computed(() => isMobile.value ? 4 : 12);
73
+
74
+ const eagerItems = computed(() => props.items.slice(0, eagerCount.value));
75
+ const idleItems = computed(() => props.items.slice(eagerCount.value, eagerCount.value + IDLE_COUNT));
76
+ const lazyItems = computed(() => props.items.slice(eagerCount.value + IDLE_COUNT));
56
77
  </script>
@@ -2,6 +2,7 @@
2
2
  <SPopup
3
3
  v-if="isOpen"
4
4
  v-model="isOpen"
5
+ drawer
5
6
  @close="closePopup"
6
7
  >
7
8
  <template #title>{{ filterTitle }}</template>
@@ -4,10 +4,11 @@
4
4
  :items="chipsItems"
5
5
  @click="(e: IChipsItem)=> onChipsClick(e)"
6
6
  />
7
- <transition>
7
+ <transition appear>
8
8
  <SPopup
9
9
  v-if="model"
10
10
  v-model="model"
11
+ drawer
11
12
  class="s-model-filters__popup"
12
13
  >
13
14
  <template #title>{{ popupTitle }}</template>
@@ -3,6 +3,14 @@
3
3
  <h1 v-if="titleTag === 'h1'" class="s-section-title__title _title">{{ title }}</h1>
4
4
  <h2 v-else-if="titleTag === 'h2'" class="s-section-title__title _title">{{ title }}</h2>
5
5
  <h3 v-else-if="titleTag === 'h3'" class="s-section-title__title _title">{{ title }}</h3>
6
+ <img
7
+ v-if="img"
8
+ class="s-section-title__flag"
9
+ :src="img"
10
+ width="24"
11
+ height="16"
12
+ :alt="img"
13
+ />
6
14
  <SCount
7
15
  v-if="count"
8
16
  class="s-section-title__count"
@@ -17,6 +25,7 @@ withDefaults(defineProps<{
17
25
  titleTag?: string
18
26
  title: string
19
27
  icon?: string
28
+ img?: string
20
29
  }>(), {
21
30
  titleTag: 'h1'
22
31
  })
@@ -4,6 +4,7 @@
4
4
  class="s-popup"
5
5
  :class="[
6
6
  {'--sheet': sheet},
7
+ {'--drawer': drawer},
7
8
  {'--transparent-backdrop': transparentBackdrop},
8
9
  ]"
9
10
  @click="closeByBackdropClick"
@@ -82,6 +83,7 @@ const props = defineProps<{
82
83
  back?: boolean
83
84
  transparentBackdrop?: boolean
84
85
  sheet?: boolean
86
+ drawer?: boolean
85
87
  title?: string
86
88
  notModal?: boolean
87
89
  }>()
@@ -2,7 +2,7 @@ import type { IChipsItem } from '../../types';
2
2
 
3
3
  export const categoriesNavigation: Array<IChipsItem> = [
4
4
  {
5
- title: 'top_rated',
5
+ title: 'grouped',
6
6
  value: '/categories',
7
7
  },
8
8
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.728",
4
+ "version": "0.0.730",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {