itube-specs 0.0.1074 → 0.0.1075

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/SITE_UPDATES.md CHANGED
@@ -11,6 +11,20 @@
11
11
  коммиты до бампа); `npm run patch` сам проставит ей номер версии. Формат пункта: что сделать и где,
12
12
  кому именно (всем / сайтам с N), что будет, если не сделать.
13
13
 
14
+ ## 0.0.1075 — 2026-11-06
15
+
16
+ - **Сайтам со своей темой в `assets/scss/vars/_theme.scss` (hdsex-remaster), срочно:** без нового токена сборка
17
+ падает на `Undefined variable`. Добавить `$layout-age-popup-text` (тёмная — `$color-zinc-400`, светлая —
18
+ `$color-gray-600`), `$ui-img-gate-badge-text: $color-white;`, `$ui-img-gate-badge-bg: $color-black-42;`,
19
+ `$ui-img-gate-badge-border: $mono-white-90;`. Шесть `$layout-age-banner-*` и `$ui-img-gate-text` больше не
20
+ нужны — удалить.
21
+ - **Сайтам с `FeatureAgeVerificationEnabled` — к сведению:** заглушка превью — размытая абстрактная картинка слоя
22
+ (`public/img/age-gate.webp`, без реального кадра) со значком «18+» в кружке; в аватарах меньше 40px — без значка.
23
+ - **Сайтам с `FeatureAgeVerificationEnabled` — к сведению:** плашка под шапкой (`LayoutAgeBanner`) заменена попапом
24
+ `LayoutAgePopup` — предупреждение о верификации в регионе, кнопки «Verify age» и «Close»; после закрытия
25
+ показывается снова на следующей странице. Заглушки превью и блокировка плеера — как были. Тексты `age_gate.title`
26
+ и `age_gate.text` переписаны под попап.
27
+
14
28
  ## 0.0.1074 — 2026-11-05
15
29
 
16
30
  - **Сайтам со своей темой в `assets/scss/vars/_theme.scss` (hdsex-remaster), срочно:** без новых токенов сборка
@@ -33,14 +33,11 @@ $layout-header-border: $color-zinc-800-30;
33
33
  $layout-nav-border: $color-zinc-800-50;
34
34
  $layout-skip-link-bg: $color-zinc-800-60;
35
35
  $layout-skip-link-text: $color-white;
36
- $layout-age-banner-bg: $color-emerald-600;
37
- $layout-age-banner-title: $color-white;
38
- $layout-age-banner-text: $color-white-90;
39
- $layout-age-banner-btn-bg: $color-white;
40
- $layout-age-banner-btn-bg--hover: $color-white-90;
41
- $layout-age-banner-btn-text: $color-green-900;
36
+ $layout-age-popup-text: $color-zinc-400;
42
37
  $ui-img-gate-bg: $color-zinc-800;
43
- $ui-img-gate-text: $color-zinc-500;
38
+ $ui-img-gate-badge-text: $color-white;
39
+ $ui-img-gate-badge-bg: $color-black-42;
40
+ $ui-img-gate-badge-border: $mono-white-90;
44
41
 
45
42
  // ─── Page footer links (mixin) ───
46
43
  $page-footer-links-border: $color-zinc-800;
@@ -44,14 +44,11 @@ $layout-header-border: transparent;
44
44
  $layout-nav-border: $color-slate-750;
45
45
  $layout-skip-link-bg: $color-slate-750;
46
46
  $layout-skip-link-text: $color-white;
47
- $layout-age-banner-bg: $color-emerald-600;
48
- $layout-age-banner-title: $color-white;
49
- $layout-age-banner-text: $color-white-90;
50
- $layout-age-banner-btn-bg: $color-white;
51
- $layout-age-banner-btn-bg--hover: $color-white-90;
52
- $layout-age-banner-btn-text: $color-green-900;
47
+ $layout-age-popup-text: $color-gray-600;
53
48
  $ui-img-gate-bg: $color-gray-200;
54
- $ui-img-gate-text: $color-gray-500;
49
+ $ui-img-gate-badge-text: $color-white;
50
+ $ui-img-gate-badge-bg: $color-black-42;
51
+ $ui-img-gate-badge-border: $mono-white-90;
55
52
 
56
53
  // ─── Page footer links (mixin) ───
57
54
  $page-footer-links-border: transparent;
@@ -0,0 +1,81 @@
1
+ <!-- Попап на каждой странице, пока возрастная верификация требуется и не пройдена (useAgeGate) -->
2
+ <template>
3
+ <transition mode="out-in">
4
+ <UiPopup
5
+ v-if="isOpen"
6
+ v-model="isOpen"
7
+ sheet
8
+ >
9
+ <template #title>{{ t('age_gate.title') }}</template>
10
+
11
+ <p class="layout-age-popup__text">{{ t('age_gate.text') }}</p>
12
+
13
+ <template #footer>
14
+ <div class="layout-age-popup__buttons">
15
+ <UiBtn
16
+ wide
17
+ size="l"
18
+ theme="secondary"
19
+ @click="isOpen = false"
20
+ >{{ t('close') }}</UiBtn>
21
+ <UiBtn
22
+ :disabled="isPending"
23
+ wide
24
+ size="l"
25
+ theme="primary"
26
+ @click="onVerify"
27
+ >{{ t('age_gate.button') }}</UiBtn>
28
+ </div>
29
+ </template>
30
+ </UiPopup>
31
+ </transition>
32
+ </template>
33
+
34
+ <script setup lang="ts">
35
+ const { t } = useI18n();
36
+ const route = useRoute();
37
+ const { startVerification } = useAgeGate();
38
+
39
+ const isOpen = ref(true);
40
+ const isPending = ref(false);
41
+
42
+ watch(() => route.path, () => {
43
+ isOpen.value = true;
44
+ });
45
+
46
+ const onVerify = async () => {
47
+ isPending.value = true;
48
+ try {
49
+ await startVerification(route.fullPath);
50
+ } finally {
51
+ isPending.value = false;
52
+ }
53
+ };
54
+ </script>
55
+
56
+ <style lang="scss">
57
+ .layout-age-popup__text {
58
+ @include font-sm;
59
+
60
+ max-width: 400px;
61
+ padding-inline: 8px;
62
+ padding-block: 8px;
63
+ color: $layout-age-popup-text;
64
+
65
+ @include from-br(sm) {
66
+ @include font-base;
67
+
68
+ padding-inline: 16px;
69
+ padding-block: 16px;
70
+ }
71
+ }
72
+
73
+ .layout-age-popup__buttons {
74
+ display: grid;
75
+ gap: 8px;
76
+
77
+ @include from-br(sm) {
78
+ grid-template-columns: 1fr 1fr;
79
+ }
80
+ }
81
+ </style>
@@ -125,29 +125,53 @@ const emit = defineEmits<{
125
125
  .ui-img-gate {
126
126
  container-type: inline-size;
127
127
  background-color: $ui-img-gate-bg;
128
+ background-image: url('/img/age-gate.webp');
129
+ background-position: center;
130
+ background-size: cover;
128
131
  }
129
132
 
130
133
  .ui-img-gate__label {
131
- @include font-lg;
134
+ @include font-base;
132
135
 
133
136
  position: absolute;
134
- inset: 0;
137
+ top: 50%;
138
+ left: 50%;
135
139
  display: flex;
136
140
  align-items: center;
137
141
  justify-content: center;
138
- font-weight: 700;
139
- color: $ui-img-gate-text;
142
+ width: 56px;
143
+ height: 56px;
144
+ font-weight: 800;
145
+ letter-spacing: var(--tracking-tight);
146
+ color: $ui-img-gate-badge-text;
147
+ background-color: $ui-img-gate-badge-bg;
148
+ border: 2px solid $ui-img-gate-badge-border;
149
+ border-radius: $radius-full;
150
+ transform: translate(-50%, -50%);
140
151
  }
141
152
 
142
- @include to-cq(160px) {
153
+ @include to-cq(240px) {
143
154
  .ui-img-gate__label {
144
155
  @include font-xs;
156
+
157
+ width: 40px;
158
+ height: 40px;
145
159
  }
146
160
  }
147
161
 
148
- @include to-cq(56px) {
162
+ @include to-cq(96px) {
149
163
  .ui-img-gate__label {
150
164
  @include font-4xs;
165
+
166
+ width: 26px;
167
+ height: 26px;
168
+ border-width: 1px;
169
+ }
170
+ }
171
+
172
+ @include to-cq(40px) {
173
+ .ui-img-gate__label {
174
+ display: none;
151
175
  }
152
176
  }
153
177
  </style>
@@ -3,8 +3,8 @@
3
3
  "register_to_upload": "Please sign up or log in to upload your videos",
4
4
  "age_gate": {
5
5
  "thumb": "18+",
6
- "title": "Laws in your region require age verification to view 18+ content",
7
- "text": "Takes a minute, and we keep no personal data",
6
+ "title": "Age verification required",
7
+ "text": "Laws in your country or region require you to confirm you are 18+ to view adult content. It takes a minute, and we keep no personal data.",
8
8
  "button": "Verify age",
9
9
  "player_text": "Confirm your age to watch this video"
10
10
  },
@@ -12,7 +12,9 @@
12
12
 
13
13
  <LayoutSecondNav class="_to-sd"/>
14
14
 
15
- <LayoutAgeBanner/>
15
+ <ClientOnly>
16
+ <LazyLayoutAgePopup v-if="isAgeGated"/>
17
+ </ClientOnly>
16
18
 
17
19
  <main
18
20
  id="main"
@@ -60,5 +62,7 @@ const { snackbarText, isSnackBarInPopup } = useSnackbar();
60
62
 
61
63
  const { isAuthorized } = useUser(AuthorizationApiService);
62
64
 
65
+ const { isAgeGated } = useAgeGate();
66
+
63
67
  const htmlAttrs = computed(() => head.value.htmlAttrs);
64
68
  </script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.1074",
4
+ "version": "0.0.1075",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {
Binary file
@@ -1,108 +0,0 @@
1
- <!-- Плашка под шапкой, пока возрастная верификация требуется и не пройдена (useAgeGate) -->
2
- <template>
3
- <section
4
- v-if="isAgeGated"
5
- class="layout-age-banner"
6
- >
7
- <div class="layout-age-banner__inner _container">
8
- <p class="layout-age-banner__content">
9
- <strong class="layout-age-banner__title">{{ t('age_gate.title') }}</strong>
10
- <span class="layout-age-banner__text">{{ t('age_gate.text') }}</span>
11
- </p>
12
- <UiBtn
13
- :disabled="isPending"
14
- :title="t('age_gate.button')"
15
- theme="primary"
16
- size="l"
17
- class="layout-age-banner__btn"
18
- @click="onVerify"
19
- >{{ t('age_gate.button') }}</UiBtn>
20
- </div>
21
- </section>
22
- </template>
23
-
24
- <script setup lang="ts">
25
- const { t } = useI18n();
26
- const route = useRoute();
27
- const { isAgeGated, startVerification } = useAgeGate();
28
-
29
- const isPending = ref(false);
30
-
31
- const onVerify = async () => {
32
- isPending.value = true;
33
- try {
34
- await startVerification(route.fullPath);
35
- } finally {
36
- isPending.value = false;
37
- }
38
- };
39
- </script>
40
-
41
- <style lang="scss">
42
- .layout-age-banner {
43
- position: sticky;
44
- top: var(--header-height);
45
- z-index: calc(#{$z-index-header} - 2);
46
- padding-block: 10px;
47
- background-color: $layout-age-banner-bg;
48
-
49
- @include from-br($brkpnt-burger) {
50
- $layout-nav-height: 59px;
51
-
52
- top: calc(var(--header-height) + #{$layout-nav-height});
53
- padding-block: 12px;
54
- }
55
- }
56
-
57
- .layout-age-banner__inner {
58
- display: flex;
59
- flex-direction: column;
60
- align-items: center;
61
- gap: 12px;
62
- text-align: center;
63
-
64
- @include from-br(sm) {
65
- flex-direction: row;
66
- justify-content: space-between;
67
- gap: 32px;
68
- text-align: left;
69
- }
70
- }
71
-
72
- .layout-age-banner__content {
73
- display: flex;
74
- flex-direction: column;
75
- gap: 4px;
76
- }
77
-
78
- .layout-age-banner__title {
79
- @include font-base;
80
-
81
- font-weight: 700;
82
- color: $layout-age-banner-title;
83
-
84
- @include from-br(sm) {
85
- @include font-lg;
86
- }
87
- }
88
-
89
- .layout-age-banner__text {
90
- @include font-sm;
91
-
92
- color: $layout-age-banner-text;
93
-
94
- @include from-br(sm) {
95
- @include font-base;
96
- }
97
- }
98
-
99
- .layout-age-banner__btn {
100
- --button-bg: #{$layout-age-banner-btn-bg};
101
- --button-bg--hover: #{$layout-age-banner-btn-bg--hover};
102
- --button-text: #{$layout-age-banner-btn-text};
103
- --button-border: transparent;
104
-
105
- flex-shrink: 0;
106
- font-weight: 700;
107
- }
108
- </style>