@matchain/matchid-sdk-react 0.1.56-alpha.12 → 0.1.56-alpha.14
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/api.d.mts +2 -2
- package/dist/api.d.ts +2 -2
- package/dist/api.js +83 -44
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +2 -2
- package/dist/{chunk-DUSDBXBT.mjs → chunk-EMSBFHPM.mjs} +174 -124
- package/dist/chunk-EMSBFHPM.mjs.map +1 -0
- package/dist/{chunk-44JQQ34F.mjs → chunk-SEACJPL6.mjs} +2 -2
- package/dist/components.d.mts +3 -3
- package/dist/components.d.ts +3 -3
- package/dist/components.js +161 -122
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +1 -1
- package/dist/hooks.d.mts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +39 -0
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/icon.d.mts +2 -2
- package/dist/icon.d.ts +2 -2
- package/dist/{index-DxHhOW24.d.mts → index-BLjGmf9p.d.mts} +2 -2
- package/dist/{index-BNqdFiOo.d.ts → index-BXhXRggh.d.ts} +1 -1
- package/dist/{index-uB9jBjgs.d.mts → index-Bjb30oE3.d.mts} +35 -31
- package/dist/{index-hz9v-CNJ.d.ts → index-CPnKc6o4.d.ts} +35 -31
- package/dist/{index-CcVHENNv.d.ts → index-CpJtux-G.d.ts} +1 -1
- package/dist/{index-DVlulZhE.d.mts → index-CqHlL6ue.d.mts} +3 -3
- package/dist/{index-DkijpM5Q.d.mts → index-CzCkxwOm.d.mts} +1 -1
- package/dist/{index-84CqVi2I.d.mts → index-DCyE39bg.d.mts} +1 -1
- package/dist/{index-BctnHnJp.d.ts → index-DGsB7f2H.d.ts} +1 -1
- package/dist/{index-Cqdz_5bE.d.ts → index-DQYg6bEA.d.ts} +2 -2
- package/dist/{index-qmC4zt6V.d.ts → index-DZpXCByF.d.ts} +3 -3
- package/dist/{index-Car1jFyN.d.mts → index-De8efmdb.d.mts} +1 -1
- package/dist/{index-BqI0PEIi.d.mts → index-DuCefmJ0.d.mts} +1 -1
- package/dist/{index-CvzpMw3N.d.ts → index-m2bn_W3Y.d.ts} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +173 -123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{types-BrVeC0c8.d.mts → types-C8FLH1yn.d.mts} +1 -0
- package/dist/{types-BrVeC0c8.d.ts → types-C8FLH1yn.d.ts} +1 -0
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/ui.d.mts +3 -3
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +6 -0
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +1 -1
- package/example/src/App.tsx +61 -61
- package/example/src/config/index.ts +8 -6
- package/example/src/pages/Home.tsx +15 -15
- package/example/src/store/useLocalStore.ts +19 -19
- package/example/yarn.lock +1384 -0
- package/package.json +1 -1
- package/dist/chunk-DUSDBXBT.mjs.map +0 -1
- /package/dist/{chunk-44JQQ34F.mjs.map → chunk-SEACJPL6.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -2171,6 +2171,12 @@ var useWalletModalStore = (0, import_zustand2.create)((set) => ({
|
|
|
2171
2171
|
open: (type, methods = DEFAULT_WALLET_METHODS) => set({ isOpen: true, type, methods }),
|
|
2172
2172
|
close: () => set({ isOpen: false })
|
|
2173
2173
|
}));
|
|
2174
|
+
var useEmailModalStore = (0, import_zustand2.create)((set) => ({
|
|
2175
|
+
isOpen: false,
|
|
2176
|
+
type: "login",
|
|
2177
|
+
open: (type) => set({ isOpen: true, type }),
|
|
2178
|
+
close: () => set({ isOpen: false })
|
|
2179
|
+
}));
|
|
2174
2180
|
|
|
2175
2181
|
// src/store/useStore.ts
|
|
2176
2182
|
var import_zustand3 = require("zustand");
|
|
@@ -2207,6 +2213,7 @@ function useUserInfo() {
|
|
|
2207
2213
|
const { open: TONOpen } = useTONModalStore();
|
|
2208
2214
|
const { open: BTCOpen } = useBTCModalStore();
|
|
2209
2215
|
const { open: CEXBindOpen } = useCEXBindModalStore();
|
|
2216
|
+
const { open: EmailOpen } = useEmailModalStore();
|
|
2210
2217
|
const walletModalStore = useWalletModalStore();
|
|
2211
2218
|
const getRedirectUri = () => {
|
|
2212
2219
|
return encodeURIComponent(window.location.href);
|
|
@@ -2341,6 +2348,34 @@ function useUserInfo() {
|
|
|
2341
2348
|
}
|
|
2342
2349
|
return false;
|
|
2343
2350
|
};
|
|
2351
|
+
const bindByEmail = async ({
|
|
2352
|
+
email,
|
|
2353
|
+
code
|
|
2354
|
+
}) => {
|
|
2355
|
+
try {
|
|
2356
|
+
const obj = {
|
|
2357
|
+
email,
|
|
2358
|
+
verification_key: emailLoginKey,
|
|
2359
|
+
verification_code: code
|
|
2360
|
+
};
|
|
2361
|
+
const res = await verifyEmailCodeApi(obj);
|
|
2362
|
+
if (res && res.data && isSuccess(res)) {
|
|
2363
|
+
events.onBind && events.onBind({
|
|
2364
|
+
type: "email"
|
|
2365
|
+
});
|
|
2366
|
+
eventManager_default.emit("onBind", {
|
|
2367
|
+
type: "email"
|
|
2368
|
+
});
|
|
2369
|
+
return true;
|
|
2370
|
+
} else {
|
|
2371
|
+
throw new Error(res.message);
|
|
2372
|
+
}
|
|
2373
|
+
} catch (error) {
|
|
2374
|
+
console.error("bindByEmail", error);
|
|
2375
|
+
throw error;
|
|
2376
|
+
}
|
|
2377
|
+
return false;
|
|
2378
|
+
};
|
|
2344
2379
|
const bindWallet = async () => {
|
|
2345
2380
|
if (!token) {
|
|
2346
2381
|
throw new Error("You must login first");
|
|
@@ -2388,12 +2423,15 @@ function useUserInfo() {
|
|
|
2388
2423
|
return BTCOpen("bind");
|
|
2389
2424
|
case "telegram":
|
|
2390
2425
|
return await bindTelegram();
|
|
2426
|
+
case "email":
|
|
2427
|
+
return EmailOpen("bind");
|
|
2391
2428
|
case "twitter":
|
|
2392
2429
|
case "google":
|
|
2393
2430
|
case "discord":
|
|
2394
2431
|
case "github":
|
|
2395
2432
|
case "linkedin":
|
|
2396
2433
|
case "facebook":
|
|
2434
|
+
case "kakao":
|
|
2397
2435
|
case "youtube":
|
|
2398
2436
|
const link = `${endpoints.back}api/v1/auth/${method == "youtube" ? "google" : method}?appid=${appid}&provider=${method == "youtube" ? "google" : method}&redirect=${encodeURIComponent(endpoints.auth + "bind/" + method)}&authorization=${token.includes("Bearer ") ? token.split(" ")[1] : token}${method == "youtube" ? "&auth_type=youtube" : ""}`;
|
|
2399
2437
|
matchlog_default.log("link", link);
|
|
@@ -2477,6 +2515,7 @@ function useUserInfo() {
|
|
|
2477
2515
|
auth,
|
|
2478
2516
|
login: loginMethod,
|
|
2479
2517
|
bind,
|
|
2518
|
+
bindByEmail,
|
|
2480
2519
|
getAuthInfo,
|
|
2481
2520
|
invite
|
|
2482
2521
|
};
|
|
@@ -2820,7 +2859,7 @@ var import_react_intl2 = require("react-intl");
|
|
|
2820
2859
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2821
2860
|
function StepVerify(props) {
|
|
2822
2861
|
const intl = (0, import_react_intl2.useIntl)();
|
|
2823
|
-
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
2862
|
+
const { getLoginEmailCode, bindByEmail, loginByEmail } = useUserInfo();
|
|
2824
2863
|
const [error, setError] = (0, import_react7.useState)("");
|
|
2825
2864
|
const [code, setCode] = (0, import_react7.useState)("");
|
|
2826
2865
|
const [sending, setSending] = (0, import_react7.useState)(false);
|
|
@@ -2880,7 +2919,10 @@ function StepVerify(props) {
|
|
|
2880
2919
|
try {
|
|
2881
2920
|
setError("");
|
|
2882
2921
|
setSubmitting(true);
|
|
2883
|
-
const res = await
|
|
2922
|
+
const res = props.type === "bind" ? await bindByEmail({
|
|
2923
|
+
email: props.email,
|
|
2924
|
+
code
|
|
2925
|
+
}) : await loginByEmail({
|
|
2884
2926
|
email: props.email,
|
|
2885
2927
|
code
|
|
2886
2928
|
});
|
|
@@ -2942,6 +2984,7 @@ var import_react_intl3 = require("react-intl");
|
|
|
2942
2984
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2943
2985
|
function EmailModal({
|
|
2944
2986
|
isOpen = false,
|
|
2987
|
+
type = "login",
|
|
2945
2988
|
width = 480,
|
|
2946
2989
|
onClose,
|
|
2947
2990
|
onBack,
|
|
@@ -2956,6 +2999,16 @@ function EmailModal({
|
|
|
2956
2999
|
setEmailVal("");
|
|
2957
3000
|
}
|
|
2958
3001
|
}, [isOpen]);
|
|
3002
|
+
const verifySuccess = () => {
|
|
3003
|
+
console.log("verifySuccess", onLogin);
|
|
3004
|
+
if (onLogin) {
|
|
3005
|
+
console.log("verifySuccess to login");
|
|
3006
|
+
onLogin();
|
|
3007
|
+
} else {
|
|
3008
|
+
console.log("verifySuccess to close");
|
|
3009
|
+
onClose && onClose();
|
|
3010
|
+
}
|
|
3011
|
+
};
|
|
2959
3012
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2960
3013
|
ModalWithHeader,
|
|
2961
3014
|
{
|
|
@@ -2969,7 +3022,7 @@ function EmailModal({
|
|
|
2969
3022
|
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
2970
3023
|
setEmailVal(email);
|
|
2971
3024
|
setStep("verify");
|
|
2972
|
-
} }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(StepVerify, { email: emailVal, onSuccess:
|
|
3025
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(StepVerify, { email: emailVal, type, onSuccess: verifySuccess })
|
|
2973
3026
|
}
|
|
2974
3027
|
);
|
|
2975
3028
|
}
|
|
@@ -3119,7 +3172,7 @@ function LoginBox({
|
|
|
3119
3172
|
walletMethods: walletMethodList
|
|
3120
3173
|
};
|
|
3121
3174
|
}, [config.platform, recommendMethods, methods, walletMethods]);
|
|
3122
|
-
const
|
|
3175
|
+
const { open: emailOpen } = useEmailModalStore();
|
|
3123
3176
|
const { login } = useUserInfo();
|
|
3124
3177
|
const [showWallet, setShowWallet] = (0, import_react10.useState)(false);
|
|
3125
3178
|
const intl = (0, import_react_intl4.useIntl)();
|
|
@@ -3135,7 +3188,7 @@ function LoginBox({
|
|
|
3135
3188
|
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3136
3189
|
name: intl.formatMessage({ id: "email" }),
|
|
3137
3190
|
onClick: () => {
|
|
3138
|
-
|
|
3191
|
+
emailOpen("login");
|
|
3139
3192
|
}
|
|
3140
3193
|
},
|
|
3141
3194
|
google: {
|
|
@@ -3185,130 +3238,116 @@ function LoginBox({
|
|
|
3185
3238
|
}
|
|
3186
3239
|
};
|
|
3187
3240
|
const { walletMap } = useWalletConfig();
|
|
3188
|
-
return /* @__PURE__ */ (0, import_jsx_runtime67.
|
|
3189
|
-
|
|
3190
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
children: [
|
|
3210
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
),
|
|
3219
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3220
|
-
"span",
|
|
3221
|
-
{
|
|
3222
|
-
className: "matchid-login-recommend-wallet-item-name",
|
|
3223
|
-
children: m2.name
|
|
3224
|
-
}
|
|
3225
|
-
)
|
|
3226
|
-
] }),
|
|
3241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: (!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-box", children: [
|
|
3242
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
3243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3244
|
+
RecommendItem,
|
|
3245
|
+
{
|
|
3246
|
+
icon: methodMap[m]?.icon,
|
|
3247
|
+
name: methodMap[m]?.name,
|
|
3248
|
+
onClick: methodMap[m]?.onClick,
|
|
3249
|
+
showChildren: m == "wallet" && showWallet,
|
|
3250
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
3251
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
3252
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
3253
|
+
const m2 = walletMap[n];
|
|
3254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
3255
|
+
"div",
|
|
3256
|
+
{
|
|
3257
|
+
className: "matchid-login-recommend-wallet-item",
|
|
3258
|
+
onClick: () => {
|
|
3259
|
+
login(m2.method);
|
|
3260
|
+
},
|
|
3261
|
+
children: [
|
|
3262
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
3263
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
3264
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3265
|
+
"div",
|
|
3266
|
+
{
|
|
3267
|
+
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
3268
|
+
children: m2.activeIcon
|
|
3269
|
+
}
|
|
3270
|
+
),
|
|
3227
3271
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3228
|
-
|
|
3272
|
+
"span",
|
|
3229
3273
|
{
|
|
3230
|
-
className: "matchid-login-recommend-wallet-item-
|
|
3231
|
-
|
|
3232
|
-
color: "var(--matchid-arrow-color)"
|
|
3274
|
+
className: "matchid-login-recommend-wallet-item-name",
|
|
3275
|
+
children: m2.name
|
|
3233
3276
|
}
|
|
3234
3277
|
)
|
|
3235
|
-
]
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3278
|
+
] }),
|
|
3279
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3280
|
+
ArrowRightIcon,
|
|
3281
|
+
{
|
|
3282
|
+
className: "matchid-login-recommend-wallet-item-arrow",
|
|
3283
|
+
size: 20,
|
|
3284
|
+
color: "var(--matchid-arrow-color)"
|
|
3285
|
+
}
|
|
3286
|
+
)
|
|
3287
|
+
]
|
|
3288
|
+
},
|
|
3289
|
+
m2.name
|
|
3290
|
+
);
|
|
3291
|
+
}) })
|
|
3292
|
+
] })
|
|
3293
|
+
},
|
|
3294
|
+
m
|
|
3295
|
+
);
|
|
3296
|
+
}) }),
|
|
3297
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-privacy-policy", children: [
|
|
3298
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-privacy-policy-content", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3299
|
+
import_react_intl4.FormattedMessage,
|
|
3300
|
+
{
|
|
3301
|
+
id: "loginAgreement",
|
|
3302
|
+
values: {
|
|
3303
|
+
termsLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3304
|
+
"a",
|
|
3305
|
+
{
|
|
3306
|
+
href: TERMS_OF_SERVICE_URL,
|
|
3307
|
+
target: "_blank",
|
|
3308
|
+
rel: "noopener noreferrer",
|
|
3309
|
+
className: "matchid-privacy-policy-content-link",
|
|
3310
|
+
children: chunks
|
|
3311
|
+
}
|
|
3312
|
+
),
|
|
3313
|
+
privacyLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3314
|
+
"a",
|
|
3315
|
+
{
|
|
3316
|
+
href: PRIVACY_POLICY_URL,
|
|
3317
|
+
target: "_blank",
|
|
3318
|
+
rel: "noopener noreferrer",
|
|
3319
|
+
className: "matchid-privacy-policy-content-link",
|
|
3320
|
+
children: chunks
|
|
3321
|
+
}
|
|
3322
|
+
)
|
|
3272
3323
|
}
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
] }),
|
|
3279
|
-
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-other", children: [
|
|
3280
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-other-line-box", children: [
|
|
3281
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-line" }),
|
|
3282
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_intl4.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
3283
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-line" })
|
|
3284
|
-
] }),
|
|
3285
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
3286
|
-
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3287
|
-
"div",
|
|
3288
|
-
{
|
|
3289
|
-
className: "matchid-login-method-item",
|
|
3290
|
-
onClick: methodMap[m]?.onClick,
|
|
3291
|
-
title: methodMap[m]?.name,
|
|
3292
|
-
children: methodMap[m]?.icon
|
|
3293
|
-
},
|
|
3294
|
-
m
|
|
3295
|
-
);
|
|
3296
|
-
}) })
|
|
3324
|
+
}
|
|
3325
|
+
) }),
|
|
3326
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-privacy-policy-powered-by", children: [
|
|
3327
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_intl4.FormattedMessage, { id: "poweredBy" }),
|
|
3328
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(MatchIdIcon_default, {})
|
|
3297
3329
|
] })
|
|
3298
3330
|
] }),
|
|
3299
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3331
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-other", children: [
|
|
3332
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-other-line-box", children: [
|
|
3333
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-line" }),
|
|
3334
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_intl4.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
3335
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-line" })
|
|
3336
|
+
] }),
|
|
3337
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
3338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3339
|
+
"div",
|
|
3340
|
+
{
|
|
3341
|
+
className: "matchid-login-method-item",
|
|
3342
|
+
onClick: methodMap[m]?.onClick,
|
|
3343
|
+
title: methodMap[m]?.name,
|
|
3344
|
+
children: methodMap[m]?.icon
|
|
3345
|
+
},
|
|
3346
|
+
m
|
|
3347
|
+
);
|
|
3348
|
+
}) })
|
|
3349
|
+
] })
|
|
3350
|
+
] }) });
|
|
3312
3351
|
}
|
|
3313
3352
|
|
|
3314
3353
|
// src/components/LoginButton/index.tsx
|
|
@@ -7665,7 +7704,7 @@ function CEXBindModal({
|
|
|
7665
7704
|
const [secret, setSecret] = (0, import_react39.useState)("");
|
|
7666
7705
|
const [error, setError] = (0, import_react39.useState)("");
|
|
7667
7706
|
const needPassphrase = (0, import_react39.useMemo)(() => {
|
|
7668
|
-
return ["bitget", "okx"].includes(type.toLowerCase());
|
|
7707
|
+
return ["bitget", "okx", "kucoin"].includes(type.toLowerCase());
|
|
7669
7708
|
}, [type]);
|
|
7670
7709
|
(0, import_react39.useEffect)(() => {
|
|
7671
7710
|
if (isOpen) {
|
|
@@ -7770,6 +7809,7 @@ function BusinessProvider({ children }) {
|
|
|
7770
7809
|
const { type: BTCType, isOpen: BTCIsOpen, close: BTCClose } = useBTCModalStore();
|
|
7771
7810
|
const { type: CEXType, isOpen: CEXIsOpen, close: CEXClose } = useCEXBindModalStore();
|
|
7772
7811
|
const WalletModalStore = useWalletModalStore();
|
|
7812
|
+
const EmailModalStore = useEmailModalStore();
|
|
7773
7813
|
const { tgAppAuthCode, setTgAppAuthCode } = useStore_default();
|
|
7774
7814
|
const { login } = useMatch();
|
|
7775
7815
|
const walletModalClose = (func) => {
|
|
@@ -7855,6 +7895,16 @@ function BusinessProvider({ children }) {
|
|
|
7855
7895
|
zIndex: 150
|
|
7856
7896
|
}
|
|
7857
7897
|
),
|
|
7898
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7899
|
+
EmailModal,
|
|
7900
|
+
{
|
|
7901
|
+
isOpen: EmailModalStore.isOpen && (EmailModalStore.type == "login" && !overview && !token || EmailModalStore.type == "bind" && !!token && !!overview),
|
|
7902
|
+
onClose: EmailModalStore.close,
|
|
7903
|
+
onLogin: EmailModalStore.close,
|
|
7904
|
+
type: EmailModalStore.type,
|
|
7905
|
+
zIndex: 199
|
|
7906
|
+
}
|
|
7907
|
+
),
|
|
7858
7908
|
children
|
|
7859
7909
|
] });
|
|
7860
7910
|
}
|