@blocklet/ui-react 2.9.91 → 2.10.0
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/build.config.ts +1 -6
- package/lib/@types/index.d.ts +1 -0
- package/lib/@types/index.js +0 -1
- package/lib/BlockletStudio/index.js +50 -50
- package/lib/ComponentInstaller/index.js +122 -202
- package/lib/ComponentInstaller/installer-item.js +116 -138
- package/lib/ComponentInstaller/locales.js +5 -10
- package/lib/ComponentInstaller/use-component-installed.js +37 -41
- package/lib/ComponentManager/components/add-component.js +58 -67
- package/lib/ComponentManager/components/check-component.js +2 -9
- package/lib/ComponentManager/components/publish-component.js +50 -59
- package/lib/ComponentManager/components/resource-dialog.js +42 -39
- package/lib/ComponentManager/index.js +3 -27
- package/lib/ComponentManager/libs/locales.js +2 -8
- package/lib/Dashboard/index.js +74 -99
- package/lib/Footer/brand.js +21 -43
- package/lib/Footer/copyright.js +15 -24
- package/lib/Footer/index.js +47 -71
- package/lib/Footer/internal-footer.js +72 -100
- package/lib/Footer/layout/plain.js +26 -45
- package/lib/Footer/layout/row.js +12 -29
- package/lib/Footer/layout/standard.js +34 -64
- package/lib/Footer/links.js +74 -104
- package/lib/Footer/social-media.js +35 -42
- package/lib/Header/index.js +69 -117
- package/lib/Icon/index.js +18 -53
- package/{es/UserCenter/components/notification.d.ts → lib/UserCenter/components/config-profile.d.ts} +1 -1
- package/lib/UserCenter/components/config-profile.js +67 -0
- package/lib/UserCenter/components/notification.js +203 -186
- package/lib/UserCenter/components/passport.js +70 -79
- package/lib/UserCenter/components/privacy.js +86 -88
- package/lib/UserCenter/components/settings.js +74 -84
- package/lib/UserCenter/components/storage/connect-to.js +56 -75
- package/lib/UserCenter/components/storage/connected.js +16 -37
- package/lib/UserCenter/components/storage/delete.js +42 -51
- package/lib/UserCenter/components/storage/disconnect.js +15 -29
- package/lib/UserCenter/components/storage/index.js +20 -54
- package/lib/UserCenter/components/storage/item.js +94 -122
- package/lib/UserCenter/components/storage/preview-nft.js +77 -85
- package/lib/UserCenter/components/third-party-login/index.js +49 -61
- package/lib/UserCenter/components/third-party-login/third-party-item.js +159 -176
- package/lib/UserCenter/components/user-center.js +276 -287
- package/lib/UserCenter/components/user-info/index.js +3 -27
- package/lib/UserCenter/components/user-info/user-basic-info.js +134 -129
- package/lib/UserCenter/components/user-info/user-info-item.js +43 -37
- package/lib/UserCenter/components/user-info/user-info.js +41 -74
- package/lib/UserCenter/components/webhook-item.js +184 -177
- package/lib/UserCenter/index.js +1 -13
- package/lib/UserCenter/libs/api.js +4 -16
- package/lib/UserCenter/libs/locales.d.ts +10 -0
- package/lib/UserCenter/libs/locales.js +12 -8
- package/lib/UserCenter/libs/utils.js +7 -17
- package/lib/UserSessions/components/user-session-info.js +88 -85
- package/lib/UserSessions/components/user-sessions.js +177 -213
- package/lib/UserSessions/index.js +1 -13
- package/lib/UserSessions/libs/locales.js +2 -8
- package/lib/UserSessions/libs/utils.js +4 -11
- package/lib/blocklets.js +59 -63
- package/lib/common/header-addons.js +44 -60
- package/lib/common/link-blocker.js +9 -18
- package/lib/common/overridable-theme-provider.js +10 -23
- package/lib/common/wallet-hidden-topbar.js +7 -14
- package/lib/contexts/config-user-space.js +38 -46
- package/lib/hooks/use-mobile.js +5 -13
- package/lib/index.js +10 -100
- package/lib/libs/client.js +2 -8
- package/lib/libs/spaces.js +6 -13
- package/lib/types.js +39 -41
- package/lib/utils.js +25 -44
- package/package.json +8 -38
- package/src/@types/index.ts +1 -0
- package/src/Footer/brand.jsx +6 -1
- package/src/UserCenter/components/config-profile.tsx +70 -0
- package/src/UserCenter/components/notification.tsx +63 -47
- package/src/UserCenter/components/settings.tsx +6 -0
- package/src/UserCenter/libs/locales.ts +10 -0
- package/es/@types/index.d.ts +0 -101
- package/es/@types/index.js +0 -0
- package/es/@types/shims.d.ts +0 -16
- package/es/BlockletStudio/index.d.ts +0 -28
- package/es/BlockletStudio/index.js +0 -114
- package/es/ComponentInstaller/index.d.ts +0 -37
- package/es/ComponentInstaller/index.js +0 -200
- package/es/ComponentInstaller/installer-item.d.ts +0 -21
- package/es/ComponentInstaller/installer-item.js +0 -139
- package/es/ComponentInstaller/locales.d.ts +0 -28
- package/es/ComponentInstaller/locales.js +0 -22
- package/es/ComponentInstaller/use-component-installed.d.ts +0 -12
- package/es/ComponentInstaller/use-component-installed.js +0 -88
- package/es/ComponentManager/components/add-component.d.ts +0 -16
- package/es/ComponentManager/components/add-component.js +0 -114
- package/es/ComponentManager/components/check-component.d.ts +0 -2
- package/es/ComponentManager/components/check-component.js +0 -2
- package/es/ComponentManager/components/publish-component.d.ts +0 -10
- package/es/ComponentManager/components/publish-component.js +0 -76
- package/es/ComponentManager/components/resource-dialog.d.ts +0 -14
- package/es/ComponentManager/components/resource-dialog.js +0 -74
- package/es/ComponentManager/index.d.ts +0 -3
- package/es/ComponentManager/index.js +0 -3
- package/es/ComponentManager/libs/locales.d.ts +0 -14
- package/es/ComponentManager/libs/locales.js +0 -14
- package/es/Dashboard/index.d.ts +0 -40
- package/es/Dashboard/index.js +0 -118
- package/es/Footer/brand.d.ts +0 -22
- package/es/Footer/brand.js +0 -73
- package/es/Footer/copyright.d.ts +0 -18
- package/es/Footer/copyright.js +0 -25
- package/es/Footer/index.d.ts +0 -6
- package/es/Footer/index.js +0 -82
- package/es/Footer/internal-footer.d.ts +0 -29
- package/es/Footer/internal-footer.js +0 -117
- package/es/Footer/layout/plain.d.ts +0 -15
- package/es/Footer/layout/plain.js +0 -39
- package/es/Footer/layout/row.d.ts +0 -18
- package/es/Footer/layout/row.js +0 -41
- package/es/Footer/layout/standard.d.ts +0 -15
- package/es/Footer/layout/standard.js +0 -53
- package/es/Footer/links.d.ts +0 -22
- package/es/Footer/links.js +0 -207
- package/es/Footer/social-media.d.ts +0 -14
- package/es/Footer/social-media.js +0 -60
- package/es/Header/index.d.ts +0 -10
- package/es/Header/index.js +0 -155
- package/es/Icon/index.d.ts +0 -23
- package/es/Icon/index.js +0 -55
- package/es/UserCenter/assets/banner.png +0 -0
- package/es/UserCenter/components/notification.js +0 -248
- package/es/UserCenter/components/passport.d.ts +0 -6
- package/es/UserCenter/components/passport.js +0 -88
- package/es/UserCenter/components/privacy.d.ts +0 -11
- package/es/UserCenter/components/privacy.js +0 -99
- package/es/UserCenter/components/settings.d.ts +0 -9
- package/es/UserCenter/components/settings.js +0 -89
- package/es/UserCenter/components/storage/connect-to.d.ts +0 -7
- package/es/UserCenter/components/storage/connect-to.js +0 -108
- package/es/UserCenter/components/storage/connected.d.ts +0 -7
- package/es/UserCenter/components/storage/connected.js +0 -24
- package/es/UserCenter/components/storage/delete.d.ts +0 -7
- package/es/UserCenter/components/storage/delete.js +0 -62
- package/es/UserCenter/components/storage/disconnect.d.ts +0 -3
- package/es/UserCenter/components/storage/disconnect.js +0 -23
- package/es/UserCenter/components/storage/icons/empty-spaces-nft.svg +0 -58
- package/es/UserCenter/components/storage/icons/long-arrow.svg +0 -5
- package/es/UserCenter/components/storage/icons/space-connected.svg +0 -3
- package/es/UserCenter/components/storage/icons/space-disconnect.svg +0 -3
- package/es/UserCenter/components/storage/index.d.ts +0 -3
- package/es/UserCenter/components/storage/index.js +0 -27
- package/es/UserCenter/components/storage/item.d.ts +0 -9
- package/es/UserCenter/components/storage/item.js +0 -158
- package/es/UserCenter/components/storage/preview-nft.d.ts +0 -6
- package/es/UserCenter/components/storage/preview-nft.js +0 -80
- package/es/UserCenter/components/third-party-login/index.d.ts +0 -5
- package/es/UserCenter/components/third-party-login/index.js +0 -110
- package/es/UserCenter/components/third-party-login/third-party-item.d.ts +0 -13
- package/es/UserCenter/components/third-party-login/third-party-item.js +0 -224
- package/es/UserCenter/components/user-center.d.ts +0 -15
- package/es/UserCenter/components/user-center.js +0 -414
- package/es/UserCenter/components/user-info/index.d.ts +0 -3
- package/es/UserCenter/components/user-info/index.js +0 -3
- package/es/UserCenter/components/user-info/user-basic-info.d.ts +0 -11
- package/es/UserCenter/components/user-info/user-basic-info.js +0 -151
- package/es/UserCenter/components/user-info/user-info-item.d.ts +0 -11
- package/es/UserCenter/components/user-info/user-info-item.js +0 -47
- package/es/UserCenter/components/user-info/user-info.d.ts +0 -6
- package/es/UserCenter/components/user-info/user-info.js +0 -66
- package/es/UserCenter/components/webhook-item.d.ts +0 -3
- package/es/UserCenter/components/webhook-item.js +0 -243
- package/es/UserCenter/index.d.ts +0 -1
- package/es/UserCenter/index.js +0 -1
- package/es/UserCenter/libs/api.d.ts +0 -3
- package/es/UserCenter/libs/api.js +0 -4
- package/es/UserCenter/libs/locales.d.ts +0 -162
- package/es/UserCenter/libs/locales.js +0 -162
- package/es/UserCenter/libs/utils.d.ts +0 -4
- package/es/UserCenter/libs/utils.js +0 -14
- package/es/UserSessions/components/user-session-info.d.ts +0 -6
- package/es/UserSessions/components/user-session-info.js +0 -92
- package/es/UserSessions/components/user-sessions.d.ts +0 -9
- package/es/UserSessions/components/user-sessions.js +0 -265
- package/es/UserSessions/index.d.ts +0 -1
- package/es/UserSessions/index.js +0 -1
- package/es/UserSessions/libs/locales.d.ts +0 -58
- package/es/UserSessions/libs/locales.js +0 -58
- package/es/UserSessions/libs/utils.d.ts +0 -2
- package/es/UserSessions/libs/utils.js +0 -73
- package/es/blocklets.d.ts +0 -16
- package/es/blocklets.js +0 -178
- package/es/common/header-addons.d.ts +0 -21
- package/es/common/header-addons.js +0 -83
- package/es/common/link-blocker.d.ts +0 -7
- package/es/common/link-blocker.js +0 -18
- package/es/common/overridable-theme-provider.d.ts +0 -18
- package/es/common/overridable-theme-provider.js +0 -15
- package/es/common/wallet-hidden-topbar.d.ts +0 -1
- package/es/common/wallet-hidden-topbar.js +0 -14
- package/es/contexts/config-user-space.d.ts +0 -26
- package/es/contexts/config-user-space.js +0 -53
- package/es/hooks/use-mobile.d.ts +0 -4
- package/es/hooks/use-mobile.js +0 -5
- package/es/index.d.ts +0 -10
- package/es/index.js +0 -10
- package/es/libs/client.d.ts +0 -2
- package/es/libs/client.js +0 -2
- package/es/libs/spaces.d.ts +0 -2
- package/es/libs/spaces.js +0 -13
- package/es/types.d.ts +0 -2
- package/es/types.js +0 -43
- package/es/utils.d.ts +0 -8
- package/es/utils.js +0 -78
|
@@ -1,89 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var _react2 = require("react");
|
|
25
|
-
var _pick = _interopRequireDefault(require("lodash/pick"));
|
|
26
|
-
var _federated = require("@arcblock/ux/lib/Util/federated");
|
|
27
|
-
var _constant = require("@arcblock/ux/lib/Util/constant");
|
|
28
|
-
var _locales = require("../../libs/locales");
|
|
29
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
|
-
function ThirdPartyItem({
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from "@iconify/react";
|
|
3
|
+
import { Box, Tooltip, Typography } from "@mui/material";
|
|
4
|
+
import LinkRoundedIcon from "@iconify-icons/material-symbols/link-rounded";
|
|
5
|
+
import { temp as colors } from "@arcblock/ux/lib/Colors";
|
|
6
|
+
import Button from "@arcblock/ux/lib/Button";
|
|
7
|
+
import Avatar from "@arcblock/ux/lib/Avatar";
|
|
8
|
+
import { useCreation, useMemoizedFn, useReactive } from "ahooks";
|
|
9
|
+
import { translate } from "@arcblock/ux/lib/Locale/util";
|
|
10
|
+
import { useConfirm } from "@arcblock/ux/lib/Dialog";
|
|
11
|
+
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
12
|
+
import MailOutlineRoundedIcon from "@iconify-icons/material-symbols/mail-outline-rounded";
|
|
13
|
+
import InfoOutlineRoundedIcon from "@iconify-icons/material-symbols/info-outline-rounded";
|
|
14
|
+
import AppleIcon from "@iconify-icons/logos/apple";
|
|
15
|
+
import GithubIcon from "@iconify-icons/logos/github-icon";
|
|
16
|
+
import GoogleIcon from "@iconify-icons/logos/google-icon";
|
|
17
|
+
import { SessionContext } from "@arcblock/did-connect/lib/Session";
|
|
18
|
+
import { useContext } from "react";
|
|
19
|
+
import pick from "lodash/pick";
|
|
20
|
+
import { getFederatedEnabled, getMaster } from "@arcblock/ux/lib/Util/federated";
|
|
21
|
+
import { LOGIN_PROVIDER, OAUTH_PROVIDER } from "@arcblock/ux/lib/Util/constant";
|
|
22
|
+
import { translations } from "../../libs/locales.js";
|
|
23
|
+
export default function ThirdPartyItem({
|
|
31
24
|
item
|
|
32
25
|
}) {
|
|
33
|
-
const {
|
|
34
|
-
|
|
35
|
-
confirmHolder
|
|
36
|
-
} = (0, _Dialog.useConfirm)();
|
|
37
|
-
const currentState = (0, _ahooks.useReactive)({
|
|
26
|
+
const { confirmApi, confirmHolder } = useConfirm();
|
|
27
|
+
const currentState = useReactive({
|
|
38
28
|
loading: false
|
|
39
29
|
});
|
|
40
|
-
const {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const t = (0, _ahooks.useMemoizedFn)((key, data = {}) => {
|
|
44
|
-
return (0, _util.translate)(_locales.translations, key, locale, "en", data);
|
|
30
|
+
const { locale } = useLocaleContext();
|
|
31
|
+
const t = useMemoizedFn((key, data = {}) => {
|
|
32
|
+
return translate(translations, key, locale, "en", data);
|
|
45
33
|
});
|
|
46
|
-
const {
|
|
47
|
-
|
|
48
|
-
} = (0, _react2.useContext)(_Session.SessionContext);
|
|
49
|
-
const {
|
|
50
|
-
bindOAuth,
|
|
51
|
-
unbindOAuth,
|
|
52
|
-
setBaseUrl,
|
|
53
|
-
baseUrl: oauthBaseUrl
|
|
54
|
-
} = session.useOAuth();
|
|
34
|
+
const { session } = useContext(SessionContext);
|
|
35
|
+
const { bindOAuth, unbindOAuth, setBaseUrl, baseUrl: oauthBaseUrl } = session.useOAuth();
|
|
55
36
|
const iconMap = {
|
|
56
37
|
// email: MailOutlineRoundedIcon,
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[
|
|
38
|
+
[LOGIN_PROVIDER.AUTH0]: MailOutlineRoundedIcon,
|
|
39
|
+
[LOGIN_PROVIDER.APPLE]: AppleIcon,
|
|
40
|
+
[LOGIN_PROVIDER.GITHUB]: GithubIcon,
|
|
41
|
+
[LOGIN_PROVIDER.GOOGLE]: GoogleIcon
|
|
61
42
|
};
|
|
62
|
-
const icon =
|
|
43
|
+
const icon = useCreation(() => {
|
|
63
44
|
return iconMap[item?.provider];
|
|
64
45
|
}, [item?.provider]);
|
|
65
|
-
const title =
|
|
66
|
-
return
|
|
46
|
+
const title = useCreation(() => {
|
|
47
|
+
return OAUTH_PROVIDER[item?.provider] || "unknown";
|
|
67
48
|
}, [item?.provider]);
|
|
68
|
-
const toggleBind =
|
|
49
|
+
const toggleBind = useMemoizedFn(async () => {
|
|
69
50
|
try {
|
|
70
51
|
currentState.loading = true;
|
|
71
52
|
await new Promise((resolve, reject) => {
|
|
72
53
|
if (item?._bind) {
|
|
73
54
|
confirmApi.open({
|
|
74
|
-
title: t("thirdPartyLogin.confirmUnbind", {
|
|
75
|
-
|
|
76
|
-
}),
|
|
77
|
-
content: t("thirdPartyLogin.confirmUnbindDescription", {
|
|
78
|
-
name: title
|
|
79
|
-
}),
|
|
55
|
+
title: t("thirdPartyLogin.confirmUnbind", { name: title }),
|
|
56
|
+
content: t("thirdPartyLogin.confirmUnbindDescription", { name: title }),
|
|
80
57
|
confirmButtonText: t("common.confirm"),
|
|
81
58
|
cancelButtonText: t("common.cancel"),
|
|
82
59
|
onConfirm(close) {
|
|
83
60
|
unbindOAuth({
|
|
84
61
|
session,
|
|
85
62
|
connectedAccount: {
|
|
86
|
-
...(
|
|
63
|
+
...pick(item, ["did", "pk"]),
|
|
87
64
|
showProvider: item.provider,
|
|
88
65
|
provider: item._rawProvider
|
|
89
66
|
}
|
|
@@ -96,8 +73,8 @@ function ThirdPartyItem({
|
|
|
96
73
|
const backupBaseUrl = oauthBaseUrl;
|
|
97
74
|
const blocklet = window?.blocklet;
|
|
98
75
|
let baseUrl = "/";
|
|
99
|
-
const federatedEnabled =
|
|
100
|
-
const master =
|
|
76
|
+
const federatedEnabled = getFederatedEnabled(blocklet);
|
|
77
|
+
const master = getMaster(blocklet);
|
|
101
78
|
if (federatedEnabled && master?.appPid && session?.user?.sourceAppPid) {
|
|
102
79
|
baseUrl = master.appUrl;
|
|
103
80
|
}
|
|
@@ -119,123 +96,129 @@ function ThirdPartyItem({
|
|
|
119
96
|
currentState.loading = false;
|
|
120
97
|
}
|
|
121
98
|
});
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
border: `1px solid ${_Colors.temp.strokeBorderBase}`,
|
|
127
|
-
background: _Colors.temp.backgroundsBgField,
|
|
128
|
-
display: "flex",
|
|
129
|
-
alignItems: "center",
|
|
130
|
-
py: 1,
|
|
131
|
-
px: 1.5,
|
|
132
|
-
gap: 0.75,
|
|
133
|
-
fontSize: "14px",
|
|
134
|
-
lineHeight: 1,
|
|
135
|
-
overflow: "hidden"
|
|
136
|
-
},
|
|
137
|
-
children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
|
|
138
|
-
component: _react.Icon,
|
|
139
|
-
icon,
|
|
140
|
-
width: "1em",
|
|
141
|
-
height: "1em",
|
|
142
|
-
sx: {
|
|
143
|
-
flexShrink: 0,
|
|
144
|
-
fontSize: 16
|
|
145
|
-
}
|
|
146
|
-
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
|
|
147
|
-
sx: {
|
|
148
|
-
flex: 1
|
|
149
|
-
},
|
|
150
|
-
children: title
|
|
151
|
-
}), /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
99
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
100
|
+
/* @__PURE__ */ jsxs(
|
|
101
|
+
Box,
|
|
102
|
+
{
|
|
152
103
|
sx: {
|
|
104
|
+
borderRadius: 2,
|
|
105
|
+
border: `1px solid ${colors.strokeBorderBase}`,
|
|
106
|
+
background: colors.backgroundsBgField,
|
|
153
107
|
display: "flex",
|
|
154
108
|
alignItems: "center",
|
|
155
|
-
|
|
109
|
+
py: 1,
|
|
110
|
+
px: 1.5,
|
|
111
|
+
gap: 0.75,
|
|
112
|
+
fontSize: "14px",
|
|
113
|
+
lineHeight: 1,
|
|
114
|
+
overflow: "hidden"
|
|
156
115
|
},
|
|
157
|
-
children: [
|
|
158
|
-
sx: {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ jsx(Box, { component: Icon, icon, width: "1em", height: "1em", sx: { flexShrink: 0, fontSize: 16 } }),
|
|
118
|
+
/* @__PURE__ */ jsx(
|
|
119
|
+
Box,
|
|
120
|
+
{
|
|
121
|
+
sx: {
|
|
122
|
+
flex: 1
|
|
123
|
+
},
|
|
124
|
+
children: title
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ jsxs(
|
|
128
|
+
Box,
|
|
129
|
+
{
|
|
168
130
|
sx: {
|
|
169
131
|
display: "flex",
|
|
170
132
|
alignItems: "center",
|
|
171
|
-
gap:
|
|
133
|
+
gap: 0.5
|
|
172
134
|
},
|
|
173
|
-
children: [
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
135
|
+
children: [
|
|
136
|
+
/* @__PURE__ */ jsx(
|
|
137
|
+
Box,
|
|
138
|
+
{
|
|
139
|
+
sx: {
|
|
140
|
+
flex: 1,
|
|
141
|
+
textOverflow: "ellipsis",
|
|
142
|
+
overflow: "hidden",
|
|
143
|
+
lineHeight: "normal"
|
|
144
|
+
},
|
|
145
|
+
children: item.userInfo?.email || item.did
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
item.userInfo?.email ? /* @__PURE__ */ jsx(
|
|
149
|
+
Tooltip,
|
|
150
|
+
{
|
|
151
|
+
title: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
152
|
+
/* @__PURE__ */ jsx(Avatar, { size: 36, variant: "circle", shape: "circle", src: item.userInfo?.picture, did: item.did }),
|
|
153
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
154
|
+
/* @__PURE__ */ jsx(
|
|
155
|
+
Typography,
|
|
156
|
+
{
|
|
157
|
+
sx: {
|
|
158
|
+
whiteSpace: "normal",
|
|
159
|
+
wordBreak: "break-all",
|
|
160
|
+
fontSize: "0.9rem"
|
|
161
|
+
},
|
|
162
|
+
children: item.userInfo?.name
|
|
163
|
+
}
|
|
164
|
+
),
|
|
165
|
+
/* @__PURE__ */ jsx(
|
|
166
|
+
Typography,
|
|
167
|
+
{
|
|
168
|
+
sx: {
|
|
169
|
+
whiteSpace: "normal",
|
|
170
|
+
wordBreak: "break-all",
|
|
171
|
+
fontSize: "0.9rem"
|
|
172
|
+
},
|
|
173
|
+
children: item.userInfo?.email
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
] })
|
|
177
|
+
] }) }),
|
|
178
|
+
children: /* @__PURE__ */ jsx(
|
|
179
|
+
Box,
|
|
180
|
+
{
|
|
181
|
+
component: Icon,
|
|
182
|
+
icon: InfoOutlineRoundedIcon,
|
|
183
|
+
color: colors.textSubtitle,
|
|
184
|
+
fontSize: 16,
|
|
185
|
+
sx: { cursor: "pointer", flexShrink: 0 }
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
}
|
|
189
|
+
) : null
|
|
190
|
+
]
|
|
206
191
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
},
|
|
224
|
-
py: 0.5,
|
|
225
|
-
borderRadius: 2,
|
|
226
|
-
fontWeight: 500,
|
|
227
|
-
whiteSpace: "nowrap"
|
|
192
|
+
)
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
),
|
|
196
|
+
/* @__PURE__ */ jsx(Tooltip, { title: item._mainProvider ? t("thirdPartyLogin.mainProviderCantRemove") : "", children: /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
|
|
197
|
+
Button,
|
|
198
|
+
{
|
|
199
|
+
variant: "outlined",
|
|
200
|
+
size: "small",
|
|
201
|
+
sx: {
|
|
202
|
+
color: item?._bind ? colors.red : colors.foregroundsFgBase,
|
|
203
|
+
borderColor: item?._bind ? colors.red : colors.strokeBorderBase,
|
|
204
|
+
backgroundColor: colors.buttonsButtonNeutral,
|
|
205
|
+
"&:hover": {
|
|
206
|
+
borderColor: item?._bind ? colors.red : colors.strokeBorderBase,
|
|
207
|
+
backgroundColor: colors.buttonsButtonNeutralHover
|
|
228
208
|
},
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
209
|
+
py: 0.5,
|
|
210
|
+
borderRadius: 2,
|
|
211
|
+
fontWeight: 500,
|
|
212
|
+
whiteSpace: "nowrap"
|
|
213
|
+
},
|
|
214
|
+
fullWidth: true,
|
|
215
|
+
startIcon: currentState.loading ? null : /* @__PURE__ */ jsx(Icon, { icon: LinkRoundedIcon }),
|
|
216
|
+
onClick: toggleBind,
|
|
217
|
+
disabled: item._mainProvider,
|
|
218
|
+
loading: currentState.loading,
|
|
219
|
+
children: item?._bind ? t("thirdPartyLogin.disconnect") : t("thirdPartyLogin.connect")
|
|
220
|
+
}
|
|
221
|
+
) }) }),
|
|
222
|
+
confirmHolder
|
|
223
|
+
] });
|
|
224
|
+
}
|