@skroz/frontend 0.0.5 → 0.0.6
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/dist/auth/Forgot.js +8 -4
- package/dist/auth/RecoverPassword.js +9 -5
- package/dist/auth/ResendLinkButton.d.ts +0 -1
- package/dist/auth/ResendLinkButton.js +17 -14
- package/dist/graphql/ForgotMutation.graphql.d.ts +24 -0
- package/dist/graphql/{ForgotPasswordMutation.graphql.js → ForgotMutation.graphql.js} +7 -7
- package/dist/graphql/RecoverPasswordMutation.graphql.d.ts +24 -0
- package/dist/graphql/{recoveryMutation.graphql.js → RecoverPasswordMutation.graphql.js} +9 -7
- package/dist/graphql/ResendLinkButtonMutation.graphql.d.ts +5 -6
- package/dist/graphql/ResendLinkButtonMutation.graphql.js +5 -5
- package/dist/graphql/index.d.ts +2 -2
- package/dist/graphql/index.js +5 -5
- package/package.json +2 -2
- package/src/auth/Forgot.tsx +15 -11
- package/src/auth/RecoverPassword.tsx +16 -12
- package/src/auth/ResendLinkButton.tsx +20 -15
- package/src/graphql/{ForgotPasswordMutation.graphql.ts → ForgotMutation.graphql.ts} +16 -16
- package/src/graphql/{recoveryMutation.graphql.ts → RecoverPasswordMutation.graphql.ts} +15 -9
- package/src/graphql/ResendLinkButtonMutation.graphql.ts +10 -11
- package/src/graphql/index.ts +2 -2
- package/src/locales/ru/common.json +8 -190
- package/dist/graphql/ForgotPasswordMutation.graphql.d.ts +0 -24
- package/dist/graphql/recoveryMutation.graphql.d.ts +0 -19
package/dist/auth/Forgot.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
2
6
|
var __assign = (this && this.__assign) || function () {
|
|
3
7
|
__assign = Object.assign || function(t) {
|
|
4
8
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -27,7 +31,6 @@ var limitExpiresAt_1 = require("../utils/limitExpiresAt");
|
|
|
27
31
|
var handleFormErrors_1 = __importDefault(require("../utils/handleFormErrors"));
|
|
28
32
|
var H_1 = __importDefault(require("../ui/H"));
|
|
29
33
|
var FrontendContext_1 = require("../utils/FrontendContext");
|
|
30
|
-
var ForgotPasswordMutation_graphql_1 = __importDefault(require("../graphql/ForgotPasswordMutation.graphql"));
|
|
31
34
|
var FormItem_1 = __importDefault(require("../ui/FormItem"));
|
|
32
35
|
var Forgot = function (_a) {
|
|
33
36
|
var onFinish = _a.onFinish, onLoginClick = _a.onLoginClick;
|
|
@@ -36,7 +39,7 @@ var Forgot = function (_a) {
|
|
|
36
39
|
var config = (0, FrontendContext_1.useFrontendConfig)();
|
|
37
40
|
var _b = (0, form_1.useExistingForm)(), form = _b.form, useValue = _b.useValue, Field = _b.Field;
|
|
38
41
|
var email = useValue('email');
|
|
39
|
-
var _c = (0, react_relay_1.useMutation)(
|
|
42
|
+
var _c = (0, react_relay_1.useMutation)((0, react_relay_1.graphql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n mutation ForgotMutation($input: SendTokenInput!) {\n sendToken(input: $input) {\n codeIsSent\n limitExpiresAt\n }\n }\n "], ["\n mutation ForgotMutation($input: SendTokenInput!) {\n sendToken(input: $input) {\n codeIsSent\n limitExpiresAt\n }\n }\n "])))), commit = _c[0], loading = _c[1];
|
|
40
43
|
var forgotPasswordHandler = (0, react_1.useCallback)(function () {
|
|
41
44
|
commit({
|
|
42
45
|
variables: {
|
|
@@ -46,8 +49,8 @@ var Forgot = function (_a) {
|
|
|
46
49
|
},
|
|
47
50
|
onError: function (error) { return (0, handleFormErrors_1.default)(form, error); },
|
|
48
51
|
onCompleted: function (res) {
|
|
49
|
-
(0, limitExpiresAt_1.setLimitExpiresAt)(res.
|
|
50
|
-
if (!res.
|
|
52
|
+
(0, limitExpiresAt_1.setLimitExpiresAt)(res.sendToken.limitExpiresAt || 0);
|
|
53
|
+
if (!res.sendToken.codeIsSent)
|
|
51
54
|
antd_1.message.error(t('common:auth.forgotSendError'));
|
|
52
55
|
router.push("/recovery?email=".concat(email));
|
|
53
56
|
onFinish();
|
|
@@ -64,3 +67,4 @@ var Forgot = function (_a) {
|
|
|
64
67
|
} }) })), (0, jsx_runtime_1.jsx)("div", __assign({ className: 'auth-button' }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, __assign({ type: 'primary', shape: 'round', size: 'large', loading: loading, onClick: forgotPasswordHandler }, { children: t('common:auth.forgotSendInstructions') })) })), (0, jsx_runtime_1.jsx)("div", __assign({ className: 'auth-footer' }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: 'auth-footer-issues' }, { children: t('common:auth.forgotIssues') })) }))] })));
|
|
65
68
|
};
|
|
66
69
|
exports.default = Forgot;
|
|
70
|
+
var templateObject_1;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
2
6
|
var __assign = (this && this.__assign) || function () {
|
|
3
7
|
__assign = Object.assign || function(t) {
|
|
4
8
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -25,7 +29,6 @@ var link_1 = __importDefault(require("next/link"));
|
|
|
25
29
|
var use_interval_1 = __importDefault(require("@os-design/use-interval"));
|
|
26
30
|
var handleFormErrors_1 = __importDefault(require("../utils/handleFormErrors"));
|
|
27
31
|
var FrontendContext_1 = require("../utils/FrontendContext");
|
|
28
|
-
var recoveryMutation_graphql_1 = __importDefault(require("../graphql/recoveryMutation.graphql"));
|
|
29
32
|
var H_1 = __importDefault(require("../ui/H"));
|
|
30
33
|
var Panel_1 = __importDefault(require("../ui/Panel"));
|
|
31
34
|
var FormItem_1 = __importDefault(require("../ui/FormItem"));
|
|
@@ -43,7 +46,7 @@ var RecoverPassword = function () {
|
|
|
43
46
|
token: '',
|
|
44
47
|
password: '',
|
|
45
48
|
}), form = _a.form, Field = _a.Field;
|
|
46
|
-
var _b = (0, react_relay_1.useMutation)(
|
|
49
|
+
var _b = (0, react_relay_1.useMutation)((0, react_relay_1.graphql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n mutation RecoverPasswordMutation($input: RecoverPasswordInput!) {\n recoverPassword(input: $input) {\n ok\n }\n }\n "], ["\n mutation RecoverPasswordMutation($input: RecoverPasswordInput!) {\n recoverPassword(input: $input) {\n ok\n }\n }\n "])))), commit = _b[0], loading = _b[1];
|
|
47
50
|
var recoverPasswordHandler = (0, react_1.useCallback)(function () {
|
|
48
51
|
commit({
|
|
49
52
|
variables: {
|
|
@@ -74,10 +77,10 @@ var RecoverPassword = function () {
|
|
|
74
77
|
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: 'recovery' }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: 'recovery-header' }, { children: t('common:auth.setNewPassword') })), email.length > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ style: { color: 'red', marginBottom: 15 } }, { children: t('common:auth.findCodeOnEmail') })), (0, jsx_runtime_1.jsx)(form_1.FormProvider, __assign({ form: form }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Form, __assign({ layout: 'vertical', size: 'large' }, { children: [(0, jsx_runtime_1.jsx)(FormError_1.default, {}), (0, jsx_runtime_1.jsx)(Field, { name: 'token', render: function (_a, _b) {
|
|
75
78
|
var value = _a.value, onChange = _a.onChange;
|
|
76
79
|
var error = _b.error;
|
|
77
|
-
return ((0, jsx_runtime_1.jsx)(FormItem_1.default, __assign({ label: '
|
|
80
|
+
return ((0, jsx_runtime_1.jsx)(FormItem_1.default, __assign({ label: t('common:auth.setNewCodeLabel'), error: error, style: { marginBottom: 0 } }, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: '------', value: value, onChange: function (e) {
|
|
78
81
|
return onChange(e.target.value);
|
|
79
82
|
} }) })));
|
|
80
|
-
} }), (0, jsx_runtime_1.jsx)("div", __assign({ style: { marginBottom: 25 } }, { children: (0, jsx_runtime_1.jsx)(ResendLinkButton_1.default, __assign({ email: email,
|
|
83
|
+
} }), (0, jsx_runtime_1.jsx)("div", __assign({ style: { marginBottom: 25 } }, { children: (0, jsx_runtime_1.jsx)(ResendLinkButton_1.default, __assign({ email: email, disabled: resendIsDenied, onError: function (error) { return (0, handleFormErrors_1.default)(form, error); }, onCompleted: function (res) {
|
|
81
84
|
(0, limitExpiresAt_1.setLimitExpiresAt)(res.resendLink.limitExpiresAt);
|
|
82
85
|
setLimitExpiresIn((0, limitExpiresAt_1.getLimitExpiresIn)());
|
|
83
86
|
// Отображаем сообщение
|
|
@@ -91,6 +94,7 @@ var RecoverPassword = function () {
|
|
|
91
94
|
return ((0, jsx_runtime_1.jsx)(FormItem_1.default, __assign({ label: t('common:auth.setNewPassword'), error: error }, { children: (0, jsx_runtime_1.jsx)(antd_1.Input.Password, { value: value, onChange: function (e) {
|
|
92
95
|
return onChange(e.target.value);
|
|
93
96
|
}, placeholder: t('common:auth.newPassword') }) })));
|
|
94
|
-
} }), (0, jsx_runtime_1.jsx)(antd_1.Button, __assign({ loading: loading, onClick: recoverPasswordHandler, type: 'primary' }, { children: t('common:auth.saveNewPassword') }))] }))] })) }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(H_1.default, __assign({ type: 'h2', subHeader: '
|
|
97
|
+
} }), (0, jsx_runtime_1.jsx)(antd_1.Button, __assign({ loading: loading, onClick: recoverPasswordHandler, type: 'primary' }, { children: t('common:auth.saveNewPassword') }))] }))] })) }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(H_1.default, __assign({ type: 'h2', subHeader: t('common:auth.wrongParamsSubtitle'), textAlign: 'center' }, { children: t('common:auth.wrongParamsTitle') })), (0, jsx_runtime_1.jsx)("div", __assign({ style: { textAlign: 'center' } }, { children: (0, jsx_runtime_1.jsx)(link_1.default, __assign({ href: config.forgotPasswordPath || '/forgot' }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, __assign({ type: 'primary', shape: 'round', size: 'large' }, { children: t('common:auth.goBack') })) })) }))] }))] })));
|
|
95
98
|
};
|
|
96
99
|
exports.default = RecoverPassword;
|
|
100
|
+
var templateObject_1;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
2
6
|
var __assign = (this && this.__assign) || function () {
|
|
3
7
|
__assign = Object.assign || function(t) {
|
|
4
8
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -10,40 +14,39 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
14
|
};
|
|
11
15
|
return __assign.apply(this, arguments);
|
|
12
16
|
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
18
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
19
|
var react_1 = require("react");
|
|
19
20
|
var react_relay_1 = require("react-relay");
|
|
20
21
|
var antd_1 = require("antd");
|
|
21
22
|
var next_i18next_1 = require("next-i18next");
|
|
22
|
-
var ResendLinkButtonMutation_graphql_1 = __importDefault(require("../graphql/ResendLinkButtonMutation.graphql"));
|
|
23
23
|
var ResendLinkButton = function (_a) {
|
|
24
|
-
var
|
|
24
|
+
var email = _a.email, children = _a.children, disabled = _a.disabled, onCompleted = _a.onCompleted, onError = _a.onError;
|
|
25
25
|
var t = (0, next_i18next_1.useTranslation)().t;
|
|
26
|
-
var _b = (0, react_relay_1.useMutation)(
|
|
26
|
+
var _b = (0, react_relay_1.useMutation)((0, react_relay_1.graphql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n mutation ResendLinkButtonMutation($input: SendTokenInput!) {\n sendToken(input: $input) {\n codeIsSent\n limitExpiresAt\n }\n }\n "], ["\n mutation ResendLinkButtonMutation($input: SendTokenInput!) {\n sendToken(input: $input) {\n codeIsSent\n limitExpiresAt\n }\n }\n "])))), commit = _b[0], loading = _b[1];
|
|
27
27
|
var resendLinkHandler = (0, react_1.useCallback)(function () {
|
|
28
28
|
if (!email) {
|
|
29
|
-
antd_1.message.error(t('error.emailNotProvided'));
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
if (!type) {
|
|
33
|
-
antd_1.message.error(t('error.typeNotProvided'));
|
|
29
|
+
antd_1.message.error(t('common:error.emailNotProvided'));
|
|
34
30
|
return;
|
|
35
31
|
}
|
|
36
32
|
commit({
|
|
37
33
|
variables: {
|
|
38
34
|
input: {
|
|
39
35
|
email: email,
|
|
40
|
-
type: type,
|
|
41
36
|
},
|
|
42
37
|
},
|
|
43
38
|
onError: onError,
|
|
44
|
-
onCompleted:
|
|
39
|
+
onCompleted: function (res) {
|
|
40
|
+
onCompleted({
|
|
41
|
+
resendLink: {
|
|
42
|
+
ok: res.sendToken.codeIsSent,
|
|
43
|
+
limitExpiresAt: res.sendToken.limitExpiresAt,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
},
|
|
45
47
|
});
|
|
46
|
-
}, [commit, email, onCompleted, onError, t
|
|
48
|
+
}, [commit, email, onCompleted, onError, t]);
|
|
47
49
|
return ((0, jsx_runtime_1.jsx)(antd_1.Button, __assign({ type: 'link', disabled: disabled, onClick: resendLinkHandler, loading: loading, size: 'large' }, { children: children })));
|
|
48
50
|
};
|
|
49
51
|
exports.default = ResendLinkButton;
|
|
52
|
+
var templateObject_1;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @generated SignedSource<<13b4d04002f461d3c131f16f81e940a0>>
|
|
3
|
+
* @lightSyntaxTransform
|
|
4
|
+
* @nogrep
|
|
5
|
+
*/
|
|
6
|
+
import { ConcreteRequest } from 'relay-runtime';
|
|
7
|
+
export type SendTokenInput = {
|
|
8
|
+
email: string;
|
|
9
|
+
};
|
|
10
|
+
export type ForgotMutation$variables = {
|
|
11
|
+
input: SendTokenInput;
|
|
12
|
+
};
|
|
13
|
+
export type ForgotMutation$data = {
|
|
14
|
+
readonly sendToken: {
|
|
15
|
+
readonly codeIsSent: boolean;
|
|
16
|
+
readonly limitExpiresAt: number | null;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type ForgotMutation = {
|
|
20
|
+
response: ForgotMutation$data;
|
|
21
|
+
variables: ForgotMutation$variables;
|
|
22
|
+
};
|
|
23
|
+
declare const node: ConcreteRequest;
|
|
24
|
+
export default node;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* @generated SignedSource<<
|
|
3
|
+
* @generated SignedSource<<13b4d04002f461d3c131f16f81e940a0>>
|
|
4
4
|
* @lightSyntaxTransform
|
|
5
5
|
* @nogrep
|
|
6
6
|
*/
|
|
@@ -22,9 +22,9 @@ var node = (function () {
|
|
|
22
22
|
"variableName": "input"
|
|
23
23
|
}
|
|
24
24
|
],
|
|
25
|
-
"concreteType": "
|
|
25
|
+
"concreteType": "SendTokenPayload",
|
|
26
26
|
"kind": "LinkedField",
|
|
27
|
-
"name": "
|
|
27
|
+
"name": "sendToken",
|
|
28
28
|
"plural": false,
|
|
29
29
|
"selections": [
|
|
30
30
|
{
|
|
@@ -50,7 +50,7 @@ var node = (function () {
|
|
|
50
50
|
"argumentDefinitions": (v0 /*: any*/),
|
|
51
51
|
"kind": "Fragment",
|
|
52
52
|
"metadata": null,
|
|
53
|
-
"name": "
|
|
53
|
+
"name": "ForgotMutation",
|
|
54
54
|
"selections": (v1 /*: any*/),
|
|
55
55
|
"type": "Mutation",
|
|
56
56
|
"abstractKey": null
|
|
@@ -59,16 +59,16 @@ var node = (function () {
|
|
|
59
59
|
"operation": {
|
|
60
60
|
"argumentDefinitions": (v0 /*: any*/),
|
|
61
61
|
"kind": "Operation",
|
|
62
|
-
"name": "
|
|
62
|
+
"name": "ForgotMutation",
|
|
63
63
|
"selections": (v1 /*: any*/)
|
|
64
64
|
},
|
|
65
65
|
"params": {
|
|
66
66
|
"cacheID": "5e5512b2a837741f90fc5a83dacf437f",
|
|
67
67
|
"id": null,
|
|
68
68
|
"metadata": {},
|
|
69
|
-
"name": "
|
|
69
|
+
"name": "ForgotMutation",
|
|
70
70
|
"operationKind": "mutation",
|
|
71
|
-
"text": "mutation
|
|
71
|
+
"text": "mutation ForgotMutation(\n $input: SendTokenInput!\n) {\n sendToken(input: $input) {\n codeIsSent\n limitExpiresAt\n }\n}\n"
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
})();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @generated SignedSource<<recoveryMutationManualReconstruction>>
|
|
3
|
+
* @lightSyntaxTransform
|
|
4
|
+
* @nogrep
|
|
5
|
+
*/
|
|
6
|
+
import { ConcreteRequest } from 'relay-runtime';
|
|
7
|
+
export type RecoverPasswordInput = {
|
|
8
|
+
token: string;
|
|
9
|
+
password: string;
|
|
10
|
+
};
|
|
11
|
+
export type RecoverPasswordMutation$variables = {
|
|
12
|
+
input: RecoverPasswordInput;
|
|
13
|
+
};
|
|
14
|
+
export type RecoverPasswordMutation$data = {
|
|
15
|
+
readonly recoverPassword: {
|
|
16
|
+
readonly ok: boolean;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type RecoverPasswordMutation = {
|
|
20
|
+
response: RecoverPasswordMutation$data;
|
|
21
|
+
variables: RecoverPasswordMutation$variables;
|
|
22
|
+
};
|
|
23
|
+
declare const node: ConcreteRequest;
|
|
24
|
+
export default node;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @generated SignedSource<<recoveryMutationManualReconstruction>>
|
|
4
|
+
* @lightSyntaxTransform
|
|
5
|
+
* @nogrep
|
|
6
|
+
*/
|
|
5
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
8
|
var node = (function () {
|
|
7
9
|
var v0 = [
|
|
@@ -41,7 +43,7 @@ var node = (function () {
|
|
|
41
43
|
"argumentDefinitions": (v0 /*: any*/),
|
|
42
44
|
"kind": "Fragment",
|
|
43
45
|
"metadata": null,
|
|
44
|
-
"name": "
|
|
46
|
+
"name": "RecoverPasswordMutation",
|
|
45
47
|
"selections": (v1 /*: any*/),
|
|
46
48
|
"type": "Mutation",
|
|
47
49
|
"abstractKey": null
|
|
@@ -50,16 +52,16 @@ var node = (function () {
|
|
|
50
52
|
"operation": {
|
|
51
53
|
"argumentDefinitions": (v0 /*: any*/),
|
|
52
54
|
"kind": "Operation",
|
|
53
|
-
"name": "
|
|
55
|
+
"name": "RecoverPasswordMutation",
|
|
54
56
|
"selections": (v1 /*: any*/)
|
|
55
57
|
},
|
|
56
58
|
"params": {
|
|
57
59
|
"cacheID": "recoveryMutationManualReconstruction",
|
|
58
60
|
"id": null,
|
|
59
61
|
"metadata": {},
|
|
60
|
-
"name": "
|
|
62
|
+
"name": "RecoverPasswordMutation",
|
|
61
63
|
"operationKind": "mutation",
|
|
62
|
-
"text": "mutation
|
|
64
|
+
"text": "mutation RecoverPasswordMutation(\n $input: RecoverPasswordInput!\n) {\n recoverPassword(input: $input) {\n ok\n }\n}\n"
|
|
63
65
|
}
|
|
64
66
|
};
|
|
65
67
|
})();
|
|
@@ -4,17 +4,16 @@
|
|
|
4
4
|
* @nogrep
|
|
5
5
|
*/
|
|
6
6
|
import { ConcreteRequest } from 'relay-runtime';
|
|
7
|
-
export type
|
|
7
|
+
export type SendTokenInput = {
|
|
8
8
|
email: string;
|
|
9
|
-
type: string;
|
|
10
9
|
};
|
|
11
10
|
export type ResendLinkButtonMutation$variables = {
|
|
12
|
-
input:
|
|
11
|
+
input: SendTokenInput;
|
|
13
12
|
};
|
|
14
13
|
export type ResendLinkButtonMutation$data = {
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
14
|
+
readonly sendToken: {
|
|
15
|
+
readonly codeIsSent: boolean;
|
|
16
|
+
readonly limitExpiresAt: number | null;
|
|
18
17
|
};
|
|
19
18
|
};
|
|
20
19
|
export type ResendLinkButtonMutation = {
|
|
@@ -22,16 +22,16 @@ var node = (function () {
|
|
|
22
22
|
"variableName": "input"
|
|
23
23
|
}
|
|
24
24
|
],
|
|
25
|
-
"concreteType": "
|
|
25
|
+
"concreteType": "SendTokenPayload",
|
|
26
26
|
"kind": "LinkedField",
|
|
27
|
-
"name": "
|
|
27
|
+
"name": "sendToken",
|
|
28
28
|
"plural": false,
|
|
29
29
|
"selections": [
|
|
30
30
|
{
|
|
31
31
|
"alias": null,
|
|
32
32
|
"args": null,
|
|
33
33
|
"kind": "ScalarField",
|
|
34
|
-
"name": "
|
|
34
|
+
"name": "codeIsSent",
|
|
35
35
|
"storageKey": null
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -68,9 +68,9 @@ var node = (function () {
|
|
|
68
68
|
"metadata": {},
|
|
69
69
|
"name": "ResendLinkButtonMutation",
|
|
70
70
|
"operationKind": "mutation",
|
|
71
|
-
"text": "mutation ResendLinkButtonMutation(\n $input:
|
|
71
|
+
"text": "mutation ResendLinkButtonMutation(\n $input: SendTokenInput!\n) {\n sendToken(input: $input) {\n codeIsSent\n limitExpiresAt\n }\n}\n"
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
})();
|
|
75
|
-
node.hash = "
|
|
75
|
+
node.hash = "cddddaa297ce04eecaf79a4bfa5eb769";
|
|
76
76
|
exports.default = node;
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as LoginMutation } from './LoginMutation.graphql';
|
|
2
2
|
export { default as RegisterMutation } from './RegisterMutation.graphql';
|
|
3
|
-
export { default as
|
|
3
|
+
export { default as ForgotMutation } from './ForgotMutation.graphql';
|
|
4
4
|
export { default as ResendLinkButtonMutation } from './ResendLinkButtonMutation.graphql';
|
|
5
|
-
export { default as
|
|
5
|
+
export { default as RecoverPasswordMutation } from './RecoverPasswordMutation.graphql';
|
package/dist/graphql/index.js
CHANGED
|
@@ -3,14 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.RecoverPasswordMutation = exports.ResendLinkButtonMutation = exports.ForgotMutation = exports.RegisterMutation = exports.LoginMutation = void 0;
|
|
7
7
|
var LoginMutation_graphql_1 = require("./LoginMutation.graphql");
|
|
8
8
|
Object.defineProperty(exports, "LoginMutation", { enumerable: true, get: function () { return __importDefault(LoginMutation_graphql_1).default; } });
|
|
9
9
|
var RegisterMutation_graphql_1 = require("./RegisterMutation.graphql");
|
|
10
10
|
Object.defineProperty(exports, "RegisterMutation", { enumerable: true, get: function () { return __importDefault(RegisterMutation_graphql_1).default; } });
|
|
11
|
-
var
|
|
12
|
-
Object.defineProperty(exports, "
|
|
11
|
+
var ForgotMutation_graphql_1 = require("./ForgotMutation.graphql");
|
|
12
|
+
Object.defineProperty(exports, "ForgotMutation", { enumerable: true, get: function () { return __importDefault(ForgotMutation_graphql_1).default; } });
|
|
13
13
|
var ResendLinkButtonMutation_graphql_1 = require("./ResendLinkButtonMutation.graphql");
|
|
14
14
|
Object.defineProperty(exports, "ResendLinkButtonMutation", { enumerable: true, get: function () { return __importDefault(ResendLinkButtonMutation_graphql_1).default; } });
|
|
15
|
-
var
|
|
16
|
-
Object.defineProperty(exports, "
|
|
15
|
+
var RecoverPasswordMutation_graphql_1 = require("./RecoverPasswordMutation.graphql");
|
|
16
|
+
Object.defineProperty(exports, "RecoverPasswordMutation", { enumerable: true, get: function () { return __importDefault(RecoverPasswordMutation_graphql_1).default; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skroz/frontend",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "64646f9451ea3748bf27f71a3112536a33f08493"
|
|
48
48
|
}
|
package/src/auth/Forgot.tsx
CHANGED
|
@@ -5,16 +5,15 @@ import { UserOutlined } from '@ant-design/icons';
|
|
|
5
5
|
import { useTranslation } from 'next-i18next';
|
|
6
6
|
import Link from 'next/link';
|
|
7
7
|
import { useExistingForm } from '@os-design/form';
|
|
8
|
-
import { useMutation } from 'react-relay';
|
|
8
|
+
import { graphql, useMutation } from 'react-relay';
|
|
9
9
|
import { setLimitExpiresAt } from '../utils/limitExpiresAt';
|
|
10
10
|
import handleFormErrors from '../utils/handleFormErrors';
|
|
11
11
|
import H from '../ui/H';
|
|
12
12
|
import { useFrontendConfig } from '../utils/FrontendContext';
|
|
13
13
|
import { RegisterInput } from '../graphql/RegisterMutation.graphql';
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} from '../graphql/ForgotPasswordMutation.graphql';
|
|
14
|
+
import {
|
|
15
|
+
ForgotMutation,
|
|
16
|
+
} from '../graphql/ForgotMutation.graphql';
|
|
18
17
|
import FormItem from '../ui/FormItem';
|
|
19
18
|
|
|
20
19
|
interface ForgotProps {
|
|
@@ -30,9 +29,14 @@ const Forgot: React.FC<ForgotProps> = ({ onFinish, onLoginClick }) => {
|
|
|
30
29
|
const { form, useValue, Field } = useExistingForm<RegisterInput>();
|
|
31
30
|
const email = useValue('email');
|
|
32
31
|
|
|
33
|
-
const [commit, loading] = useMutation<
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
const [commit, loading] = useMutation<ForgotMutation>(graphql`
|
|
33
|
+
mutation ForgotMutation($input: SendTokenInput!) {
|
|
34
|
+
sendToken(input: $input) {
|
|
35
|
+
codeIsSent
|
|
36
|
+
limitExpiresAt
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`);
|
|
36
40
|
|
|
37
41
|
const forgotPasswordHandler = useCallback(() => {
|
|
38
42
|
commit({
|
|
@@ -42,9 +46,9 @@ const Forgot: React.FC<ForgotProps> = ({ onFinish, onLoginClick }) => {
|
|
|
42
46
|
},
|
|
43
47
|
},
|
|
44
48
|
onError: (error) => handleFormErrors(form, error),
|
|
45
|
-
onCompleted: (res:
|
|
46
|
-
setLimitExpiresAt(res.
|
|
47
|
-
if (!res.
|
|
49
|
+
onCompleted: (res: any) => {
|
|
50
|
+
setLimitExpiresAt(res.sendToken.limitExpiresAt || 0);
|
|
51
|
+
if (!res.sendToken.codeIsSent)
|
|
48
52
|
message.error(t('common:auth.forgotSendError'));
|
|
49
53
|
router.push(`/recovery?email=${email}`);
|
|
50
54
|
onFinish();
|
|
@@ -3,21 +3,20 @@ import { useCallback, useEffect, useState } from 'react';
|
|
|
3
3
|
import { useRouter } from 'next/router';
|
|
4
4
|
import { useTranslation } from 'next-i18next';
|
|
5
5
|
import { FormProvider, useForm } from '@os-design/form';
|
|
6
|
-
import { useMutation } from 'react-relay';
|
|
6
|
+
import { graphql, useMutation } from 'react-relay';
|
|
7
7
|
import Link from 'next/link';
|
|
8
8
|
import useInterval from '@os-design/use-interval';
|
|
9
9
|
import handleFormErrors from '../utils/handleFormErrors';
|
|
10
10
|
import { useFrontendConfig } from '../utils/FrontendContext';
|
|
11
|
-
import
|
|
11
|
+
import {
|
|
12
12
|
RecoverPasswordInput,
|
|
13
|
-
|
|
14
|
-
} from '../graphql/
|
|
13
|
+
RecoverPasswordMutation,
|
|
14
|
+
} from '../graphql/RecoverPasswordMutation.graphql';
|
|
15
15
|
import H from '../ui/H';
|
|
16
16
|
import Panel from '../ui/Panel';
|
|
17
17
|
import FormItem from '../ui/FormItem';
|
|
18
18
|
import FormError from '../ui/FormError';
|
|
19
19
|
import ResendLinkButton from './ResendLinkButton';
|
|
20
|
-
import { ResendLinkButtonMutation$data } from '../graphql/ResendLinkButtonMutation.graphql';
|
|
21
20
|
import { getLimitExpiresIn, setLimitExpiresAt } from '../utils/limitExpiresAt';
|
|
22
21
|
|
|
23
22
|
const RecoverPassword = () => {
|
|
@@ -33,7 +32,13 @@ const RecoverPassword = () => {
|
|
|
33
32
|
password: '',
|
|
34
33
|
});
|
|
35
34
|
|
|
36
|
-
const [commit, loading] = useMutation<
|
|
35
|
+
const [commit, loading] = useMutation<RecoverPasswordMutation>(graphql`
|
|
36
|
+
mutation RecoverPasswordMutation($input: RecoverPasswordInput!) {
|
|
37
|
+
recoverPassword(input: $input) {
|
|
38
|
+
ok
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`);
|
|
37
42
|
|
|
38
43
|
const recoverPasswordHandler = useCallback(() => {
|
|
39
44
|
commit({
|
|
@@ -96,7 +101,7 @@ const RecoverPassword = () => {
|
|
|
96
101
|
{ error }: { error?: string }
|
|
97
102
|
) => (
|
|
98
103
|
<FormItem
|
|
99
|
-
label='
|
|
104
|
+
label={t('common:auth.setNewCodeLabel')}
|
|
100
105
|
error={error}
|
|
101
106
|
style={{ marginBottom: 0 }}
|
|
102
107
|
>
|
|
@@ -113,10 +118,9 @@ const RecoverPassword = () => {
|
|
|
113
118
|
<div style={{ marginBottom: 25 }}>
|
|
114
119
|
<ResendLinkButton
|
|
115
120
|
email={email}
|
|
116
|
-
type='recovery'
|
|
117
121
|
disabled={resendIsDenied}
|
|
118
122
|
onError={(error: any) => handleFormErrors(form, error)}
|
|
119
|
-
onCompleted={(res:
|
|
123
|
+
onCompleted={(res: any) => {
|
|
120
124
|
setLimitExpiresAt(res.resendLink.limitExpiresAt);
|
|
121
125
|
setLimitExpiresIn(getLimitExpiresIn());
|
|
122
126
|
|
|
@@ -169,15 +173,15 @@ const RecoverPassword = () => {
|
|
|
169
173
|
<>
|
|
170
174
|
<H
|
|
171
175
|
type='h2'
|
|
172
|
-
subHeader='
|
|
176
|
+
subHeader={t('common:auth.wrongParamsSubtitle')}
|
|
173
177
|
textAlign='center'
|
|
174
178
|
>
|
|
175
|
-
|
|
179
|
+
{t('common:auth.wrongParamsTitle')}
|
|
176
180
|
</H>
|
|
177
181
|
<div style={{ textAlign: 'center' }}>
|
|
178
182
|
<Link href={config.forgotPasswordPath || '/forgot'}>
|
|
179
183
|
<Button type='primary' shape='round' size='large'>
|
|
180
|
-
|
|
184
|
+
{t('common:auth.goBack')}
|
|
181
185
|
</Button>
|
|
182
186
|
</Link>
|
|
183
187
|
</div>
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import { useMutation } from 'react-relay';
|
|
2
|
+
import { graphql, useMutation } from 'react-relay';
|
|
3
3
|
import { Button, message } from 'antd';
|
|
4
4
|
import { useTranslation } from 'next-i18next';
|
|
5
|
-
import
|
|
5
|
+
import {
|
|
6
6
|
ResendLinkButtonMutation,
|
|
7
7
|
} from '../graphql/ResendLinkButtonMutation.graphql';
|
|
8
8
|
|
|
9
9
|
interface ResendLinkButtonProps {
|
|
10
|
-
type: string;
|
|
11
10
|
email: string;
|
|
12
11
|
children: React.ReactNode;
|
|
13
12
|
disabled?: boolean;
|
|
@@ -16,7 +15,6 @@ interface ResendLinkButtonProps {
|
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
const ResendLinkButton: React.FC<ResendLinkButtonProps> = ({
|
|
19
|
-
type,
|
|
20
18
|
email,
|
|
21
19
|
children,
|
|
22
20
|
disabled,
|
|
@@ -25,30 +23,37 @@ const ResendLinkButton: React.FC<ResendLinkButtonProps> = ({
|
|
|
25
23
|
}) => {
|
|
26
24
|
const { t } = useTranslation();
|
|
27
25
|
|
|
28
|
-
const [commit, loading] = useMutation<ResendLinkButtonMutation>(
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
const [commit, loading] = useMutation<ResendLinkButtonMutation>(graphql`
|
|
27
|
+
mutation ResendLinkButtonMutation($input: SendTokenInput!) {
|
|
28
|
+
sendToken(input: $input) {
|
|
29
|
+
codeIsSent
|
|
30
|
+
limitExpiresAt
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`);
|
|
31
34
|
|
|
32
35
|
const resendLinkHandler = useCallback(() => {
|
|
33
36
|
if (!email) {
|
|
34
|
-
message.error(t('error.emailNotProvided'));
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
if (!type) {
|
|
38
|
-
message.error(t('error.typeNotProvided'));
|
|
37
|
+
message.error(t('common:error.emailNotProvided'));
|
|
39
38
|
return;
|
|
40
39
|
}
|
|
41
40
|
commit({
|
|
42
41
|
variables: {
|
|
43
42
|
input: {
|
|
44
43
|
email,
|
|
45
|
-
type,
|
|
46
44
|
},
|
|
47
45
|
},
|
|
48
46
|
onError,
|
|
49
|
-
onCompleted
|
|
47
|
+
onCompleted: (res: any) => {
|
|
48
|
+
onCompleted({
|
|
49
|
+
resendLink: {
|
|
50
|
+
ok: res.sendToken.codeIsSent,
|
|
51
|
+
limitExpiresAt: res.sendToken.limitExpiresAt,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
},
|
|
50
55
|
});
|
|
51
|
-
}, [commit, email, onCompleted, onError, t
|
|
56
|
+
}, [commit, email, onCompleted, onError, t]);
|
|
52
57
|
|
|
53
58
|
return (
|
|
54
59
|
<Button
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @generated SignedSource<<
|
|
2
|
+
* @generated SignedSource<<13b4d04002f461d3c131f16f81e940a0>>
|
|
3
3
|
* @lightSyntaxTransform
|
|
4
4
|
* @nogrep
|
|
5
5
|
*/
|
|
@@ -9,21 +9,21 @@
|
|
|
9
9
|
// @ts-nocheck
|
|
10
10
|
|
|
11
11
|
import { ConcreteRequest, Mutation } from 'relay-runtime';
|
|
12
|
-
export type
|
|
12
|
+
export type SendTokenInput = {
|
|
13
13
|
email: string;
|
|
14
14
|
};
|
|
15
|
-
export type
|
|
16
|
-
input:
|
|
15
|
+
export type ForgotMutation$variables = {
|
|
16
|
+
input: SendTokenInput;
|
|
17
17
|
};
|
|
18
|
-
export type
|
|
19
|
-
readonly
|
|
18
|
+
export type ForgotMutation$data = {
|
|
19
|
+
readonly sendToken: {
|
|
20
20
|
readonly codeIsSent: boolean;
|
|
21
|
-
readonly limitExpiresAt: number;
|
|
21
|
+
readonly limitExpiresAt: number | null;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
export type
|
|
25
|
-
response:
|
|
26
|
-
variables:
|
|
24
|
+
export type ForgotMutation = {
|
|
25
|
+
response: ForgotMutation$data;
|
|
26
|
+
variables: ForgotMutation$variables;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const node: ConcreteRequest = (function () {
|
|
@@ -44,9 +44,9 @@ const node: ConcreteRequest = (function () {
|
|
|
44
44
|
"variableName": "input"
|
|
45
45
|
}
|
|
46
46
|
],
|
|
47
|
-
"concreteType": "
|
|
47
|
+
"concreteType": "SendTokenPayload",
|
|
48
48
|
"kind": "LinkedField",
|
|
49
|
-
"name": "
|
|
49
|
+
"name": "sendToken",
|
|
50
50
|
"plural": false,
|
|
51
51
|
"selections": [
|
|
52
52
|
{
|
|
@@ -72,7 +72,7 @@ const node: ConcreteRequest = (function () {
|
|
|
72
72
|
"argumentDefinitions": (v0/*: any*/),
|
|
73
73
|
"kind": "Fragment",
|
|
74
74
|
"metadata": null,
|
|
75
|
-
"name": "
|
|
75
|
+
"name": "ForgotMutation",
|
|
76
76
|
"selections": (v1/*: any*/),
|
|
77
77
|
"type": "Mutation",
|
|
78
78
|
"abstractKey": null
|
|
@@ -81,16 +81,16 @@ const node: ConcreteRequest = (function () {
|
|
|
81
81
|
"operation": {
|
|
82
82
|
"argumentDefinitions": (v0/*: any*/),
|
|
83
83
|
"kind": "Operation",
|
|
84
|
-
"name": "
|
|
84
|
+
"name": "ForgotMutation",
|
|
85
85
|
"selections": (v1/*: any*/)
|
|
86
86
|
},
|
|
87
87
|
"params": {
|
|
88
88
|
"cacheID": "5e5512b2a837741f90fc5a83dacf437f",
|
|
89
89
|
"id": null,
|
|
90
90
|
"metadata": {},
|
|
91
|
-
"name": "
|
|
91
|
+
"name": "ForgotMutation",
|
|
92
92
|
"operationKind": "mutation",
|
|
93
|
-
"text": "mutation
|
|
93
|
+
"text": "mutation ForgotMutation(\n $input: SendTokenInput!\n) {\n sendToken(input: $input) {\n codeIsSent\n limitExpiresAt\n }\n}\n"
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
})();
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @generated SignedSource<<recoveryMutationManualReconstruction>>
|
|
3
|
+
* @lightSyntaxTransform
|
|
4
|
+
* @nogrep
|
|
5
|
+
*/
|
|
6
|
+
|
|
1
7
|
/* tslint:disable */
|
|
2
8
|
/* eslint-disable */
|
|
3
9
|
// @ts-nocheck
|
|
@@ -9,19 +15,19 @@ export type RecoverPasswordInput = {
|
|
|
9
15
|
password: string;
|
|
10
16
|
};
|
|
11
17
|
|
|
12
|
-
export type
|
|
18
|
+
export type RecoverPasswordMutation$variables = {
|
|
13
19
|
input: RecoverPasswordInput;
|
|
14
20
|
};
|
|
15
21
|
|
|
16
|
-
export type
|
|
22
|
+
export type RecoverPasswordMutation$data = {
|
|
17
23
|
readonly recoverPassword: {
|
|
18
24
|
readonly ok: boolean;
|
|
19
25
|
};
|
|
20
26
|
};
|
|
21
27
|
|
|
22
|
-
export type
|
|
23
|
-
response:
|
|
24
|
-
variables:
|
|
28
|
+
export type RecoverPasswordMutation = {
|
|
29
|
+
response: RecoverPasswordMutation$data;
|
|
30
|
+
variables: RecoverPasswordMutation$variables;
|
|
25
31
|
};
|
|
26
32
|
|
|
27
33
|
const node: ConcreteRequest = (function () {
|
|
@@ -63,7 +69,7 @@ const node: ConcreteRequest = (function () {
|
|
|
63
69
|
"argumentDefinitions": (v0/*: any*/),
|
|
64
70
|
"kind": "Fragment",
|
|
65
71
|
"metadata": null,
|
|
66
|
-
"name": "
|
|
72
|
+
"name": "RecoverPasswordMutation",
|
|
67
73
|
"selections": (v1/*: any*/),
|
|
68
74
|
"type": "Mutation",
|
|
69
75
|
"abstractKey": null
|
|
@@ -72,16 +78,16 @@ const node: ConcreteRequest = (function () {
|
|
|
72
78
|
"operation": {
|
|
73
79
|
"argumentDefinitions": (v0/*: any*/),
|
|
74
80
|
"kind": "Operation",
|
|
75
|
-
"name": "
|
|
81
|
+
"name": "RecoverPasswordMutation",
|
|
76
82
|
"selections": (v1/*: any*/)
|
|
77
83
|
},
|
|
78
84
|
"params": {
|
|
79
85
|
"cacheID": "recoveryMutationManualReconstruction",
|
|
80
86
|
"id": null,
|
|
81
87
|
"metadata": {},
|
|
82
|
-
"name": "
|
|
88
|
+
"name": "RecoverPasswordMutation",
|
|
83
89
|
"operationKind": "mutation",
|
|
84
|
-
"text": "mutation
|
|
90
|
+
"text": "mutation RecoverPasswordMutation(\n $input: RecoverPasswordInput!\n) {\n recoverPassword(input: $input) {\n ok\n }\n}\n"
|
|
85
91
|
}
|
|
86
92
|
};
|
|
87
93
|
})();
|
|
@@ -9,17 +9,16 @@
|
|
|
9
9
|
// @ts-nocheck
|
|
10
10
|
|
|
11
11
|
import { ConcreteRequest, Mutation } from 'relay-runtime';
|
|
12
|
-
export type
|
|
12
|
+
export type SendTokenInput = {
|
|
13
13
|
email: string;
|
|
14
|
-
type: string;
|
|
15
14
|
};
|
|
16
15
|
export type ResendLinkButtonMutation$variables = {
|
|
17
|
-
input:
|
|
16
|
+
input: SendTokenInput;
|
|
18
17
|
};
|
|
19
18
|
export type ResendLinkButtonMutation$data = {
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
19
|
+
readonly sendToken: {
|
|
20
|
+
readonly codeIsSent: boolean;
|
|
21
|
+
readonly limitExpiresAt: number | null;
|
|
23
22
|
};
|
|
24
23
|
};
|
|
25
24
|
export type ResendLinkButtonMutation = {
|
|
@@ -45,16 +44,16 @@ const node: ConcreteRequest = (function () {
|
|
|
45
44
|
"variableName": "input"
|
|
46
45
|
}
|
|
47
46
|
],
|
|
48
|
-
"concreteType": "
|
|
47
|
+
"concreteType": "SendTokenPayload",
|
|
49
48
|
"kind": "LinkedField",
|
|
50
|
-
"name": "
|
|
49
|
+
"name": "sendToken",
|
|
51
50
|
"plural": false,
|
|
52
51
|
"selections": [
|
|
53
52
|
{
|
|
54
53
|
"alias": null,
|
|
55
54
|
"args": null,
|
|
56
55
|
"kind": "ScalarField",
|
|
57
|
-
"name": "
|
|
56
|
+
"name": "codeIsSent",
|
|
58
57
|
"storageKey": null
|
|
59
58
|
},
|
|
60
59
|
{
|
|
@@ -91,11 +90,11 @@ const node: ConcreteRequest = (function () {
|
|
|
91
90
|
"metadata": {},
|
|
92
91
|
"name": "ResendLinkButtonMutation",
|
|
93
92
|
"operationKind": "mutation",
|
|
94
|
-
"text": "mutation ResendLinkButtonMutation(\n $input:
|
|
93
|
+
"text": "mutation ResendLinkButtonMutation(\n $input: SendTokenInput!\n) {\n sendToken(input: $input) {\n codeIsSent\n limitExpiresAt\n }\n}\n"
|
|
95
94
|
}
|
|
96
95
|
};
|
|
97
96
|
})();
|
|
98
97
|
|
|
99
|
-
(node as any).hash = "
|
|
98
|
+
(node as any).hash = "cddddaa297ce04eecaf79a4bfa5eb769";
|
|
100
99
|
|
|
101
100
|
export default node;
|
package/src/graphql/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as LoginMutation } from './LoginMutation.graphql';
|
|
2
2
|
export { default as RegisterMutation } from './RegisterMutation.graphql';
|
|
3
|
-
export { default as
|
|
3
|
+
export { default as ForgotMutation } from './ForgotMutation.graphql';
|
|
4
4
|
export { default as ResendLinkButtonMutation } from './ResendLinkButtonMutation.graphql';
|
|
5
|
-
export { default as
|
|
5
|
+
export { default as RecoverPasswordMutation } from './RecoverPasswordMutation.graphql';
|
|
@@ -1,55 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"websiteUrl": "vikneska.com",
|
|
3
|
-
"httpsWebsiteUrl": "https://vikneska.com",
|
|
4
|
-
"websiteEmail": "support@vikneska.com",
|
|
5
2
|
"sec": "сек",
|
|
6
|
-
"chooseLanguage": "Выбрать язык",
|
|
7
|
-
"topMenu": {
|
|
8
|
-
"home": "Ссылки",
|
|
9
|
-
"feedback": "Отзывы",
|
|
10
|
-
"shop": "Магазин",
|
|
11
|
-
"help": "Помощь",
|
|
12
|
-
"about": "О нас",
|
|
13
|
-
"profile": "Профиль",
|
|
14
|
-
"admin": "Админ",
|
|
15
|
-
"logo": "Логотип Vikneska",
|
|
16
|
-
"adminTag": "Аккаунт администратора"
|
|
17
|
-
},
|
|
18
|
-
"sections": {
|
|
19
|
-
"packs": {
|
|
20
|
-
"title": "Доступные паки для покупки",
|
|
21
|
-
"viewAll": "Посмотреть все паки"
|
|
22
|
-
},
|
|
23
|
-
"purchase": {
|
|
24
|
-
"title": "Можно купить полные наборы и видео",
|
|
25
|
-
"gumroad": {
|
|
26
|
-
"title": "Gumroad",
|
|
27
|
-
"description": "Покупайте полные наборы фото и видео"
|
|
28
|
-
},
|
|
29
|
-
"boosty": {
|
|
30
|
-
"title": "Boosty",
|
|
31
|
-
"description": "Покупайте полные наборы фото и видео"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"links": {
|
|
35
|
-
"title": "Больше контента от меня",
|
|
36
|
-
"subtitle": "Найдёте много дополнительного контента"
|
|
37
|
-
},
|
|
38
|
-
"accounts": {
|
|
39
|
-
"title": "Мои аккаунты",
|
|
40
|
-
"subtitle": "У меня несколько аккаунтов. Все они настоящие и принадлежат мне"
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"shopPage": {
|
|
44
|
-
"metaTitle": "Магазин паков - Vikneska",
|
|
45
|
-
"metaDescription": "Эксклюзивные паки фотографий и видео от Vikneska. Покупайте напрямую через Boosty, Fansly и другие платформы.",
|
|
46
|
-
"backToPacks": "← Назад к пакам",
|
|
47
|
-
"whereToBuy": "Где купить?"
|
|
48
|
-
},
|
|
49
|
-
"indexPage": {
|
|
50
|
-
"metaTitle": "Vikneska - Контент, общение и бесплатные материалы",
|
|
51
|
-
"metaDescription": "Магазин эксклюзивного контента Vikneska. Получайте бесплатный контент, общайтесь и покупайте премиум наборы фото и видео"
|
|
52
|
-
},
|
|
53
3
|
"areYouSure": {
|
|
54
4
|
"title": "Вы уверены?",
|
|
55
5
|
"Yes": "Да",
|
|
@@ -59,7 +9,9 @@
|
|
|
59
9
|
"title404": "Страница не найдена: 404",
|
|
60
10
|
"title": "Что-то случилось. Попробуйте позже",
|
|
61
11
|
"goToHome": "Перейти на Главную",
|
|
62
|
-
"refresh": "Обновить"
|
|
12
|
+
"refresh": "Обновить",
|
|
13
|
+
"emailNotProvided": "Email не указан",
|
|
14
|
+
"typeNotProvided": "Тип не указан"
|
|
63
15
|
},
|
|
64
16
|
"buttons": {
|
|
65
17
|
"login": "Вход",
|
|
@@ -71,58 +23,6 @@
|
|
|
71
23
|
"confirm": "Подтвердить",
|
|
72
24
|
"sendCode": "Отправить код"
|
|
73
25
|
},
|
|
74
|
-
"footer": {
|
|
75
|
-
"help": "Вопрос-ответ",
|
|
76
|
-
"about": "О сервисе",
|
|
77
|
-
"contacts": "Контакты"
|
|
78
|
-
},
|
|
79
|
-
"profile": {
|
|
80
|
-
"title": "Мой профиль",
|
|
81
|
-
"role": "Роль:",
|
|
82
|
-
"admin": "Админ",
|
|
83
|
-
"manager": "Менеджер",
|
|
84
|
-
"balance": "Баланс",
|
|
85
|
-
"profileId": "ID профиля на сайте:",
|
|
86
|
-
"copy": "Копировать",
|
|
87
|
-
"copied": "Скопировано в буфер",
|
|
88
|
-
"telegramAccount": "Telegram аккаунт:",
|
|
89
|
-
"password": "Пароль: ********",
|
|
90
|
-
"payments": "Платежи",
|
|
91
|
-
"settings": "Настройки",
|
|
92
|
-
"changeTempPassword": {
|
|
93
|
-
"title": "Задайте пароль для сайта",
|
|
94
|
-
"subtitle": "Вы вошли на сайт по временному паролю, укажите постоянный"
|
|
95
|
-
},
|
|
96
|
-
"updatePassword": {
|
|
97
|
-
"oldPassword": "Старый пароль",
|
|
98
|
-
"newPassword": "Новый пароль",
|
|
99
|
-
"repeatPassword": "Повторите пароль",
|
|
100
|
-
"passwordMismatch": "Пароли не совпадают",
|
|
101
|
-
"saved": "Сохранено"
|
|
102
|
-
},
|
|
103
|
-
"confirmEmail": {
|
|
104
|
-
"title": "Подтвердить email",
|
|
105
|
-
"subtitle": "Мы отправим код подтверждения на этот адрес",
|
|
106
|
-
"codeLabel": "Код из письма",
|
|
107
|
-
"success": "Успешно",
|
|
108
|
-
"error": "Ошибка подтверждения",
|
|
109
|
-
"checkEmail": "Проверьте email",
|
|
110
|
-
"codeNotSent": "Код не отправлен",
|
|
111
|
-
"spamNote": "Если код не приходит, проверьте папку Спам"
|
|
112
|
-
},
|
|
113
|
-
"updateEmail": {
|
|
114
|
-
"label": "Ваш email",
|
|
115
|
-
"confirmButton": "Подтвердить email"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"userForm": {
|
|
119
|
-
"banned": "Забанен",
|
|
120
|
-
"testPayments": "Тест. платежи",
|
|
121
|
-
"yes": "Да",
|
|
122
|
-
"no": "Нет",
|
|
123
|
-
"success": "Успешно",
|
|
124
|
-
"editing": "Редактирование"
|
|
125
|
-
},
|
|
126
26
|
"formItem": {
|
|
127
27
|
"required": "Обязательно"
|
|
128
28
|
},
|
|
@@ -180,92 +80,10 @@
|
|
|
180
80
|
"confirmationMetaDescription": "Подтверждение email адреса",
|
|
181
81
|
"confirmationSendError": "Ошибка отправки письма",
|
|
182
82
|
"confirmationWrongToken": "Ваш токен истёк или содержит ошибку. Запросите новое письмо с правильной ссылкой:",
|
|
183
|
-
"confirmationSendLink": "Получить письмо"
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
"
|
|
187
|
-
"
|
|
188
|
-
"userAgreement": "Пользовательское соглашение",
|
|
189
|
-
"privacyPolicy": "Политика конфиденциальности",
|
|
190
|
-
"cookiePolicy": "Политика куки",
|
|
191
|
-
"helpCenter": "Центр помощи"
|
|
192
|
-
},
|
|
193
|
-
"payment": {
|
|
194
|
-
"paidTitle": "Успешная оплата",
|
|
195
|
-
"notPaidTitle": "Неуспешная оплата",
|
|
196
|
-
"paidDescription": "Платеж успешно проведён",
|
|
197
|
-
"notPaidDescription": "При проведении платежа произошла ошибка. Попробуйте снова или обратитесь в поддержку",
|
|
198
|
-
"toMyPurchases": "К моим покупкам",
|
|
199
|
-
"method": {
|
|
200
|
-
"CARD": "Карта",
|
|
201
|
-
"BALANCE": "Баланс",
|
|
202
|
-
"COMPANY_BILL": "Р/сч",
|
|
203
|
-
"CREDIT": "Кредит",
|
|
204
|
-
"PHYSICAL_BILL": "Б/сч",
|
|
205
|
-
"%future added value": ""
|
|
206
|
-
},
|
|
207
|
-
"status": {
|
|
208
|
-
"ERROR": "Ошибка",
|
|
209
|
-
"PENDING": "Оформление покупки",
|
|
210
|
-
"PAID": "Оплачено, обрабатываем",
|
|
211
|
-
"FINISHED": "Завершено",
|
|
212
|
-
"%future added value": ""
|
|
213
|
-
},
|
|
214
|
-
"saleChannel": {
|
|
215
|
-
"TELEGRAM_BOT": "Телеграм бот",
|
|
216
|
-
"WEBSITE": "Сайт",
|
|
217
|
-
"%future added value": ""
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
"currency": {
|
|
221
|
-
"RUB": "₽",
|
|
222
|
-
"USD": "$",
|
|
223
|
-
"EUR": "€",
|
|
224
|
-
"%future added value": ""
|
|
225
|
-
},
|
|
226
|
-
"currencyTitle": {
|
|
227
|
-
"RUB": "Рубль РФ",
|
|
228
|
-
"USD": "Доллар США",
|
|
229
|
-
"EUR": "Евро",
|
|
230
|
-
"%future added value": ""
|
|
231
|
-
},
|
|
232
|
-
"help": {
|
|
233
|
-
"metaTitle": "Помощь",
|
|
234
|
-
"metaDescription": "Ответы на вопросы и поддержка",
|
|
235
|
-
"title": "Помощь и FAQ",
|
|
236
|
-
"subtitle": "Ответы на частые вопросы",
|
|
237
|
-
"faq": {
|
|
238
|
-
"passwordRecovery": {
|
|
239
|
-
"question": "Как восстановить пароль",
|
|
240
|
-
"answer": "Для восстановления пароля перейдите на страницу Восстановление пароля, укажите email, с которого регистрировались на сайте и следуйте дальнейшим инструкциям"
|
|
241
|
-
},
|
|
242
|
-
"scam": {
|
|
243
|
-
"question": "Меня не обманут?",
|
|
244
|
-
"answer": "Нет, мы не мошенники. Мы отвечаем за свои слова и всегда идём на встречу нашим покупателям. Нам очень выгодно строить с Вами долгосрочное сотрудничество. Работаем мы уже давно, у нас много довольных клиентов"
|
|
245
|
-
},
|
|
246
|
-
"somethingWrong": {
|
|
247
|
-
"question": "Если что-то пошло не так",
|
|
248
|
-
"answer": "Обратитесь по нашим контактам наверху этой страницы, и мы обязательно поможем"
|
|
249
|
-
},
|
|
250
|
-
"otherGames": {
|
|
251
|
-
"question": "Если нужна другая игра или сервис",
|
|
252
|
-
"answer": "Напишите нам по любому из наших контактов и расскажите, какие пополнения нужно сделать. Мы стараемся добавлять самые актуальные игры и сервисы в наш каталог"
|
|
253
|
-
},
|
|
254
|
-
"blogger": {
|
|
255
|
-
"question": "Я блогер и хочу сотрудничать",
|
|
256
|
-
"answer": "Мы с удовольствием поработаем с вами. У нас отличные условия для блогеров. Будем рады. Больше подробностей здесь"
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
"sitemap": {
|
|
261
|
-
"metaTitle": "Карта сайта Vikneska.com",
|
|
262
|
-
"title": "Карта сайта"
|
|
263
|
-
},
|
|
264
|
-
"docsPage": {
|
|
265
|
-
"user-agreement": "Пользовательское соглашение",
|
|
266
|
-
"public-offer": "Публичная оферта",
|
|
267
|
-
"public-offer-recurrent": "Оферта повторяющихся платежей",
|
|
268
|
-
"privacy-policy": "Политика конфиденциальности",
|
|
269
|
-
"agency-agreement": "Агентский договор"
|
|
83
|
+
"confirmationSendLink": "Получить письмо",
|
|
84
|
+
"setNewCodeLabel": "Код из письма",
|
|
85
|
+
"wrongParamsTitle": "Ошибочные параметры",
|
|
86
|
+
"wrongParamsSubtitle": "Вы перешли на эту страницу с неверными параметрами, вернитесь назад, чтобы исправить ошибку",
|
|
87
|
+
"goBack": "Вернуться назад"
|
|
270
88
|
}
|
|
271
89
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @generated SignedSource<<fa5d43293d27c101facae2d958971c83>>
|
|
3
|
-
* @lightSyntaxTransform
|
|
4
|
-
* @nogrep
|
|
5
|
-
*/
|
|
6
|
-
import { ConcreteRequest } from 'relay-runtime';
|
|
7
|
-
export type ForgotPasswordInput = {
|
|
8
|
-
email: string;
|
|
9
|
-
};
|
|
10
|
-
export type ForgotPasswordMutation$variables = {
|
|
11
|
-
input: ForgotPasswordInput;
|
|
12
|
-
};
|
|
13
|
-
export type ForgotPasswordMutation$data = {
|
|
14
|
-
readonly forgotPassword: {
|
|
15
|
-
readonly codeIsSent: boolean;
|
|
16
|
-
readonly limitExpiresAt: number;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export type ForgotPasswordMutation = {
|
|
20
|
-
response: ForgotPasswordMutation$data;
|
|
21
|
-
variables: ForgotPasswordMutation$variables;
|
|
22
|
-
};
|
|
23
|
-
declare const node: ConcreteRequest;
|
|
24
|
-
export default node;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ConcreteRequest } from 'relay-runtime';
|
|
2
|
-
export type RecoverPasswordInput = {
|
|
3
|
-
token: string;
|
|
4
|
-
password: string;
|
|
5
|
-
};
|
|
6
|
-
export type recoveryMutation$variables = {
|
|
7
|
-
input: RecoverPasswordInput;
|
|
8
|
-
};
|
|
9
|
-
export type recoveryMutation$data = {
|
|
10
|
-
readonly recoverPassword: {
|
|
11
|
-
readonly ok: boolean;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export type recoveryMutation = {
|
|
15
|
-
response: recoveryMutation$data;
|
|
16
|
-
variables: recoveryMutation$variables;
|
|
17
|
-
};
|
|
18
|
-
declare const node: ConcreteRequest;
|
|
19
|
-
export default node;
|