itube-specs 0.0.1026 → 0.0.1028
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/scss/themes/dark/_theme.scss +0 -2
- package/assets/scss/themes/light/_theme.scss +0 -2
- package/components/filter/main.vue +2 -2
- package/components/info/model.vue +16 -2
- package/components/layout/header.vue +0 -3
- package/i18n/locales/de-DE.json +3 -1
- package/i18n/locales/en-US.json +2 -0
- package/i18n/locales/es-ES.json +3 -1
- package/i18n/locales/fr-FR.json +3 -1
- package/i18n/locales/it-IT.json +3 -1
- package/i18n/locales/ja-JP.json +3 -1
- package/i18n/locales/ko-KR.json +3 -1
- package/i18n/locales/ru-RU.json +3 -1
- package/i18n/locales/zh-CN.json +3 -1
- package/package.json +1 -1
- package/public/img/model-placeholder/gay-light-portrait.avif +0 -0
- package/public/img/model-placeholder/gay-light-portrait.webp +0 -0
- package/public/img/model-placeholder/gay-light-square.avif +0 -0
- package/public/img/model-placeholder/gay-light-square.webp +0 -0
- package/public/img/model-placeholder/shemale-light-portrait.avif +0 -0
- package/public/img/model-placeholder/shemale-light-portrait.webp +0 -0
- package/public/img/model-placeholder/shemale-light-square.avif +0 -0
- package/public/img/model-placeholder/shemale-light-square.webp +0 -0
- package/public/img/model-placeholder/straight-light-portrait.avif +0 -0
- package/public/img/model-placeholder/straight-light-portrait.webp +0 -0
- package/public/img/model-placeholder/straight-light-square.avif +0 -0
- package/public/img/model-placeholder/straight-light-square.webp +0 -0
- package/server/middleware/locale-redirect.ts +1 -0
- package/server/utils/__tests__/locale-redirect.test.ts +6 -0
- package/server/utils/locale-redirect.ts +3 -2
|
@@ -450,8 +450,6 @@ $header-language-trigger: $color-zinc-400;
|
|
|
450
450
|
$header-language-trigger--hover: $color-white;
|
|
451
451
|
$header-language-trigger-bg: transparent;
|
|
452
452
|
$header-language-trigger-bg--hover: transparent;
|
|
453
|
-
$header-language-badge-bg: $color-zinc-800;
|
|
454
|
-
$header-language-badge-text: $color-zinc-200;
|
|
455
453
|
$header-language-menu-bg: $color-night;
|
|
456
454
|
$header-language-menu-border: $color-zinc-800;
|
|
457
455
|
$header-language-menu-shadow: 0 20px 25px -5px #{$mono-black-25}, 0 8px 10px -6px #{$mono-black-25};
|
|
@@ -506,8 +506,6 @@ $header-language-trigger: $color-white;
|
|
|
506
506
|
$header-language-trigger--hover: $color-white;
|
|
507
507
|
$header-language-trigger-bg: $color-slate-750;
|
|
508
508
|
$header-language-trigger-bg--hover: $color-slate-700;
|
|
509
|
-
$header-language-badge-bg: $color-slate-850;
|
|
510
|
-
$header-language-badge-text: $color-white;
|
|
511
509
|
$header-language-menu-bg: $color-slate-850;
|
|
512
510
|
$header-language-menu-border: $color-white-10;
|
|
513
511
|
$header-language-menu-shadow: 0 20px 25px -5px #{$mono-black-25}, 0 8px 10px -6px #{$mono-black-25};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
/>
|
|
10
10
|
|
|
11
11
|
<transition>
|
|
12
|
-
<
|
|
12
|
+
<FilterPopup
|
|
13
13
|
v-if="filterOpen"
|
|
14
14
|
v-model="filterOpen"
|
|
15
15
|
:title="$t('filter')"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
</UiBtn>
|
|
38
38
|
</div>
|
|
39
39
|
</template>
|
|
40
|
-
</
|
|
40
|
+
</FilterPopup>
|
|
41
41
|
</transition>
|
|
42
42
|
</div>
|
|
43
43
|
</template>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
v-if="akaNames.length"
|
|
18
18
|
class="info-model__also"
|
|
19
19
|
>
|
|
20
|
-
<span class="info-model__also-title">{{
|
|
20
|
+
<span class="info-model__also-title">{{ akaTitle }}</span>
|
|
21
21
|
<template
|
|
22
22
|
v-for="name in akaNames"
|
|
23
23
|
:key="name"
|
|
@@ -206,6 +206,15 @@ const currentAvifSrc = computed(() => (isFallback.value ? placeholder.value.avif
|
|
|
206
206
|
|
|
207
207
|
const akaNames = computed(() => props.card.akaNames.split(', ').filter(Boolean));
|
|
208
208
|
|
|
209
|
+
const akaTitle = computed(() => {
|
|
210
|
+
const gender = (props.card.gender || '').toLowerCase();
|
|
211
|
+
|
|
212
|
+
if (gender === 'male' || /trans ?man/.test(gender)) return t('also_known_as_male');
|
|
213
|
+
if (gender === 'female' || /trans|shemale/.test(gender)) return t('also_known_as_female');
|
|
214
|
+
|
|
215
|
+
return t('also_known_as');
|
|
216
|
+
});
|
|
217
|
+
|
|
209
218
|
const socialItems = computed<ILinkItem[]>(() => (
|
|
210
219
|
Object.entries(props.card.social || {}).map(([key, value]) => ({
|
|
211
220
|
name: value || '',
|
|
@@ -342,8 +351,13 @@ const shareModelCard = computed<IModelCard>(() => ({
|
|
|
342
351
|
}
|
|
343
352
|
|
|
344
353
|
.info-model__also-name {
|
|
345
|
-
|
|
354
|
+
display: inline-block;
|
|
355
|
+
max-width: 100%;
|
|
356
|
+
overflow: hidden;
|
|
357
|
+
text-overflow: ellipsis;
|
|
346
358
|
white-space: nowrap;
|
|
359
|
+
vertical-align: top;
|
|
360
|
+
color: $info-model-also;
|
|
347
361
|
}
|
|
348
362
|
|
|
349
363
|
.info-model__also-name:not(:last-of-type)::after {
|
package/i18n/locales/de-DE.json
CHANGED
package/i18n/locales/en-US.json
CHANGED
package/i18n/locales/es-ES.json
CHANGED
package/i18n/locales/fr-FR.json
CHANGED
package/i18n/locales/it-IT.json
CHANGED
package/i18n/locales/ja-JP.json
CHANGED
package/i18n/locales/ko-KR.json
CHANGED
package/i18n/locales/ru-RU.json
CHANGED
package/i18n/locales/zh-CN.json
CHANGED
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -25,12 +25,18 @@ describe('resolveLocaleRedirect', () => {
|
|
|
25
25
|
subdomains: { ru: 'ru', ja: 'jp', de: 'de' },
|
|
26
26
|
codes: CODES,
|
|
27
27
|
defaultCode: 'en',
|
|
28
|
+
protocol: 'https',
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
it('уводит с базового домена на поддомен языка браузера', () => {
|
|
31
32
|
expect(resolveLocaleRedirect(base)).toEqual({ vary: true, location: 'https://jp.a.com/videos?page=2' });
|
|
32
33
|
});
|
|
33
34
|
|
|
35
|
+
it('протокол — как у запроса: локально без прокси остаётся http', () => {
|
|
36
|
+
expect(resolveLocaleRedirect({ ...base, headers: { ...base.headers, host: 'localhost:3200' }, protocol: 'http' }).location)
|
|
37
|
+
.toBe('http://jp.localhost:3200/videos?page=2');
|
|
38
|
+
});
|
|
39
|
+
|
|
34
40
|
it('язык браузера — дефолтный: без редиректа, но с Vary', () => {
|
|
35
41
|
expect(resolveLocaleRedirect({ ...base, headers: { ...base.headers, 'accept-language': 'en-US' } })).toEqual({ vary: true });
|
|
36
42
|
});
|
|
@@ -52,6 +52,8 @@ export interface ILocaleRedirectInput {
|
|
|
52
52
|
subdomains: LocaleSubdomains
|
|
53
53
|
codes: readonly string[]
|
|
54
54
|
defaultCode: string
|
|
55
|
+
/** Протокол запроса (`getRequestProtocol` с учётом x-forwarded-proto): без прокси локально — http. */
|
|
56
|
+
protocol: string
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
export interface ILocaleRedirectDecision {
|
|
@@ -69,7 +71,7 @@ export interface ILocaleRedirectDecision {
|
|
|
69
71
|
* переключателем, а cookie могла не доехать: на localhost она живёт только на своём поддомене.
|
|
70
72
|
*/
|
|
71
73
|
export function resolveLocaleRedirect(input: ILocaleRedirectInput): ILocaleRedirectDecision {
|
|
72
|
-
const { method, path, headers, langCookie, subdomains, codes, defaultCode } = input;
|
|
74
|
+
const { method, path, headers, langCookie, subdomains, codes, defaultCode, protocol } = input;
|
|
73
75
|
const skip = { vary: false };
|
|
74
76
|
|
|
75
77
|
if (method !== 'GET') return skip;
|
|
@@ -97,7 +99,6 @@ export function resolveLocaleRedirect(input: ILocaleRedirectInput): ILocaleRedir
|
|
|
97
99
|
const target = localeDomain(detected, baseDomainFromHost(host, subdomains), subdomains);
|
|
98
100
|
if (target === host) return { vary: true };
|
|
99
101
|
|
|
100
|
-
const protocol = headers['x-forwarded-proto'] || 'https';
|
|
101
102
|
|
|
102
103
|
return { vary: true, location: `${protocol}://${target}${path}` };
|
|
103
104
|
}
|