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.
- package/components/grids/s-grid-videos.vue +26 -5
- package/components/page-components/s-filter-popup.vue +1 -0
- package/components/page-components/s-model-filters.vue +2 -1
- package/components/page-components/s-section-title.vue +9 -0
- package/components/ui/s-popup.vue +2 -0
- package/lib/scheme/categories-navigation.ts +1 -1
- package/package.json +1 -1
|
@@ -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 <
|
|
15
|
-
:loading="
|
|
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
|
|
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
|
|
55
|
-
|
|
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>
|
|
@@ -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
|
}>()
|