itube-specs 0.0.835 → 0.0.837

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.
@@ -63,17 +63,18 @@ function onImageError() {
63
63
  display: grid;
64
64
  justify-content: center;
65
65
  justify-items: center;
66
+ padding: 2px;
66
67
  }
67
68
 
68
69
  .card-round__img {
69
- width: $popular-size;
70
- height: $popular-size;
70
+ width: $card-round-size;
71
+ height: $card-round-size;
71
72
  margin-bottom: 8px;
72
73
  aspect-ratio: 1/1;
73
74
  border-radius: $radius-full;
74
75
  object-fit: cover;
75
76
  object-position: center 70%;
76
- border: 2px solid $popular-border;
77
+ border: 2px solid $card-round-border;
77
78
 
78
79
  @include from-br(sm) {
79
80
  transition: var(--transition) border-color;
@@ -82,7 +83,8 @@ function onImageError() {
82
83
 
83
84
  .card-round:is(:hover, :focus-visible) .card-round__img {
84
85
  @include from-br(sm) {
85
- border-color: $popular-border--hover;
86
+ border-color: $card-round-border--hover;
87
+ outline: 1px solid $card-round-outline--hover;
86
88
  }
87
89
  }
88
90
 
@@ -93,7 +95,7 @@ function onImageError() {
93
95
  grid-template-columns: minmax(12px, 1fr) auto;
94
96
  column-gap: 4px;
95
97
  align-items: center;
96
- color: $popular-subtext;
98
+ color: $card-round-subtext;
97
99
  }
98
100
 
99
101
  .card-round__count-text {
@@ -106,7 +108,7 @@ function onImageError() {
106
108
  @include font-sm;
107
109
 
108
110
  font-weight: 500;
109
- color: $popular-text;
111
+ color: $card-round-text;
110
112
  max-width: 100%;
111
113
  overflow: hidden;
112
114
  white-space: nowrap;
@@ -119,7 +121,7 @@ function onImageError() {
119
121
 
120
122
  .card-round:is(:hover, :focus-visible) .card-round__title {
121
123
  @include from-br(sm) {
122
- color: $popular-text--hover;
124
+ color: $card-round-text--hover;
123
125
  }
124
126
  }
125
127
 
@@ -12,7 +12,6 @@
12
12
  :aria-label="$t('open_menu')"
13
13
  class="card-video-dropdown__trigger"
14
14
  type="button"
15
- @click="emit('triggerClick', $event)"
16
15
  >
17
16
  <UiIcon
18
17
  name="dots-vertical"
@@ -101,14 +100,12 @@ const props = defineProps<{
101
100
  showShare?: boolean
102
101
  showReport?: boolean
103
102
  showRemove?: boolean
104
- autoOpen?: boolean
105
103
  }>();
106
104
 
107
105
  const emit = defineEmits<{
108
106
  (e: 'watchLater'): void
109
107
  (e: 'share'): void
110
108
  (e: 'remove'): void
111
- (e: 'triggerClick', event: Event): void
112
109
  }>();
113
110
 
114
111
  const { isAuthorized } = useUser(AuthorizationApiService);
@@ -120,10 +117,6 @@ function openDropdown() {
120
117
  dropdownRef.value?.openDropdown();
121
118
  }
122
119
 
123
- onMounted(() => {
124
- if (props.autoOpen) openDropdown();
125
- });
126
-
127
120
  function onAddPlaylist() {
128
121
  usePlaylistAdd().openPlaylistAdd(isAuthorized, props.card, openDropdown);
129
122
  }
@@ -153,4 +146,16 @@ defineExpose({ openDropdown });
153
146
  padding: 16px 32px 16px 16px;
154
147
  border-bottom: 1px solid $video-card-dropdown-border;
155
148
  }
149
+
150
+ .card-video-dropdown__trigger > .ui-icon {
151
+ @include from-br(sm) {
152
+ transition: var(--transition) transform;
153
+ }
154
+ }
155
+
156
+ .card-video-dropdown__trigger:is(:hover, :focus-visible) > .ui-icon {
157
+ @include from-br(sm) {
158
+ transform: scale($video-card-dropdown-size--hover);
159
+ }
160
+ }
156
161
  </style>
@@ -112,25 +112,11 @@
112
112
  </div>
113
113
  </div>
114
114
  <LazyCardVideoDropdown
115
- v-if="dropdownMounted"
116
115
  :card="card"
117
116
  :show-watch-later="featureFlags.FeatureWatchLaterEnabled"
118
117
  class="card-video__dropdown"
119
118
  show-report
120
- auto-open
121
119
  />
122
- <button
123
- v-else
124
- :aria-label="t('open_menu')"
125
- class="card-video__dropdown card-video-dropdown__trigger"
126
- type="button"
127
- @click="dropdownMounted = true"
128
- >
129
- <UiIcon
130
- name="dots-vertical"
131
- size="18"
132
- />
133
- </button>
134
120
  </div>
135
121
  </div>
136
122
  </template>
@@ -165,8 +151,6 @@ const isChannelPage = computed(() => pageName === 'channels-channel');
165
151
 
166
152
  const isPreviewShow = ref(false);
167
153
 
168
- const dropdownMounted = ref(false);
169
-
170
154
  function playVideo() {
171
155
  isPreviewShow.value = true;
172
156
  }
@@ -205,6 +205,7 @@ router.afterEach(() => {
205
205
  background-color: $burger-bg;
206
206
  backdrop-filter: blur($blur-md);
207
207
  overflow: auto;
208
+ border-left: 1px solid $burger-border;
208
209
  }
209
210
 
210
211
  .layout-burger__buttons {
@@ -5,6 +5,7 @@
5
5
  <template>
6
6
  <ITubePlayer
7
7
  ref="playerRef"
8
+ v-bind="$attrs"
8
9
  :source="source"
9
10
  :options="options"
10
11
  :ad-config="loadAdConfig"
@@ -26,6 +27,7 @@
26
27
 
27
28
  <script setup lang="ts">
28
29
  import { ITubePlayer } from 'itube-modern-player/vue';
30
+
29
31
  import type { Player, PlayerOptions, VideoSource, LocaleCode, AdsOptions, PreviewMetaItem, SceneGroup, MenuRequestPayload } from 'itube-modern-player';
30
32
  import { AdvertsHelper } from '../../utils/adverts-helper';
31
33
  import { AdSpotType, ThumbSize } from '../../runtime';
@@ -39,6 +41,8 @@ import actionsIcon from '../../assets/icons/player/actions.svg?raw';
39
41
  import locationIcon from '../../assets/icons/player/location.svg?raw';
40
42
  import modelsIcon from '../../assets/icons/player/models.svg?raw';
41
43
 
44
+ defineOptions({ inheritAttrs: false });
45
+
42
46
  const props = defineProps<{
43
47
  data: IVideoData
44
48
  // Следующий ролик из related — нужен плееру только для ховер-превью на кнопке next.
@@ -82,14 +82,22 @@ const isDisliked = computed(() => likeStatus.value === 'dislike');
82
82
  const resultLikes = ref(props.likes);
83
83
  const resultDislikes = ref(props.dislikes);
84
84
 
85
- onMounted(() => {
85
+ function syncFromProps() {
86
+ likeStatus.value = null;
87
+ resultLikes.value = props.likes;
88
+ resultDislikes.value = props.dislikes;
89
+
86
90
  const stored = localStorage.getItem(storageKey.value);
87
91
  if (stored === 'like' || stored === 'dislike') {
88
92
  likeStatus.value = stored;
89
93
  if (stored === 'like') resultLikes.value += 1;
90
94
  if (stored === 'dislike') resultDislikes.value += 1;
91
95
  }
92
- });
96
+ }
97
+
98
+ onMounted(syncFromProps);
99
+
100
+ watch(storageKey, syncFromProps);
93
101
 
94
102
  async function onReactionClick(type: 'like' | 'dislike') {
95
103
  if (likeStatus.value !== type) {
@@ -351,6 +351,7 @@ function cancelEdit() {
351
351
  .profile-setup__avatar-edit.--delete {
352
352
  background-color: $setup-delete-bg;
353
353
  color: $setup-delete-text;
354
+ border: 2px solid $setup-delete-border;
354
355
 
355
356
  @include hover(background-color) {
356
357
  background-color: $setup-delete-bg--hover;
@@ -97,34 +97,58 @@ $icon-size: 16px;
97
97
  .search-input {
98
98
  position: relative;
99
99
  display: block;
100
- background-color: $search-bg;
101
100
  border-radius: $radius;
102
- border: 1px solid $search-border;
103
- transition: var(--transition) border-color;
101
+
102
+ @include to-br(sm) {
103
+ background-color: $search-bg--mobile;
104
+ border: 1px solid $search-border--mobile;
105
+ transition: var(--transition) border-color;
106
+ }
107
+
108
+ @include from-br(sm) {
109
+ background-color: $search-bg;
110
+ border: 1px solid $search-border;
111
+ transition: var(--transition) border-color;
112
+ }
104
113
  }
105
114
 
106
115
  .search-field__input {
107
116
  font-size: inherit;
108
117
  background-color: transparent;
109
118
  width: 100%;
110
- color: $search-text;
111
119
  padding-left: 16px;
112
120
  padding-right: 80px;
113
121
  padding-block: 12px;
114
122
 
123
+ @include to-br(sm) {
124
+ color: $search-text--mobile;
125
+ }
126
+
115
127
  @include from-br(sm) {
116
128
  @include font-sm;
129
+
130
+ color: $search-text;
117
131
  }
118
132
  }
119
133
 
120
134
  .search-input.search-input--focused {
121
- border-color: $search-border--active;
135
+ border-color: $search-border--active--mobile;
136
+
137
+ @include from-br(sm) {
138
+ border-color: $search-border--active;
139
+ }
122
140
  }
123
141
 
124
142
  .search-field__input::placeholder {
125
143
  @include font-sm;
126
144
 
127
- color: $search-placeholder;
145
+ @include to-br(sm) {
146
+ color: $search-placeholder--mobile;
147
+ }
148
+
149
+ @include from-br(sm) {
150
+ color: $search-placeholder;
151
+ }
128
152
  }
129
153
 
130
154
  .search-field__search {
@@ -62,12 +62,13 @@ const safeTitle = computed(() =>
62
62
  display: flex;
63
63
  align-items: center;
64
64
  column-gap: 8px;
65
- color: $search-item-text;
65
+ color: $search-item-text--mobile;
66
66
  padding-block: 6px;
67
67
  padding-inline: 8px;
68
68
 
69
69
  @include from-br(sm) {
70
70
  border-radius: 4px;
71
+ color: $search-item-text;
71
72
  }
72
73
 
73
74
  @include hover(background-color, color) {
@@ -178,11 +178,11 @@ const latestSearches = computed(() =>
178
178
  overflow: auto;
179
179
  scrollbar-width: thin;
180
180
  scrollbar-color: $search-result-scrollbar;
181
- color: $search-result-text;
181
+ color: $search-result-text--mobile;
182
182
  width: calc(100vw - calc(var(--container-padding-inline) * 2));
183
- border: 1px solid $search-result-border;
183
+ border: 1px solid $search-result-border--mobile;
184
184
  border-radius: $radius;
185
- background-color: $search-result-bg;
185
+ background-color: $search-result-bg--mobile;
186
186
  box-shadow: $search-result-shadow;
187
187
 
188
188
  @include to-br(sm) {
@@ -197,6 +197,7 @@ const latestSearches = computed(() =>
197
197
  max-height: 90dvh;
198
198
  display: grid;
199
199
  width: $search-max-width;
200
+ color: $search-result-text;
200
201
  border: 1px solid $search-result-border;
201
202
  border-radius: $radius;
202
203
  background-color: $search-result-bg;
@@ -227,7 +228,11 @@ const latestSearches = computed(() =>
227
228
  }
228
229
 
229
230
  .search-result__default:not(:last-of-type) {
230
- border-bottom: 1px solid $search-result-border;
231
+ border-bottom: 1px solid $search-result-border--mobile;
232
+
233
+ @include from-br(sm) {
234
+ border-bottom-color: $search-result-border;
235
+ }
231
236
  }
232
237
 
233
238
  .search-result__default,
@@ -79,18 +79,19 @@ const { t } = useI18n();
79
79
 
80
80
  display: grid;
81
81
  place-content: center;
82
- width: $popular-size;
83
- height: $popular-size;
82
+ width: $card-round-size;
83
+ height: $card-round-size;
84
84
  aspect-ratio: 1/1;
85
85
  border-radius: $radius-full;
86
86
  object-fit: cover;
87
- border: 2px solid $popular-border;
88
- background-color: $popup-content-bg;
89
- color: $swiper-items-all-text;
87
+ border: 2px solid $card-round-border;
88
+ background-color: $card-round-all-bg;
89
+ color: $card-round-all-text;
90
90
  text-align: center;
91
91
 
92
- @include hover(border-color) {
93
- border-color: $popular-border--hover;
92
+ @include hover(border-color, background-color) {
93
+ border-color: $card-round-border--hover;
94
+ background-color: $card-round-all-bg--hover;
94
95
  }
95
96
  }
96
97
  </style>
@@ -141,18 +141,29 @@ $nav-gap: 4px;
141
141
  display: none;
142
142
 
143
143
  @include from-br(sm) {
144
+ $size: 40px;
145
+
144
146
  position: absolute;
145
147
  top: calc(var(--slide-width) / 2);
146
148
  transform: translateY(-50%);
147
149
  z-index: calc($z-index-plus + 2);
150
+ display: grid;
151
+ place-content: center;
148
152
  cursor: pointer;
149
153
  padding: 0;
150
- border: none;
151
- background: none;
154
+ width: $size;
155
+ height: $size;
156
+ border-radius: 50%;
157
+ border: $swiper-nav-border;
158
+ background-color: $swiper-nav-bg;
152
159
  color: $swiper-nav-text;
160
+ box-shadow: 0 4px 6px -1px $swiper-nav-shadow, 0 2px 4px -2px $swiper-nav-shadow;
153
161
  opacity: 1;
154
162
  transition: opacity var(--transition);
155
- display: block;
163
+
164
+ @include hover(background-color) {
165
+ background-color: $swiper-nav-bg--hover;
166
+ }
156
167
 
157
168
  &::before {
158
169
  position: absolute;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.835",
4
+ "version": "0.0.837",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {