@arcblock/ux 2.5.62 → 2.5.63
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.
@@ -216,27 +216,31 @@ function SessionManager(_ref) {
|
|
216
216
|
}
|
217
217
|
function _onSwitchPassport() {
|
218
218
|
const {
|
219
|
-
user
|
219
|
+
user,
|
220
|
+
provider
|
220
221
|
} = session;
|
221
|
-
if (
|
222
|
+
if (provider === 'auth0') {
|
223
|
+
switchOAuthPassport(user);
|
224
|
+
} else {
|
222
225
|
setUserOpen(false);
|
223
226
|
session.switchPassport(function () {
|
224
227
|
setUserOpen(false);
|
225
228
|
onSwitchPassport(...arguments);
|
226
229
|
});
|
227
|
-
} else {
|
228
|
-
switchOAuthPassport(user);
|
229
230
|
}
|
230
231
|
}
|
231
232
|
function _onBindWallet() {
|
233
|
+
const {
|
234
|
+
provider
|
235
|
+
} = session;
|
232
236
|
setUserOpen(false);
|
233
|
-
if (
|
234
|
-
bindOAuth();
|
235
|
-
} else {
|
237
|
+
if (provider === 'auth0') {
|
236
238
|
session.bindWallet(function () {
|
237
239
|
setUserOpen(false);
|
238
240
|
onBindWallet(...arguments);
|
239
241
|
});
|
242
|
+
} else {
|
243
|
+
bindOAuth();
|
240
244
|
}
|
241
245
|
}
|
242
246
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
@@ -362,7 +366,7 @@ function SessionManager(_ref) {
|
|
362
366
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.SvgIcon, {
|
363
367
|
component: _Link.default,
|
364
368
|
className: "session-manager-menu-icon"
|
365
|
-
}),
|
369
|
+
}), session.provider === 'auth0' ? "".concat(translation.bind, "DID Wallet") : "".concat(translation.bind).concat(translation.thirdParty)]
|
366
370
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.MenuItem, {
|
367
371
|
className: "session-manager-menu-item",
|
368
372
|
onClick: _onLogout,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "2.5.
|
3
|
+
"version": "2.5.63",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -47,11 +47,11 @@
|
|
47
47
|
"peerDependencies": {
|
48
48
|
"react": ">=18.1.0"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "27127c876d9691b6c3a8622a44170787dc931429",
|
51
51
|
"dependencies": {
|
52
52
|
"@arcblock/did-motif": "^1.1.13",
|
53
|
-
"@arcblock/icons": "^2.5.
|
54
|
-
"@arcblock/react-hooks": "^2.5.
|
53
|
+
"@arcblock/icons": "^2.5.63",
|
54
|
+
"@arcblock/react-hooks": "^2.5.63",
|
55
55
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
56
56
|
"@emotion/react": "^11.10.4",
|
57
57
|
"@emotion/styled": "^11.10.4",
|
@@ -171,27 +171,28 @@ function SessionManager({
|
|
171
171
|
});
|
172
172
|
}
|
173
173
|
function _onSwitchPassport() {
|
174
|
-
const { user } = session;
|
175
|
-
if (
|
174
|
+
const { user, provider } = session;
|
175
|
+
if (provider === 'auth0') {
|
176
|
+
switchOAuthPassport(user);
|
177
|
+
} else {
|
176
178
|
setUserOpen(false);
|
177
179
|
session.switchPassport((...args) => {
|
178
180
|
setUserOpen(false);
|
179
181
|
onSwitchPassport(...args);
|
180
182
|
});
|
181
|
-
} else {
|
182
|
-
switchOAuthPassport(user);
|
183
183
|
}
|
184
184
|
}
|
185
185
|
|
186
186
|
function _onBindWallet() {
|
187
|
+
const { provider } = session;
|
187
188
|
setUserOpen(false);
|
188
|
-
if (
|
189
|
-
bindOAuth();
|
190
|
-
} else {
|
189
|
+
if (provider === 'auth0') {
|
191
190
|
session.bindWallet((...args) => {
|
192
191
|
setUserOpen(false);
|
193
192
|
onBindWallet(...args);
|
194
193
|
});
|
194
|
+
} else {
|
195
|
+
bindOAuth();
|
195
196
|
}
|
196
197
|
}
|
197
198
|
|
@@ -305,7 +306,9 @@ function SessionManager({
|
|
305
306
|
onClick={_onBindWallet}
|
306
307
|
data-cy="sessionManager-bind-trigger">
|
307
308
|
<SvgIcon component={BindWalletIcon} className="session-manager-menu-icon" />
|
308
|
-
{
|
309
|
+
{session.provider === 'auth0'
|
310
|
+
? `${translation.bind}DID Wallet`
|
311
|
+
: `${translation.bind}${translation.thirdParty}`}
|
309
312
|
</MenuItem>
|
310
313
|
)}
|
311
314
|
|