itube-specs 0.0.902 → 0.0.904
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/assets/icons/common/flag.svg +1 -1
- package/assets/icons/common/heart-stroke.svg +1 -1
- package/assets/icons/common/heart.svg +1 -1
- package/assets/icons/common/playlist.svg +1 -1
- package/assets/icons/common/share.svg +1 -1
- package/assets/icons/common/thumbs-down-filled.svg +1 -0
- package/assets/icons/common/thumbs-down.svg +1 -1
- package/assets/icons/common/thumbs-up-filled.svg +1 -0
- package/assets/icons/common/thumbs-up.svg +1 -1
- package/assets/scss/themes/dark/_theme.scss +12 -4
- package/assets/scss/themes/light/_theme.scss +12 -4
- package/components/player/interface.vue +132 -58
- package/components/player/like.vue +82 -60
- package/package.json +1 -1
- package/assets/icons/common/crest-in-circle.svg +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg fill="none" stroke="currentColor" stroke-width="2"
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528"></path></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"></path></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg fill="currentColor"
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"></path></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 5H3"></path><path d="M10 12H3"></path><path d="M10 19H3"></path><path d="M15 12.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z"></path></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg fill="none" stroke="currentColor" stroke-width="2"
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" x2="15.42" y1="13.51" y2="17.49"></line><line x1="15.41" x2="8.59" y1="6.51" y2="10.49"></line></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z"></path><path d="M17 14V2"></path></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z"></path><path d="M17 14V2"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"></path><path d="M7 10v12"></path></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"></path><path d="M7 10v12"></path></svg>
|
|
@@ -230,6 +230,13 @@ $video-info-description-text: $color-zinc-400;
|
|
|
230
230
|
// ─── Video interface ───
|
|
231
231
|
$video-interface-button-bg: $color-zinc-800;
|
|
232
232
|
$video-interface-button-text: $color-zinc-400;
|
|
233
|
+
$video-interface-button-bg--hover: $color-zinc-700;
|
|
234
|
+
$video-interface-button-text--hover: $color-white;
|
|
235
|
+
$video-interface-button-bg--active: $color-zinc-700;
|
|
236
|
+
$video-interface-button-text--active: $color-white;
|
|
237
|
+
$video-interface-mobile-icon: $color-white;
|
|
238
|
+
$video-interface-mobile-label: $color-zinc-300;
|
|
239
|
+
$video-interface-mobile-border: $color-zinc-800;
|
|
233
240
|
|
|
234
241
|
// ─── Video channel ───
|
|
235
242
|
$video-channel-bg: $color-zinc-800-60;
|
|
@@ -283,11 +290,12 @@ $video-playlist-header-button-text--active: $color-indigo-400;
|
|
|
283
290
|
$video-playlist-header-button-bg--active: $color-indigo-500-10;
|
|
284
291
|
|
|
285
292
|
// ─── Like ───
|
|
286
|
-
$like-text: $color-zinc-400;
|
|
287
293
|
$like-icon: $color-zinc-400;
|
|
288
|
-
$like-
|
|
289
|
-
$like-icon--active: $color-
|
|
290
|
-
$like-
|
|
294
|
+
$like-icon--hover: $color-white;
|
|
295
|
+
$like-icon--active: $color-white;
|
|
296
|
+
$like-count: $color-zinc-500;
|
|
297
|
+
$like-mobile-icon: $color-white;
|
|
298
|
+
$like-mobile-count: $color-zinc-300;
|
|
291
299
|
$like-bar-bg: $color-zinc-700;
|
|
292
300
|
$like-bar-likes: $color-zinc-500;
|
|
293
301
|
|
|
@@ -287,6 +287,13 @@ $video-info-description-text: $color-gray-700;
|
|
|
287
287
|
// ─── Video interface ───
|
|
288
288
|
$video-interface-button-bg: $color-slate-750;
|
|
289
289
|
$video-interface-button-text: $color-gray-400;
|
|
290
|
+
$video-interface-button-bg--hover: $color-slate-700;
|
|
291
|
+
$video-interface-button-text--hover: $color-white;
|
|
292
|
+
$video-interface-button-bg--active: $color-slate-700;
|
|
293
|
+
$video-interface-button-text--active: $color-white;
|
|
294
|
+
$video-interface-mobile-icon: $color-gray-900;
|
|
295
|
+
$video-interface-mobile-label: $color-gray-500;
|
|
296
|
+
$video-interface-mobile-border: $color-gray-200;
|
|
290
297
|
|
|
291
298
|
// ─── Video channel ───
|
|
292
299
|
$video-channel-bg: $color-gray-200;
|
|
@@ -340,11 +347,12 @@ $video-playlist-header-button-text--active: $color-indigo-soft;
|
|
|
340
347
|
$video-playlist-header-button-bg--active: $color-indigo-500-10;
|
|
341
348
|
|
|
342
349
|
// ─── Like ───
|
|
343
|
-
$like-text: $color-gray-400;
|
|
344
350
|
$like-icon: $color-gray-500;
|
|
345
|
-
$like-
|
|
346
|
-
$like-icon--active: $color-
|
|
347
|
-
$like-
|
|
351
|
+
$like-icon--hover: $color-gray-900;
|
|
352
|
+
$like-icon--active: $color-gray-900;
|
|
353
|
+
$like-count: $color-gray-400;
|
|
354
|
+
$like-mobile-icon: $color-gray-900;
|
|
355
|
+
$like-mobile-count: $color-gray-500;
|
|
348
356
|
$like-bar-bg: $color-slate-700;
|
|
349
357
|
$like-bar-likes: $color-gray-500;
|
|
350
358
|
|
|
@@ -6,49 +6,60 @@
|
|
|
6
6
|
:video-md5="data.md5"
|
|
7
7
|
:likes="data.likes"
|
|
8
8
|
:dislikes="data.dislikes"
|
|
9
|
-
|
|
10
|
-
<PlayerInfo
|
|
11
|
-
:created="data.created"
|
|
12
|
-
:views="data.views"
|
|
13
|
-
class="_from-sm"
|
|
9
|
+
class="player-interface__like"
|
|
14
10
|
/>
|
|
15
11
|
<div class="player-interface__wrapper">
|
|
16
|
-
<
|
|
12
|
+
<button
|
|
13
|
+
:class="{'--favorite': isFavorite}"
|
|
14
|
+
:aria-pressed="isFavorite"
|
|
15
|
+
type="button"
|
|
17
16
|
class="player-interface__button"
|
|
18
|
-
|
|
19
|
-
size="s"
|
|
20
|
-
@click="onAddPlaylistClick"
|
|
17
|
+
@click="isFavorite = !isFavorite"
|
|
21
18
|
>
|
|
22
19
|
<UiIcon
|
|
23
|
-
name="
|
|
24
|
-
|
|
20
|
+
:name="isFavorite ? 'heart' : 'heart-stroke'"
|
|
21
|
+
class="player-interface__button-icon"
|
|
22
|
+
size="24"
|
|
25
23
|
/>
|
|
26
|
-
<span class="
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
<span class="player-interface__button-label _to-sm">{{ t('favorite') }}</span>
|
|
25
|
+
<span class="player-interface__button-label _from-sm">{{ isFavorite ? t('favorite_remove') : t('favorite') }}</span>
|
|
26
|
+
</button>
|
|
27
|
+
<button
|
|
28
|
+
type="button"
|
|
29
29
|
class="player-interface__button"
|
|
30
|
-
|
|
31
|
-
size="s"
|
|
32
|
-
@click="openReportPopup(videoCard)"
|
|
30
|
+
@click="onAddPlaylistClick"
|
|
33
31
|
>
|
|
34
32
|
<UiIcon
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
class="player-interface__button-icon"
|
|
34
|
+
name="playlist"
|
|
35
|
+
size="24"
|
|
37
36
|
/>
|
|
38
|
-
<span class="
|
|
39
|
-
</
|
|
40
|
-
<
|
|
37
|
+
<span class="player-interface__button-label">{{ t('playlist.playlist') }}</span>
|
|
38
|
+
</button>
|
|
39
|
+
<button
|
|
40
|
+
type="button"
|
|
41
41
|
class="player-interface__button"
|
|
42
|
-
theme="muted"
|
|
43
|
-
size="s"
|
|
44
42
|
@click="isShareOpen = true"
|
|
45
43
|
>
|
|
46
44
|
<UiIcon
|
|
45
|
+
class="player-interface__button-icon"
|
|
47
46
|
name="share"
|
|
48
|
-
size="
|
|
47
|
+
size="24"
|
|
49
48
|
/>
|
|
50
|
-
<span class="
|
|
51
|
-
</
|
|
49
|
+
<span class="player-interface__button-label">{{ t('share') }}</span>
|
|
50
|
+
</button>
|
|
51
|
+
<button
|
|
52
|
+
type="button"
|
|
53
|
+
class="player-interface__button"
|
|
54
|
+
@click="openReportPopup(videoCard)"
|
|
55
|
+
>
|
|
56
|
+
<UiIcon
|
|
57
|
+
class="player-interface__button-icon"
|
|
58
|
+
name="flag"
|
|
59
|
+
size="24"
|
|
60
|
+
/>
|
|
61
|
+
<span class="player-interface__button-label">{{ t('report') }}</span>
|
|
62
|
+
</button>
|
|
52
63
|
</div>
|
|
53
64
|
</div>
|
|
54
65
|
<div
|
|
@@ -135,21 +146,13 @@ const { openReportPopup } = useReportPopup();
|
|
|
135
146
|
|
|
136
147
|
const isShareOpen = ref(false);
|
|
137
148
|
|
|
138
|
-
const
|
|
149
|
+
const isFavorite = ref(false);
|
|
139
150
|
|
|
140
151
|
const { isAuthorized } = useUser(AuthorizationApiService);
|
|
141
152
|
|
|
142
153
|
function onAddPlaylistClick() {
|
|
143
154
|
usePlaylistAdd().openPlaylistAdd(isAuthorized, props.data);
|
|
144
155
|
}
|
|
145
|
-
|
|
146
|
-
const isLiked = ref(false);
|
|
147
|
-
|
|
148
|
-
onMounted(() => {
|
|
149
|
-
isLiked.value = !!localStorage.getItem(props.data.guid);
|
|
150
|
-
resultLikes.value = localStorage.getItem(props.data.guid) ? resultLikes.value += 1 : resultLikes.value;
|
|
151
|
-
});
|
|
152
|
-
|
|
153
156
|
</script>
|
|
154
157
|
|
|
155
158
|
<style lang="scss">
|
|
@@ -158,40 +161,111 @@ onMounted(() => {
|
|
|
158
161
|
gap: 12px;
|
|
159
162
|
}
|
|
160
163
|
|
|
164
|
+
/* На мобиле лайк/дизлайк и кнопки действий — единый ряд из шести равных ячеек «иконка над
|
|
165
|
+
подписью»: обе обёртки становятся `display: contents`, чтобы их кнопки легли прямо в грид
|
|
166
|
+
заголовка. От sm возвращается десктопная раскладка — лайк-блок слева, пилюли справа. */
|
|
161
167
|
.player-interface__header {
|
|
162
|
-
display:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
168
|
+
display: grid;
|
|
169
|
+
grid-template-columns: repeat(6, 1fr);
|
|
170
|
+
gap: 4px;
|
|
171
|
+
padding-block: 12px;
|
|
172
|
+
border-bottom: 1px solid $video-interface-mobile-border;
|
|
173
|
+
|
|
174
|
+
@include from-br(sm) {
|
|
175
|
+
display: flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
column-gap: 8px;
|
|
178
|
+
justify-content: space-between;
|
|
179
|
+
padding-block: 0;
|
|
180
|
+
border-bottom: none;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
166
183
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
scrollbar-width: none;
|
|
184
|
+
.player-like.player-interface__like {
|
|
185
|
+
display: contents;
|
|
170
186
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
187
|
+
@include from-br(sm) {
|
|
188
|
+
display: flex;
|
|
174
189
|
}
|
|
175
190
|
}
|
|
176
191
|
|
|
177
192
|
.player-interface__wrapper {
|
|
178
|
-
display:
|
|
179
|
-
|
|
180
|
-
|
|
193
|
+
display: contents;
|
|
194
|
+
|
|
195
|
+
@include from-br(sm) {
|
|
196
|
+
display: flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
column-gap: 8px;
|
|
199
|
+
}
|
|
181
200
|
}
|
|
182
201
|
|
|
202
|
+
/* Нативный `<button>`, а не `<UiBtn>`: на мобиле у кнопки нет ни подложки, ни паддингов
|
|
203
|
+
пилюли, а перебить геометрию `.ui-btn.--s` из компонента-потребителя можно только
|
|
204
|
+
гонкой специфичности. Тему кнопка всё равно спрашивает через `button-variant()`. */
|
|
183
205
|
.player-interface__button {
|
|
184
|
-
@include font-
|
|
185
|
-
@include button-variant(interface-button);
|
|
206
|
+
@include font-xs;
|
|
186
207
|
|
|
187
|
-
display:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
padding: 6px 12px;
|
|
192
|
-
background-color: $video-interface-button-bg;
|
|
208
|
+
display: grid;
|
|
209
|
+
justify-items: center;
|
|
210
|
+
row-gap: 6px;
|
|
211
|
+
padding-block: 4px;
|
|
193
212
|
border-radius: $radius-lg;
|
|
194
|
-
color: $video-interface-
|
|
213
|
+
color: $video-interface-mobile-icon;
|
|
214
|
+
cursor: pointer;
|
|
215
|
+
transition: var(--transition) opacity;
|
|
216
|
+
|
|
217
|
+
@include from-br(sm) {
|
|
218
|
+
@include font-sm;
|
|
219
|
+
@include button-variant(interface-button);
|
|
220
|
+
|
|
221
|
+
grid-auto-flow: column;
|
|
222
|
+
align-items: center;
|
|
223
|
+
row-gap: 0;
|
|
224
|
+
column-gap: 6px;
|
|
225
|
+
padding: 6px 12px;
|
|
226
|
+
font-weight: 500;
|
|
227
|
+
white-space: nowrap;
|
|
228
|
+
background-color: var(--button-bg, #{$video-interface-button-bg});
|
|
229
|
+
color: var(--button-text, #{$video-interface-button-text});
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@include hover(background-color, color, opacity) {
|
|
233
|
+
background-color: var(--button-bg--hover, #{$video-interface-button-bg--hover});
|
|
234
|
+
color: var(--button-text--hover, #{$video-interface-button-text--hover});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.player-interface__button:active {
|
|
239
|
+
opacity: 0.7;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.player-interface__button.--favorite {
|
|
243
|
+
@include from-br(sm) {
|
|
244
|
+
background-color: $video-interface-button-bg--active;
|
|
245
|
+
color: $video-interface-button-text--active;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.player-interface__button-icon {
|
|
250
|
+
$size: 24px;
|
|
251
|
+
|
|
252
|
+
width: $size;
|
|
253
|
+
height: $size;
|
|
254
|
+
|
|
255
|
+
@include from-br(sm) {
|
|
256
|
+
$size: 16px;
|
|
257
|
+
|
|
258
|
+
width: $size;
|
|
259
|
+
height: $size;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.player-interface__button-label {
|
|
264
|
+
color: $video-interface-mobile-label;
|
|
265
|
+
|
|
266
|
+
@include from-br(sm) {
|
|
267
|
+
color: inherit;
|
|
268
|
+
}
|
|
195
269
|
}
|
|
196
270
|
|
|
197
271
|
.player-interface__description {
|
|
@@ -6,19 +6,18 @@
|
|
|
6
6
|
>
|
|
7
7
|
<button
|
|
8
8
|
:class="{'--active': isLiked}"
|
|
9
|
+
:aria-pressed="isLiked"
|
|
9
10
|
:title="t('like')"
|
|
10
11
|
class="player-like__control"
|
|
11
12
|
type="button"
|
|
12
13
|
@click="onReactionClick('like')"
|
|
13
14
|
>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</span>
|
|
21
|
-
<span class="player-like__control-text">{{ $n(Number(resultLikes), 'compact') }}</span>
|
|
15
|
+
<UiIcon
|
|
16
|
+
:name="isLiked ? 'thumbs-up-filled' : 'thumbs-up'"
|
|
17
|
+
class="player-like__control-icon"
|
|
18
|
+
size="24"
|
|
19
|
+
/>
|
|
20
|
+
<span class="player-like__count">{{ $n(Number(resultLikes), 'compact') }}</span>
|
|
22
21
|
</button>
|
|
23
22
|
<div
|
|
24
23
|
v-if="bar"
|
|
@@ -28,26 +27,21 @@
|
|
|
28
27
|
:style="{ width: likePercent + '%' }"
|
|
29
28
|
class="player-like__bar-likes"
|
|
30
29
|
/>
|
|
31
|
-
<div
|
|
32
|
-
:style="{ width: dislikePercent + '%' }"
|
|
33
|
-
class="player-like__bar-dislikes"
|
|
34
|
-
/>
|
|
35
30
|
</div>
|
|
36
31
|
<button
|
|
37
32
|
:class="{'--active': isDisliked}"
|
|
33
|
+
:aria-pressed="isDisliked"
|
|
38
34
|
:title="t('dislike')"
|
|
39
35
|
class="player-like__control"
|
|
40
36
|
type="button"
|
|
41
37
|
@click="onReactionClick('dislike')"
|
|
42
38
|
>
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</span>
|
|
50
|
-
<span class="player-like__control-text">{{ $n(Math.abs(Number(resultDislikes)), 'compact') }}</span>
|
|
39
|
+
<UiIcon
|
|
40
|
+
:name="isDisliked ? 'thumbs-down-filled' : 'thumbs-down'"
|
|
41
|
+
class="player-like__control-icon"
|
|
42
|
+
size="24"
|
|
43
|
+
/>
|
|
44
|
+
<span class="player-like__count">{{ $n(Math.abs(Number(resultDislikes)), 'compact') }}</span>
|
|
51
45
|
</button>
|
|
52
46
|
</div>
|
|
53
47
|
</template>
|
|
@@ -126,9 +120,7 @@ async function onReactionClick(type: 'like' | 'dislike') {
|
|
|
126
120
|
}
|
|
127
121
|
}
|
|
128
122
|
|
|
129
|
-
const
|
|
130
|
-
const likePercent = computed(() => percents.value.likePercent);
|
|
131
|
-
const dislikePercent = computed(() => percents.value.dislikePercent);
|
|
123
|
+
const likePercent = computed(() => getReactionPercents(resultLikes.value, resultDislikes.value).likePercent);
|
|
132
124
|
</script>
|
|
133
125
|
|
|
134
126
|
<style lang="scss">
|
|
@@ -142,22 +134,59 @@ const dislikePercent = computed(() => percents.value.dislikePercent);
|
|
|
142
134
|
column-gap: 4px;
|
|
143
135
|
}
|
|
144
136
|
|
|
145
|
-
|
|
146
|
-
|
|
137
|
+
/* На мобиле контрол — вертикальная ячейка «иконка над числом», как в остальном мобильном
|
|
138
|
+
ряду действий; от sm возвращается в строку с числом сбоку. */
|
|
139
|
+
.player-like__control {
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
align-items: center;
|
|
143
|
+
row-gap: 6px;
|
|
144
|
+
padding-block: 4px;
|
|
145
|
+
color: $like-mobile-icon;
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
transition: var(--transition) color, var(--transition) opacity;
|
|
148
|
+
|
|
149
|
+
@include from-br(sm) {
|
|
150
|
+
flex-direction: row;
|
|
151
|
+
row-gap: 0;
|
|
152
|
+
column-gap: 6px;
|
|
153
|
+
padding: 6px;
|
|
154
|
+
border-radius: $radius-small;
|
|
155
|
+
color: $like-icon;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@include hover(color, opacity) {
|
|
159
|
+
color: $like-icon--hover;
|
|
160
|
+
}
|
|
147
161
|
}
|
|
148
162
|
|
|
149
|
-
.player-like__control {
|
|
150
|
-
|
|
163
|
+
.player-like__control:active {
|
|
164
|
+
opacity: 0.7;
|
|
165
|
+
}
|
|
151
166
|
|
|
152
|
-
|
|
153
|
-
|
|
167
|
+
.player-like__control.--active {
|
|
168
|
+
color: $like-icon--active;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.player-like.--mini .player-like__control {
|
|
172
|
+
flex-direction: row;
|
|
154
173
|
column-gap: 4px;
|
|
155
|
-
|
|
174
|
+
padding: 0;
|
|
175
|
+
|
|
176
|
+
/* Только до sm: от sm цвет и так берётся из базового правила, а трёхклассовый
|
|
177
|
+
селектор перебивал бы им ховер. */
|
|
178
|
+
@include to-br(sm) {
|
|
179
|
+
color: $like-icon;
|
|
180
|
+
}
|
|
156
181
|
}
|
|
157
182
|
|
|
158
183
|
.player-like__control-icon {
|
|
159
|
-
|
|
160
|
-
|
|
184
|
+
@include from-br(sm) {
|
|
185
|
+
$size: 16px;
|
|
186
|
+
|
|
187
|
+
width: $size;
|
|
188
|
+
height: $size;
|
|
189
|
+
}
|
|
161
190
|
}
|
|
162
191
|
|
|
163
192
|
.--mini .player-like__control-icon {
|
|
@@ -167,50 +196,43 @@ const dislikePercent = computed(() => percents.value.dislikePercent);
|
|
|
167
196
|
height: $size;
|
|
168
197
|
}
|
|
169
198
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
199
|
+
.player-like__count {
|
|
200
|
+
@include font-xs;
|
|
173
201
|
|
|
174
|
-
|
|
175
|
-
min-width: auto;
|
|
176
|
-
}
|
|
202
|
+
color: $like-mobile-count;
|
|
177
203
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
color: $like-text--hover;
|
|
204
|
+
@include from-br(sm) {
|
|
205
|
+
color: $like-count;
|
|
181
206
|
}
|
|
182
207
|
}
|
|
183
208
|
|
|
184
|
-
|
|
185
|
-
color: $like-
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.player-like__control.--active .player-like__control-icon.--dislike {
|
|
189
|
-
color: $like-icon-dislike--active;
|
|
209
|
+
.--mini .player-like__count {
|
|
210
|
+
color: $like-count;
|
|
190
211
|
}
|
|
191
212
|
|
|
192
213
|
.player-like__bar {
|
|
193
|
-
display:
|
|
214
|
+
display: none;
|
|
215
|
+
width: 64px;
|
|
194
216
|
height: 6px;
|
|
217
|
+
margin-inline: 4px;
|
|
195
218
|
border-radius: $radius-full;
|
|
196
219
|
overflow: hidden;
|
|
197
220
|
background-color: $like-bar-bg;
|
|
198
|
-
width: 40px;
|
|
199
|
-
}
|
|
200
221
|
|
|
201
|
-
|
|
202
|
-
|
|
222
|
+
@include from-br(sm) {
|
|
223
|
+
display: flex;
|
|
224
|
+
width: 48px;
|
|
225
|
+
height: 4px;
|
|
226
|
+
}
|
|
203
227
|
}
|
|
204
228
|
|
|
205
|
-
.player-like__bar
|
|
206
|
-
|
|
229
|
+
.--mini .player-like__bar {
|
|
230
|
+
display: flex;
|
|
231
|
+
width: 36px;
|
|
207
232
|
}
|
|
208
233
|
|
|
209
|
-
.player-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
text-overflow: ellipsis;
|
|
213
|
-
white-space: nowrap;
|
|
214
|
-
overflow: hidden;
|
|
234
|
+
.player-like__bar-likes {
|
|
235
|
+
background-color: $like-bar-likes;
|
|
236
|
+
border-radius: $radius-full;
|
|
215
237
|
}
|
|
216
238
|
</style>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg fill="none" stroke="currentColor" stroke-width="2" class="w-4 h-4" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><path d="M12 8v8m-4-4h8"/></svg>
|