itube-specs 0.0.529 → 0.0.533
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/components/auth/s-auth-icon.vue +20 -0
- package/components/auth/s-auth-login.vue +20 -19
- package/components/auth/s-auth-recovery.vue +21 -22
- package/components/auth/s-auth-register.vue +23 -23
- package/components/page-components/s-pagination.vue +4 -4
- package/components/page-components/s-videos-title.vue +6 -1
- package/components/ui/s-count.vue +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="s-auth-icon">
|
|
3
|
+
<SIcon
|
|
4
|
+
class="s-auth-icon__icon"
|
|
5
|
+
:name="icon"
|
|
6
|
+
size="24"
|
|
7
|
+
/>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
const props = withDefaults(defineProps<{
|
|
13
|
+
icon?: string
|
|
14
|
+
}>(), {
|
|
15
|
+
icon: 'user-filled'
|
|
16
|
+
})
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<style scoped lang="scss">
|
|
20
|
+
</style>
|
|
@@ -3,11 +3,8 @@
|
|
|
3
3
|
class="s-auth-login"
|
|
4
4
|
:class="{'_loading': loading}"
|
|
5
5
|
>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
name="user-circle"
|
|
9
|
-
size="40"
|
|
10
|
-
/>
|
|
6
|
+
|
|
7
|
+
<SAuthIcon class="s-auth-login__icon"/>
|
|
11
8
|
|
|
12
9
|
<SInput
|
|
13
10
|
v-model="form.username"
|
|
@@ -33,20 +30,24 @@
|
|
|
33
30
|
@click="login"
|
|
34
31
|
>{{ t('auth.log_in') }}
|
|
35
32
|
</SButton>
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
theme="ghost"
|
|
33
|
+
<button
|
|
34
|
+
class="s-auth-login__forgot"
|
|
35
|
+
type="button"
|
|
40
36
|
@click="onForgotClick"
|
|
41
|
-
>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
>
|
|
38
|
+
{{ t('auth.forgot') }}
|
|
39
|
+
</button>
|
|
40
|
+
|
|
41
|
+
<p class="s-auth-login__back">
|
|
42
|
+
{{ t('register_text') }}
|
|
43
|
+
<button
|
|
44
|
+
class="s-auth-login__back-button"
|
|
45
|
+
type="button"
|
|
46
|
+
@click="onCreateClick"
|
|
47
|
+
>
|
|
48
|
+
{{ t('auth.sign_up') }}
|
|
49
|
+
</button>
|
|
50
|
+
</p>
|
|
50
51
|
</div>
|
|
51
52
|
</div>
|
|
52
53
|
</template>
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
import { validatePassword, validateUsername } from '../../runtime';
|
|
56
57
|
import { AuthorizationApiService } from '~/services/api/authorization.service';
|
|
57
58
|
|
|
58
|
-
const {t} = useI18n();
|
|
59
|
+
const { t } = useI18n();
|
|
59
60
|
|
|
60
61
|
const form = ref({
|
|
61
62
|
username: '',
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
class="s-auth-recovery"
|
|
4
4
|
:class="{'_loading': loading}"
|
|
5
5
|
>
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
<SAuthIcon
|
|
7
8
|
class="s-auth-recovery__icon"
|
|
8
|
-
|
|
9
|
-
size="40"
|
|
9
|
+
icon="envelope"
|
|
10
10
|
/>
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
<p class="s-auth-recovery__text">{{ t('auth.recovery_text') }}</p>
|
|
12
13
|
<SInput
|
|
13
14
|
v-model="form.email"
|
|
14
15
|
label="Email"
|
|
@@ -17,23 +18,21 @@
|
|
|
17
18
|
@update:error="(val: boolean) => error.email = val"
|
|
18
19
|
/>
|
|
19
20
|
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</SButton>
|
|
36
|
-
</div>
|
|
21
|
+
<SButton
|
|
22
|
+
class="s-auth-recovery__button"
|
|
23
|
+
wide
|
|
24
|
+
size="l"
|
|
25
|
+
:disabled="loading"
|
|
26
|
+
theme="primary"
|
|
27
|
+
@click="submit"
|
|
28
|
+
>{{ t('auth.get_recovery') }}
|
|
29
|
+
</SButton>
|
|
30
|
+
<button
|
|
31
|
+
class="s-auth-recovery__login"
|
|
32
|
+
type="button"
|
|
33
|
+
@click="onLoginClick"
|
|
34
|
+
>{{ t('auth.back_to_login') }}
|
|
35
|
+
</button>
|
|
37
36
|
</div>
|
|
38
37
|
</template>
|
|
39
38
|
|
|
@@ -44,7 +43,7 @@ import { AuthorizationApiService } from '~/services/api/authorization.service';
|
|
|
44
43
|
|
|
45
44
|
const { initRecaptcha, getRecaptchaToken } = useRecaptcha();
|
|
46
45
|
|
|
47
|
-
const {t} = useI18n();
|
|
46
|
+
const { t } = useI18n();
|
|
48
47
|
|
|
49
48
|
const form = ref({
|
|
50
49
|
email: '',
|
|
@@ -4,22 +4,12 @@
|
|
|
4
4
|
class="s-auth-register"
|
|
5
5
|
:class="{'_loading': loading}"
|
|
6
6
|
>
|
|
7
|
-
<
|
|
8
|
-
class="s-auth-register__icon"
|
|
9
|
-
name="user-circle"
|
|
10
|
-
size="40"
|
|
11
|
-
/>
|
|
7
|
+
<SAuthIcon class="s-auth-register__icon" />
|
|
12
8
|
<p
|
|
13
9
|
v-if="additionalText"
|
|
14
10
|
class="s-auth-register__text"
|
|
15
|
-
>{{ t(additionalText) }}
|
|
16
|
-
|
|
17
|
-
v-model="form.username"
|
|
18
|
-
:label="t('auth.username')"
|
|
19
|
-
name="login-name"
|
|
20
|
-
:error="error.username"
|
|
21
|
-
@update:error="(val: boolean) => error.username = val"
|
|
22
|
-
/>
|
|
11
|
+
>{{ t(additionalText) }}
|
|
12
|
+
</p>
|
|
23
13
|
<SInput
|
|
24
14
|
v-model="form.email"
|
|
25
15
|
:label="t('email')"
|
|
@@ -27,6 +17,13 @@
|
|
|
27
17
|
:error="error.email"
|
|
28
18
|
@update:error="(val: boolean) => error.email = val"
|
|
29
19
|
/>
|
|
20
|
+
<SInput
|
|
21
|
+
v-model="form.username"
|
|
22
|
+
:label="t('login')"
|
|
23
|
+
name="login-name"
|
|
24
|
+
:error="error.username"
|
|
25
|
+
@update:error="(val: boolean) => error.username = val"
|
|
26
|
+
/>
|
|
30
27
|
<SInput
|
|
31
28
|
v-model="form.password_hash"
|
|
32
29
|
:label="t('auth.password')"
|
|
@@ -45,13 +42,15 @@
|
|
|
45
42
|
@click="submit"
|
|
46
43
|
>{{ t('auth.sign_up') }}
|
|
47
44
|
</SButton>
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
<p class="s-auth-register__login">
|
|
46
|
+
{{ t('login_text') }}
|
|
47
|
+
<button
|
|
48
|
+
class="s-auth-register__login-button"
|
|
49
|
+
type="button"
|
|
50
|
+
@click="onLoginClick">
|
|
51
|
+
{{ t('auth.log_in') }}
|
|
52
|
+
</button>
|
|
53
|
+
</p>
|
|
55
54
|
</div>
|
|
56
55
|
|
|
57
56
|
<p class="s-auth-register__agreement">{{ t('auth.agree_begin') }}
|
|
@@ -59,8 +58,9 @@
|
|
|
59
58
|
class="s-auth-register__agreement-link"
|
|
60
59
|
to="/terms"
|
|
61
60
|
target="_blank"
|
|
62
|
-
>{{ t('auth.agree_terms')}}
|
|
63
|
-
</NuxtLink>
|
|
61
|
+
>{{ t('auth.agree_terms') }}
|
|
62
|
+
</NuxtLink>
|
|
63
|
+
{{ t('auth.agree_and') }}
|
|
64
64
|
<NuxtLink
|
|
65
65
|
class="s-auth-register__agreement-link"
|
|
66
66
|
to="/policy"
|
|
@@ -145,7 +145,7 @@ async function submit() {
|
|
|
145
145
|
loading.value = true;
|
|
146
146
|
|
|
147
147
|
// Уникальное действие для каждой формы
|
|
148
|
-
|
|
148
|
+
// здесь 'register', в других формах — 'password_reset' или 'contact_form'
|
|
149
149
|
form.value.token = await getRecaptchaToken('register');
|
|
150
150
|
|
|
151
151
|
await useUser(AuthorizationApiService).register(form.value);
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
>
|
|
98
98
|
<SIcon
|
|
99
99
|
v-if="arrowIcon"
|
|
100
|
-
name="
|
|
101
|
-
size="
|
|
100
|
+
name="angle-left"
|
|
101
|
+
size="16"
|
|
102
102
|
/>
|
|
103
103
|
{{ t('previous' )}}
|
|
104
104
|
</SLink>
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
{{ t('next') }}
|
|
113
113
|
<SIcon
|
|
114
114
|
v-if="arrowIcon"
|
|
115
|
-
name="
|
|
116
|
-
size="
|
|
115
|
+
name="angle-right"
|
|
116
|
+
size="16"
|
|
117
117
|
/>
|
|
118
118
|
</SLink>
|
|
119
119
|
</nav>
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
<h1 v-if="titleTag === 'h1'" class="s-videos-title__title _title" v-html="title"/>
|
|
4
4
|
<h2 v-else-if="titleTag === 'h2'" class="s-videos-title__title _title" v-html="title"/>
|
|
5
5
|
<h3 v-else-if="titleTag === 'h3'" class="s-videos-title__title _title" v-html="title"/>
|
|
6
|
-
<SCount
|
|
6
|
+
<SCount
|
|
7
|
+
v-if="count"
|
|
8
|
+
class="s-videos-title__count"
|
|
9
|
+
:icon="icon"
|
|
10
|
+
>{{ count }}</SCount>
|
|
7
11
|
</div>
|
|
8
12
|
</template>
|
|
9
13
|
|
|
@@ -12,6 +16,7 @@ withDefaults(defineProps<{
|
|
|
12
16
|
count?: number
|
|
13
17
|
titleTag?: string
|
|
14
18
|
title: string
|
|
19
|
+
icon?: string
|
|
15
20
|
}>(), {
|
|
16
21
|
titleTag: 'h1'
|
|
17
22
|
})
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span
|
|
3
3
|
class="s-count"
|
|
4
|
-
|
|
4
|
+
>
|
|
5
|
+
<SIcon v-if="icon" :name="icon" size="16" />
|
|
6
|
+
<slot/>
|
|
5
7
|
</span>
|
|
6
8
|
</template>
|
|
7
9
|
|
|
8
10
|
<script setup lang="ts">
|
|
11
|
+
defineProps<{
|
|
12
|
+
icon?: string
|
|
13
|
+
}>()
|
|
9
14
|
</script>
|
|
10
15
|
|
|
11
16
|
<style scoped lang="scss">
|