@ozdao/prometheus-framework 0.1.78 → 0.1.80
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.css +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -224
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +224 -2
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +33 -30
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +41 -43
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +33 -35
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +44 -46
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +83 -81
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +44 -46
- package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.js +38 -0
- package/dist/prometheus-framework/src/modules/auth/router/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/router/auth.js +114 -111
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +93 -75
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +4 -3
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +12 -11
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +12 -11
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +5 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +20 -19
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +15 -13
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/prometheus-framework.cjs.js +10 -10
- package/dist/prometheus-framework.es.js +8 -5
- package/dist/style.css +1 -1
- package/package.json +1 -2
- package/src/components/Field/Field.vue +4 -1
- package/src/modules/auth/components/layouts/Auth.vue +45 -36
- package/src/modules/auth/components/pages/EnterCode.vue +0 -17
- package/src/modules/auth/components/pages/EnterPassword.vue +0 -23
- package/src/modules/auth/components/pages/ResetPassword.vue +0 -27
- package/src/modules/auth/components/pages/SignIn.vue +26 -54
- package/src/modules/auth/components/pages/SignUp.vue +0 -29
- package/src/modules/auth/localization/EnterCode.json +14 -0
- package/src/modules/auth/localization/EnterPassword.json +20 -0
- package/src/modules/auth/localization/ResetPassword.json +24 -0
- package/src/modules/auth/localization/SignIn.json +34 -0
- package/src/modules/auth/localization/SignUp.json +26 -0
- package/src/modules/auth/router/auth.js +95 -86
- package/src/modules/auth/store/auth.js +20 -20
- package/src/modules/constructor/components/elements/Bullets.vue +1 -0
- package/src/modules/constructor/components/elements/Caption.vue +1 -0
- package/src/modules/constructor/components/elements/H2.vue +1 -0
- package/src/modules/constructor/components/elements/ImageUpload.vue +1 -1
- package/src/modules/constructor/components/elements/Textarea.vue +1 -0
- package/src/modules/globals/localization/methods/get-app-locales.js +13 -0
- package/src/modules/globals/localization/vue-i18n.js +20 -14
- package/src/modules/globals/localization/vue-i18n.singleton.js +1 -1
- package/src/modules/middlewares/client/inputs.validation.js +1 -0
- package/src/modules/globals/localization/vue-i18n-new.js +0 -70
@@ -1,50 +1,16 @@
|
|
1
|
-
<i18n>
|
2
|
-
{
|
3
|
-
"en": {
|
4
|
-
"title": "Welcome to The Commune",
|
5
|
-
"subtitle": "Sign In to Continue",
|
6
|
-
"signup": "Don't have an account?",
|
7
|
-
"phone": "Phone",
|
8
|
-
"email": "Email",
|
9
|
-
"phonePlaceholder": "Enter your phone",
|
10
|
-
"emailPlaceholder": "Enter your email",
|
11
|
-
"haveAccount": "Don't have an account? Sign Up",
|
12
|
-
"passwordPlaceholder": "Enter your password",
|
13
|
-
"forgotPassword": "Forgot Password?",
|
14
|
-
"signin": "Sign In",
|
15
|
-
"signin_apple": "Sign In with Apple",
|
16
|
-
"soon": "SOON"
|
17
|
-
},
|
18
|
-
"ru": {
|
19
|
-
"title": "Приветствуем вас,",
|
20
|
-
"subtitle": "Войдите для продолжения",
|
21
|
-
"signup": "Нет аккаунта?",
|
22
|
-
"phone": "Телефон",
|
23
|
-
"email": "Email",
|
24
|
-
"phonePlaceholder": "Введите ваш телефон",
|
25
|
-
"emailPlaceholder": "Введите ваш email",
|
26
|
-
"haveAccount": "Нет аккаунта? Зарегистрироваться",
|
27
|
-
"passwordPlaceholder": "Введите ваш пароль",
|
28
|
-
"forgotPassword": "Забыли пароль?",
|
29
|
-
"signin": "Войти",
|
30
|
-
"signin_apple": "Войти через Apple",
|
31
|
-
"soon": "СКОРО"
|
32
|
-
}
|
33
|
-
}
|
34
|
-
</i18n>
|
35
|
-
|
36
1
|
<template>
|
37
2
|
<section class="">
|
38
3
|
<!-- Header -->
|
39
|
-
|
4
|
+
<img :src="'/logo/logo_square.svg'" class="i-extra mn-small">
|
5
|
+
|
40
6
|
<h3 class="mn-medium">
|
41
|
-
{{
|
7
|
+
{{ t('title') }}
|
42
8
|
<br>
|
43
|
-
<span class="t-semi">{{
|
9
|
+
<span class="t-semi">{{ t('subtitle') }}</span>
|
44
10
|
</h3>
|
45
11
|
<p class="mn-big">
|
46
12
|
|
47
|
-
<router-link :to="{name: 'Sign Up'}" class="underline t-second">{{
|
13
|
+
<router-link :to="{name: 'Sign Up'}" class="underline t-second">{{ t('signup') }}</router-link>
|
48
14
|
</p>
|
49
15
|
|
50
16
|
<!-- Select -->
|
@@ -52,8 +18,8 @@
|
|
52
18
|
<Tab
|
53
19
|
v-model:selected="tabAuth"
|
54
20
|
:tabs="[
|
55
|
-
{name:
|
56
|
-
{name:
|
21
|
+
{name: t('phone'), value: 'phone'},
|
22
|
+
{name: t('email'), value: 'email'}
|
57
23
|
]"
|
58
24
|
/>
|
59
25
|
</div>
|
@@ -72,7 +38,7 @@
|
|
72
38
|
}"
|
73
39
|
:validation="phoneValidation"
|
74
40
|
mode="national"
|
75
|
-
:inputOptions="{placeholder:
|
41
|
+
:inputOptions="{placeholder: t('phonePlaceholder')}"
|
76
42
|
class="bg-grey pd-small radius-small mn-thin"
|
77
43
|
/>
|
78
44
|
|
@@ -82,7 +48,7 @@
|
|
82
48
|
<div v-show="tabAuth === 'email'" class="mn-thin radius-small o-hidden">
|
83
49
|
<Field
|
84
50
|
v-model:field="auth.state.user.email"
|
85
|
-
:placeholder="
|
51
|
+
:placeholder="t('emailPlaceholder')"
|
86
52
|
:validation="emailValidation"
|
87
53
|
class="bg-grey pd-medium radius-small"
|
88
54
|
/>
|
@@ -95,7 +61,7 @@
|
|
95
61
|
v-model:field="auth.state.user.password"
|
96
62
|
type="password"
|
97
63
|
:validation="passswordValidation"
|
98
|
-
:placeholder="
|
64
|
+
:placeholder="t('passwordPlaceholder')"
|
99
65
|
class="
|
100
66
|
bg-grey
|
101
67
|
pd-medium
|
@@ -109,7 +75,7 @@
|
|
109
75
|
to="/auth/reset-password"
|
110
76
|
class="underline d-block t-blue"
|
111
77
|
>
|
112
|
-
{{
|
78
|
+
{{ t('forgotPassword') }}
|
113
79
|
</router-link>
|
114
80
|
</div>
|
115
81
|
<!-- Button -->
|
@@ -118,7 +84,7 @@
|
|
118
84
|
:callback="redirectTo"
|
119
85
|
class="mn-thin"
|
120
86
|
>
|
121
|
-
{{
|
87
|
+
{{ t('signin') }}
|
122
88
|
</Button>
|
123
89
|
|
124
90
|
<!-- <Button
|
@@ -126,7 +92,7 @@
|
|
126
92
|
:callback="redirectTo"
|
127
93
|
class="mn-thin bg-black t-white"
|
128
94
|
>
|
129
|
-
{{
|
95
|
+
{{ t('signin_apple') }}
|
130
96
|
</Button> -->
|
131
97
|
</section>
|
132
98
|
</template>
|
@@ -141,6 +107,8 @@ import Button from '@pf/src/components/Button/Button.vue'
|
|
141
107
|
import { computed, onMounted, ref, inject } from 'vue'
|
142
108
|
import { useRoute, useRouter } from 'vue-router'
|
143
109
|
import { useI18n } from 'vue-i18n'
|
110
|
+
// Import localization
|
111
|
+
import text from '@pf/src/modules/auth/localization/SignIn.json'
|
144
112
|
// Import state
|
145
113
|
import * as auth from '@pf/src/modules/auth/store/auth'
|
146
114
|
// Import validation
|
@@ -152,11 +120,10 @@ const emailValidation = ref(null)
|
|
152
120
|
// Accessing router
|
153
121
|
const route = useRoute()
|
154
122
|
const router = useRouter()
|
123
|
+
// Localization
|
124
|
+
const { t } = useI18n(text)
|
155
125
|
// Accessing state
|
156
126
|
const tabAuth = ref('phone')
|
157
|
-
// OUATH ENV
|
158
|
-
const clientId = inject('APPLE_CLIENTID')
|
159
|
-
const redirectURI = inject('APPLE_REDIRECT_URL')
|
160
127
|
|
161
128
|
const loadExternalScript = (src) => {
|
162
129
|
return new Promise((resolve, reject) => {
|
@@ -190,16 +157,21 @@ async function onSubmit() {
|
|
190
157
|
} catch (error) {
|
191
158
|
throw new Error
|
192
159
|
}
|
193
|
-
|
194
|
-
|
160
|
+
|
161
|
+
// COSTIL PLEASE GOD MAKE IT GOOD, FUKEN INPUT COMPONENT RETURN OBJECT NUT NUMBER
|
162
|
+
const userCopy = {...auth.state.user};
|
163
|
+
userCopy.phone = auth.state.user.phone.number
|
164
|
+
// COSTIL PLEASE GOD MAKE IT GOOD, FUKEN INPUT COMPONENT RETURN OBJECT NUT NUMBER
|
165
|
+
|
166
|
+
await auth.actions.login(userCopy, tabAuth.value)
|
195
167
|
}
|
196
168
|
|
197
169
|
async function onSubmitApple() {
|
198
170
|
try {
|
199
171
|
window.AppleID.auth.init({
|
200
|
-
clientId:
|
172
|
+
clientId: 'com.thecommune.app.signin',
|
201
173
|
scope: 'email name',
|
202
|
-
redirectURI:
|
174
|
+
redirectURI: 'https://thecommunephuket.com/auth/signin',
|
203
175
|
usePopup: true,
|
204
176
|
});
|
205
177
|
|
@@ -1,32 +1,3 @@
|
|
1
|
-
<i18n>
|
2
|
-
{
|
3
|
-
"en": {
|
4
|
-
"title": "Sign Up to The Commune",
|
5
|
-
"description": "Choose a convenient way to register via phone or email:",
|
6
|
-
"phone": "Phone",
|
7
|
-
"email": "Email",
|
8
|
-
"phonePlaceholder": "Enter your phone",
|
9
|
-
"emailPlaceholder": "Enter your email",
|
10
|
-
"emailNotice": "We will send you an email with a confirmation code that you will need to enter in the next step.",
|
11
|
-
"smsNotice": "We will send you an SMS with a confirmation code that you will need to enter in the next step.",
|
12
|
-
"sendCode": "Send Code",
|
13
|
-
"haveAccount": "Already have an account?"
|
14
|
-
},
|
15
|
-
"ru": {
|
16
|
-
"title": "Новая учетная запись",
|
17
|
-
"description": "Выберите удобный способ регистрации через телефон или email:",
|
18
|
-
"phone": "Телефон",
|
19
|
-
"email": "Email",
|
20
|
-
"phonePlaceholder": "Введите ваш телефон",
|
21
|
-
"emailPlaceholder": "Введите ваш email",
|
22
|
-
"emailNotice": "Мы отправим вам электронное письмо с кодом подтверждения, который вы должны будете ввести в следующем шаге.",
|
23
|
-
"smsNotice": "Мы вышлем вам SMS с кодом подтверждения, который вы должны будете ввести в следующем шаге.",
|
24
|
-
"sendCode": "Отправить код",
|
25
|
-
"haveAccount": "У вас уже есть аккаунт?"
|
26
|
-
}
|
27
|
-
}
|
28
|
-
</i18n>
|
29
|
-
|
30
1
|
<template>
|
31
2
|
<section class="t-left pd-medium">
|
32
3
|
<!-- Header -->
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"en": {
|
3
|
+
"verifyNumberTitle": "Verify Number",
|
4
|
+
"instructions": "We have sent a registration code to your phone number. Please enter it in the field below:",
|
5
|
+
"resendCode": "Send the code again",
|
6
|
+
"secondsResend": "seconds to the possibility of sending the code again."
|
7
|
+
},
|
8
|
+
"ru": {
|
9
|
+
"verifyNumberTitle": "Подтвердите номер",
|
10
|
+
"instructions": "Мы отправили код регистрации на ваш номер телефона. Введите его в поле ниже:",
|
11
|
+
"resendCode": "Отправить код еще раз",
|
12
|
+
"secondsResend": "секунд до возможности отправить код еще раз."
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"en": {
|
3
|
+
"almostDone": "Almost there!",
|
4
|
+
"newPasswordPrompt": "Please, set a new password.",
|
5
|
+
"registrationPasswordPrompt": "Please, set your password to complete the registration.",
|
6
|
+
"passwordPlaceholder": "Password",
|
7
|
+
"repeatPasswordPlaceholder": "Repeat Password",
|
8
|
+
"changePasswordBtn": "Change Password",
|
9
|
+
"registerBtn": "Register"
|
10
|
+
},
|
11
|
+
"ru": {
|
12
|
+
"almostDone": "Почти все!",
|
13
|
+
"newPasswordPrompt": "Пожалуйста, укажите новый пароль.",
|
14
|
+
"registrationPasswordPrompt": "Пожалуйста, укажите пароль, на этом регистрация будет закончена.",
|
15
|
+
"passwordPlaceholder": "Пароль",
|
16
|
+
"repeatPasswordPlaceholder": "Повторите пароль",
|
17
|
+
"changePasswordBtn": "Поменять пароль",
|
18
|
+
"registerBtn": "Зарегистрироваться"
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"en": {
|
3
|
+
"forgotPasswordTitle": "Forgot Password?",
|
4
|
+
"instructions": "To reset your password, specify the phone or email used during registration.",
|
5
|
+
"smsInfo": "We will send you an SMS with a confirmation code to reset your password, which you will need to enter in the next step.",
|
6
|
+
"emailInfo": "We will send you an email with a confirmation code to reset your password, which you will need to enter in the next step.",
|
7
|
+
"phone": "Phone",
|
8
|
+
"email": "Email",
|
9
|
+
"phonePlaceholder": "Enter your phone",
|
10
|
+
"emailPlaceholder": "Enter your email",
|
11
|
+
"sendCode": "Send code"
|
12
|
+
},
|
13
|
+
"ru": {
|
14
|
+
"forgotPasswordTitle": "Забыли пароль?",
|
15
|
+
"instructions": "Чтобы сбросить пароль, укажите телефон или email, использованные при регистрации.",
|
16
|
+
"smsInfo": "Мы вышлем вам SMS с кодом подтверждения для сброса пароля, который вы должны будете ввести в следующем шаге.",
|
17
|
+
"emailInfo": "Мы отправим вам электронное письмо с кодом подтверждения для сброса пароля, который вы должны будете ввести в следующем шаге.",
|
18
|
+
"phone": "Телефон",
|
19
|
+
"email": "Email",
|
20
|
+
"phonePlaceholder": "Введите ваш телефон",
|
21
|
+
"emailPlaceholder": "Введите ваш email",
|
22
|
+
"sendCode": "Отправить код"
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"messages": {
|
3
|
+
"en": {
|
4
|
+
"title": "Welcome to Weeder",
|
5
|
+
"subtitle": "Sign In to Continue",
|
6
|
+
"signup": "Don't have an account?",
|
7
|
+
"phone": "Phone",
|
8
|
+
"email": "Email",
|
9
|
+
"phonePlaceholder": "Enter your phone",
|
10
|
+
"emailPlaceholder": "Enter your email",
|
11
|
+
"haveAccount": "Don't have an account? Sign Up",
|
12
|
+
"passwordPlaceholder": "Enter your password",
|
13
|
+
"forgotPassword": "Forgot Password?",
|
14
|
+
"signin": "Sign In",
|
15
|
+
"signin_apple": "Sign In with Apple",
|
16
|
+
"soon": "SOON"
|
17
|
+
},
|
18
|
+
"ru": {
|
19
|
+
"title": "Приветствуем вас,",
|
20
|
+
"subtitle": "Войдите для продолжения",
|
21
|
+
"signup": "Нет аккаунта?",
|
22
|
+
"phone": "Телефон",
|
23
|
+
"email": "Email",
|
24
|
+
"phonePlaceholder": "Введите ваш телефон",
|
25
|
+
"emailPlaceholder": "Введите ваш email",
|
26
|
+
"haveAccount": "Нет аккаунта? Зарегистрироваться",
|
27
|
+
"passwordPlaceholder": "Введите ваш пароль",
|
28
|
+
"forgotPassword": "Забыли пароль?",
|
29
|
+
"signin": "Войти",
|
30
|
+
"signin_apple": "Войти через Apple",
|
31
|
+
"soon": "СКОРО"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"en": {
|
3
|
+
"title": "Sign Up to The Commune",
|
4
|
+
"description": "Choose a convenient way to register via phone or email:",
|
5
|
+
"phone": "Phone",
|
6
|
+
"email": "Email",
|
7
|
+
"phonePlaceholder": "Enter your phone",
|
8
|
+
"emailPlaceholder": "Enter your email",
|
9
|
+
"emailNotice": "We will send you an email with a confirmation code that you will need to enter in the next step.",
|
10
|
+
"smsNotice": "We will send you an SMS with a confirmation code that you will need to enter in the next step.",
|
11
|
+
"sendCode": "Send Code",
|
12
|
+
"haveAccount": "Already have an account?"
|
13
|
+
},
|
14
|
+
"ru": {
|
15
|
+
"title": "Новая учетная запись",
|
16
|
+
"description": "Выберите удобный способ регистрации через телефон или email:",
|
17
|
+
"phone": "Телефон",
|
18
|
+
"email": "Email",
|
19
|
+
"phonePlaceholder": "Введите ваш телефон",
|
20
|
+
"emailPlaceholder": "Введите ваш email",
|
21
|
+
"emailNotice": "Мы отправим вам электронное письмо с кодом подтверждения, который вы должны будете ввести в следующем шаге.",
|
22
|
+
"smsNotice": "Мы вышлем вам SMS с кодом подтверждения, который вы должны будете ввести в следующем шаге.",
|
23
|
+
"sendCode": "Отправить код",
|
24
|
+
"haveAccount": "У вас уже есть аккаунт?"
|
25
|
+
}
|
26
|
+
}
|
@@ -3,99 +3,108 @@ import layoutAuth from '../components/layouts/Auth.vue'
|
|
3
3
|
import * as validationState from '@pf/src/modules/middlewares/client/states.validation.js'
|
4
4
|
import * as validationAuth from '@pf/src/modules/middlewares/client/auth.validation.js';
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
title: {
|
12
|
-
en: 'Sign In',
|
13
|
-
ru: 'Вход'
|
14
|
-
},
|
15
|
-
},
|
16
|
-
component: layoutAuth,
|
17
|
-
children: [{
|
18
|
-
path: 'signin',
|
19
|
-
name: 'Sign In',
|
20
|
-
beforeEnter: [
|
21
|
-
validationAuth.requiresNoAuth,
|
22
|
-
validationState.resetUser
|
23
|
-
],
|
6
|
+
function createAuthRoutes (options) {
|
7
|
+
const auth = [
|
8
|
+
{
|
9
|
+
path: 'auth',
|
10
|
+
name: 'Authentication',
|
24
11
|
meta: {
|
25
12
|
title: {
|
26
|
-
en: '
|
27
|
-
ru: '
|
13
|
+
en: 'Аутентификация',
|
14
|
+
ru: 'Authentication'
|
28
15
|
},
|
16
|
+
options: options
|
29
17
|
},
|
30
|
-
component:
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
18
|
+
component: layoutAuth,
|
19
|
+
children: [{
|
20
|
+
path: 'signin',
|
21
|
+
name: 'Sign In',
|
22
|
+
beforeEnter: [
|
23
|
+
validationAuth.requiresNoAuth,
|
24
|
+
validationState.resetUser
|
25
|
+
],
|
26
|
+
meta: {
|
27
|
+
title: {
|
28
|
+
en: 'Sign In',
|
29
|
+
ru: 'Вход'
|
30
|
+
},
|
42
31
|
},
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
32
|
+
component: () => import(
|
33
|
+
/* webpackChunkName: "signin" */
|
34
|
+
'../components/pages/SignIn.vue'
|
35
|
+
),
|
36
|
+
},{
|
37
|
+
path: 'reset-password',
|
38
|
+
name: 'Reset Password',
|
39
|
+
beforeEnter: [
|
40
|
+
validationAuth.requiresNoAuth,
|
41
|
+
validationState.resetUser
|
42
|
+
],
|
43
|
+
meta: {
|
44
|
+
title: {
|
45
|
+
en: 'Reset Password',
|
46
|
+
ru: 'Сбросить Пароль'
|
47
|
+
},
|
56
48
|
},
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
49
|
+
component: () => import(/* webpackChunkName: "reset-password" */ '../components/pages/ResetPassword.vue'),
|
50
|
+
},{
|
51
|
+
path: 'signup',
|
52
|
+
name: 'Sign Up',
|
53
|
+
beforeEnter: [
|
54
|
+
validationAuth.requiresNoAuth,
|
55
|
+
validationState.resetUser
|
56
|
+
],
|
57
|
+
meta: {
|
58
|
+
title: {
|
59
|
+
en: 'Sign Up',
|
60
|
+
ru: 'Регистрация'
|
61
|
+
},
|
70
62
|
},
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
63
|
+
component: () => import(/* webpackChunkName: "signup" */ '../components/pages/SignUp.vue'),
|
64
|
+
},{
|
65
|
+
path: 'enter-code',
|
66
|
+
name: 'Enter Code',
|
67
|
+
beforeEnter: [
|
68
|
+
validationAuth.requiresNoAuth,
|
69
|
+
validationState.checkUser
|
70
|
+
],
|
71
|
+
meta: {
|
72
|
+
title: {
|
73
|
+
en: 'Enter Code',
|
74
|
+
ru: 'Введите Код'
|
75
|
+
},
|
84
76
|
},
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
77
|
+
component: () => import(/* webpackChunkName: "signup" */ '../components/pages/EnterCode.vue'),
|
78
|
+
},{
|
79
|
+
path: 'enter-password',
|
80
|
+
name: 'Enter Password',
|
81
|
+
beforeEnter: [
|
82
|
+
validationAuth.requiresNoAuth,
|
83
|
+
validationState.checkUser
|
84
|
+
],
|
85
|
+
meta: {
|
86
|
+
title: {
|
87
|
+
en: 'Enter Password',
|
88
|
+
ru: 'Введите Пароль'
|
89
|
+
},
|
94
90
|
},
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
91
|
+
component: () => import(/* webpackChunkName: "signup" */ '../components/pages/EnterPassword.vue'),
|
92
|
+
},{
|
93
|
+
path: 'invite',
|
94
|
+
name: 'Invite',
|
95
|
+
meta: {
|
96
|
+
title: {
|
97
|
+
en: 'Invite',
|
98
|
+
ru: 'Приглашение'
|
99
|
+
},
|
100
|
+
},
|
101
|
+
component: () => import(/* webpackChunkName: "signup" */ '../components/pages/Invite.vue'),
|
102
|
+
}],
|
103
|
+
},
|
104
|
+
];
|
105
|
+
|
106
|
+
return auth
|
107
|
+
}
|
108
|
+
|
100
109
|
|
101
|
-
export default
|
110
|
+
export default createAuthRoutes;
|
@@ -27,27 +27,27 @@
|
|
27
27
|
},
|
28
28
|
});
|
29
29
|
|
30
|
-
|
31
|
-
|
30
|
+
async function initialize() {
|
31
|
+
const userCookie = await getCookie('user');
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
33
|
+
if (userCookie) {
|
34
|
+
const {_id, email, phone, roles, accessToken} = userCookie;
|
35
|
+
|
36
|
+
Object.assign(state.user, {_id, email, phone});
|
37
|
+
Object.assign(state.access, {token: accessToken, roles, status: !!accessToken});
|
38
|
+
|
39
|
+
$axios.interceptors.request.use((config) => {
|
40
|
+
if (accessToken) {
|
41
|
+
config.headers['x-access-token'] = accessToken;
|
42
|
+
}
|
43
|
+
return config;
|
44
|
+
}, (error) => {
|
45
|
+
return Promise.reject(error);
|
46
|
+
});
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
initialize();
|
51
51
|
|
52
52
|
const actions = {
|
53
53
|
async login (user, type) {
|
@@ -6,7 +6,7 @@
|
|
6
6
|
class="w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small">
|
7
7
|
<img v-if="prop.content" :src="(FILE_SERVER_URL || '') + prop.content" alt="Uploaded image" class="w-100 h-30r object-fit-contain"/>
|
8
8
|
<span v-else class="t-transp pd-extra" >Click or drag-and-drop your image</span>
|
9
|
-
<input type="file" ref="fileInput" @change="onFileChange" style="display: none"/>
|
9
|
+
<input type="file" ref="fileInput" tabindex="-1" @change="onFileChange" style="display: none"/>
|
10
10
|
</div>
|
11
11
|
</template>
|
12
12
|
|