itube-specs 0.0.695 → 0.0.698

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.
@@ -106,9 +106,7 @@ function close() {
106
106
  open.value = false;
107
107
 
108
108
  if (isTablet.value) {
109
- nextTick(() => {
110
- menuRef.value?.close?.()
111
- })
109
+ menuRef.value?.close?.();
112
110
  }
113
111
  }
114
112
 
@@ -124,6 +122,7 @@ watch(open, (val) => {
124
122
  onBeforeUnmount(() => {
125
123
  if (open.value && isTablet.value) {
126
124
  scrollUnlock();
125
+ menuRef.value?.close?.();
127
126
  }
128
127
  });
129
128
 
@@ -112,7 +112,8 @@ export const useUser = (apiService) => {
112
112
  const {generateLink} = useGenerateLink();
113
113
  const cookie = useCookie('jwtoken', { path: '/', secure: true, httpOnly: false });
114
114
  cookie.value = undefined; // или null
115
- document.cookie = "jwtoken=; path=/; domain=gay.cool; expires=Thu, 01 Jan 1970 00:00:00 GMT; Secure";;
115
+ const domain = useRuntimeConfig().public.xDomain;
116
+ document.cookie = `jwtoken=; path=/; domain=${domain}; expires=Thu, 01 Jan 1970 00:00:00 GMT; Secure`;
116
117
 
117
118
  const profile = useState<IProfileData | null>('profileData');
118
119
  profile.value = null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.695",
4
+ "version": "0.0.698",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {
@@ -1,11 +1,8 @@
1
1
  import type { IRawModelCard, IModelCard, IModelParameter } from '../../../types';
2
2
  import { ThumbSize } from '../../enums/thumb-size';
3
3
 
4
- const PIERCING_NAME = 'tattoos_presence';
5
- const TATTOOS_NAME = 'piercings_presence';
6
- const parameters = ['height_cm', 'weight_kg', PIERCING_NAME, TATTOOS_NAME];
7
- const iconOnlyParameters = [PIERCING_NAME, TATTOOS_NAME];
8
- const age = (card: IRawModelCard) => card.parameters.find(item => item.name === 'age')?.values[0].title
4
+ const parameterNames = ['height_cm', 'weight_kg'];
5
+ const age = (card: IRawModelCard) => card.parameters.find(item => item.name === 'age')?.values[0].title;
9
6
 
10
7
  export const cleanModelCard = (card: IRawModelCard): IModelCard => ({
11
8
  title: card.title || '',
@@ -16,24 +13,15 @@ export const cleanModelCard = (card: IRawModelCard): IModelCard => ({
16
13
  country: {
17
14
  title: card.parameters?.find(item => item.name === 'birthplace_country')?.values[0].title || '',
18
15
  name: card.parameters?.find(item => item.name === 'birthplace_country')?.values[0].name || '',
19
- } ,
16
+ },
20
17
  parameters: [
21
18
  ...(age(card) ? [{
22
19
  title: 'age',
23
20
  value: age(card),
24
21
  }] : []),
25
- ...card.parameters.filter(item => parameters.includes(item.name) && item.values?.length).map((item: IModelParameter) => {
26
- if (iconOnlyParameters.includes(item.name)) {
27
- return {
28
- icon: item.name.split('_')[0],
29
- title: item.name,
30
- value: item.values?.[0]?.name,
31
- }
32
- }
33
- return {
34
- title: item.name,
35
- value: item.values?.[0]?.title,
36
- }
37
- }),
22
+ ...card.parameters.filter(item => parameterNames.includes(item.name) && item.values?.length).map((item: IModelParameter) => ({
23
+ title: item.name,
24
+ value: item.values?.[0]?.title,
25
+ })),
38
26
  ],
39
27
  });
@@ -10,7 +10,6 @@ export interface IModelCard {
10
10
  title: string
11
11
  };
12
12
  parameters: {
13
- icon?: string
14
13
  title?: string
15
14
  value?: string
16
15
  }[];