touchstudy-core 0.1.85 → 0.1.86
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/index.modern.js
CHANGED
@@ -798,11 +798,16 @@ var BlockLogin = function BlockLogin(_ref3) {
|
|
798
798
|
onSubmit: onSubmit
|
799
799
|
}, function (_ref4) {
|
800
800
|
var errors = _ref4.errors,
|
801
|
+
values = _ref4.values,
|
801
802
|
setFieldValue = _ref4.setFieldValue;
|
803
|
+
console.log({
|
804
|
+
errors: errors,
|
805
|
+
values: values
|
806
|
+
});
|
802
807
|
useEffect(function () {
|
803
|
-
if (
|
804
|
-
if (!isOTP && !isEmail) {
|
808
|
+
if (isOTP) {
|
805
809
|
setFieldValue("email", "");
|
810
|
+
} else {
|
806
811
|
setFieldValue("otp", "");
|
807
812
|
}
|
808
813
|
}, [isOTP, isEmail]);
|
@@ -838,9 +843,8 @@ var BlockLogin = function BlockLogin(_ref3) {
|
|
838
843
|
fontSize: "14px",
|
839
844
|
fontWeight: 700,
|
840
845
|
color: blue[700]
|
841
|
-
}, t("sign_in_with_email"))))), (isEmail || isOTP) && React__default.createElement(Stack, null, React__default.createElement(Stack, {
|
846
|
+
}, t("sign_in_with_email"))))), (isEmail || isOTP) && React__default.createElement(Stack, null, !isOTP ? React__default.createElement(Stack, {
|
842
847
|
flexDirection: "column",
|
843
|
-
display: isOTP ? "none" : "flex",
|
844
848
|
gap: 1
|
845
849
|
}, React__default.createElement(Typography, {
|
846
850
|
fontWeight: 700,
|
@@ -856,9 +860,8 @@ var BlockLogin = function BlockLogin(_ref3) {
|
|
856
860
|
fontSize: "10px",
|
857
861
|
lineHeight: "11.93px",
|
858
862
|
color: !(errors !== null && errors !== void 0 && errors.email) ? "#97A1AF" : "#F34B4B"
|
859
|
-
}, errors === null || errors === void 0 ? void 0 : errors.email))
|
863
|
+
}, errors === null || errors === void 0 ? void 0 : errors.email)) : React__default.createElement(Stack, {
|
860
864
|
flexDirection: "column",
|
861
|
-
display: !isOTP ? "none" : "flex",
|
862
865
|
gap: 1
|
863
866
|
}, React__default.createElement(Typography, {
|
864
867
|
fontWeight: 700,
|
@@ -897,18 +900,10 @@ var BlockLogin = function BlockLogin(_ref3) {
|
|
897
900
|
color: blue[700]
|
898
901
|
}, t("sign_in_with_google_account"))), React__default.createElement(Stack, {
|
899
902
|
flexDirection: "row",
|
900
|
-
justifyContent:
|
903
|
+
justifyContent: "end",
|
901
904
|
gap: 1,
|
902
905
|
mt: 2
|
903
|
-
},
|
904
|
-
variant: "contained",
|
905
|
-
color: "secondary",
|
906
|
-
className: "bg-secondary",
|
907
|
-
onClick: function onClick() {
|
908
|
-
handleSwitchEmail(true);
|
909
|
-
handleSwitchOTP(false);
|
910
|
-
}
|
911
|
-
}, t("back")), React__default.createElement(Button, {
|
906
|
+
}, React__default.createElement(Button, {
|
912
907
|
variant: "contained",
|
913
908
|
color: "primary",
|
914
909
|
type: "submit",
|
@@ -945,14 +940,10 @@ var signInWithEmailApi = function signInWithEmailApi(_ref2) {
|
|
945
940
|
var signInWithOTPApi = function signInWithOTPApi(_ref3) {
|
946
941
|
var academyDomain = _ref3.academyDomain,
|
947
942
|
otp = _ref3.otp,
|
948
|
-
email = _ref3.email,
|
949
|
-
reCaptcha = _ref3.reCaptcha,
|
950
943
|
role = _ref3.role;
|
951
944
|
return api.post((academyDomain ? SIGN_IN_URL : SIGN_IN_SUPER_ADMIN_URL) + "/otp", {
|
952
945
|
otp: otp,
|
953
|
-
|
954
|
-
role: role,
|
955
|
-
reCaptcha: reCaptcha
|
946
|
+
role: role
|
956
947
|
});
|
957
948
|
};
|
958
949
|
var signInWithKeyApi = function signInWithKeyApi(_ref4) {
|
@@ -1039,9 +1030,6 @@ var useLogin$1 = function useLogin(_ref) {
|
|
1039
1030
|
var handleSubmit = function handleSubmit(values) {
|
1040
1031
|
try {
|
1041
1032
|
var _temp5 = function _temp5() {
|
1042
|
-
setRefreshReCaptcha(function (b) {
|
1043
|
-
return !b;
|
1044
|
-
});
|
1045
1033
|
dispatch(setLoading(false));
|
1046
1034
|
};
|
1047
1035
|
if (!tokenReCaptcha) return Promise.resolve();
|
@@ -1051,13 +1039,11 @@ var useLogin$1 = function useLogin(_ref) {
|
|
1051
1039
|
var _temp4 = _catch(function () {
|
1052
1040
|
function _temp3() {
|
1053
1041
|
var _temp = function () {
|
1054
|
-
if (
|
1042
|
+
if (otp) {
|
1055
1043
|
return Promise.resolve(signInWithOTPApi({
|
1056
1044
|
academyDomain: academyDomain,
|
1057
|
-
email: email,
|
1058
1045
|
otp: otp,
|
1059
|
-
role: role
|
1060
|
-
reCaptcha: tokenReCaptcha
|
1046
|
+
role: role
|
1061
1047
|
})).then(function (res) {
|
1062
1048
|
var loginResponse = res === null || res === void 0 ? void 0 : res.data;
|
1063
1049
|
var isFirstLogin = loginResponse.isFirstLogin,
|
@@ -1074,7 +1060,7 @@ var useLogin$1 = function useLogin(_ref) {
|
|
1074
1060
|
if (_temp && _temp.then) return _temp.then(function () {});
|
1075
1061
|
}
|
1076
1062
|
var _temp2 = function () {
|
1077
|
-
if (email
|
1063
|
+
if (email) {
|
1078
1064
|
return Promise.resolve(signInWithEmailApi({
|
1079
1065
|
academyDomain: academyDomain,
|
1080
1066
|
email: email,
|
@@ -1083,6 +1069,9 @@ var useLogin$1 = function useLogin(_ref) {
|
|
1083
1069
|
toast.success(t("please_check_your_mailbox"));
|
1084
1070
|
handleSwitchOTP(true);
|
1085
1071
|
handleSwitchEmail(false);
|
1072
|
+
setRefreshReCaptcha(function (b) {
|
1073
|
+
return !b;
|
1074
|
+
});
|
1086
1075
|
});
|
1087
1076
|
}
|
1088
1077
|
}();
|
@@ -2482,6 +2471,7 @@ var trick_problem = "함정 문제";
|
|
2482
2471
|
var differential_problem = "변별력 문제";
|
2483
2472
|
var difficult_problem = "어려운 문제";
|
2484
2473
|
var general_problem = "일반적인 문제";
|
2474
|
+
var super_difficult_problem = "엄청 어려운 문제";
|
2485
2475
|
var fingerprint = "지문";
|
2486
2476
|
var end = "종료";
|
2487
2477
|
var ask_for_feedback = "피드백 요청하기";
|
@@ -3266,6 +3256,7 @@ var lang_ko = {
|
|
3266
3256
|
differential_problem: differential_problem,
|
3267
3257
|
difficult_problem: difficult_problem,
|
3268
3258
|
general_problem: general_problem,
|
3259
|
+
super_difficult_problem: super_difficult_problem,
|
3269
3260
|
fingerprint: fingerprint,
|
3270
3261
|
end: end,
|
3271
3262
|
ask_for_feedback: ask_for_feedback,
|
@@ -4090,6 +4081,7 @@ var trick_problem$1 = "Trick problem";
|
|
4090
4081
|
var differential_problem$1 = "Differential problem";
|
4091
4082
|
var difficult_problem$1 = "Difficult problem";
|
4092
4083
|
var general_problem$1 = "General problem";
|
4084
|
+
var super_difficult_problem$1 = "Super difficult problem";
|
4093
4085
|
var fingerprint$1 = "Fingerprint";
|
4094
4086
|
var end$1 = "end";
|
4095
4087
|
var ask_for_feedback$1 = "Ask for feedback";
|
@@ -4875,6 +4867,7 @@ var lang_en = {
|
|
4875
4867
|
differential_problem: differential_problem$1,
|
4876
4868
|
difficult_problem: difficult_problem$1,
|
4877
4869
|
general_problem: general_problem$1,
|
4870
|
+
super_difficult_problem: super_difficult_problem$1,
|
4878
4871
|
fingerprint: fingerprint$1,
|
4879
4872
|
end: end$1,
|
4880
4873
|
ask_for_feedback: ask_for_feedback$1,
|
@@ -14204,13 +14197,13 @@ var CompareGrass = function CompareGrass(_ref2) {
|
|
14204
14197
|
fontSize: "11px"
|
14205
14198
|
},
|
14206
14199
|
className: "" + printStyles["avoid-break-inside"]
|
14207
|
-
}, t("general_problem")), problem === 4 && React__default.createElement(ChipCustom, {
|
14200
|
+
}, t("general_problem")), (problem === 4 || problem === 5) && React__default.createElement(ChipCustom, {
|
14208
14201
|
style: {
|
14209
14202
|
border: "1px solid #FF0000",
|
14210
14203
|
fontSize: "11px"
|
14211
14204
|
},
|
14212
14205
|
className: "" + printStyles["avoid-break-inside"]
|
14213
|
-
}, t("difficult_problem")));
|
14206
|
+
}, t(problem === 4 ? "difficult_problem" : "super_difficult_problem")));
|
14214
14207
|
}))));
|
14215
14208
|
});
|
14216
14209
|
};
|