@arcblock/ux 3.1.15 → 3.1.16
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/lib/Util/federated.js +10 -7
- package/package.json +7 -7
- package/src/Util/federated.ts +1 -1
package/lib/Util/federated.js
CHANGED
@@ -7,7 +7,10 @@ function s(e = window.blocklet) {
|
|
7
7
|
return (e?.settings?.federated || {}).config;
|
8
8
|
}
|
9
9
|
function d(e = window.blocklet) {
|
10
|
-
|
10
|
+
if (!e)
|
11
|
+
return !1;
|
12
|
+
const p = i(e);
|
13
|
+
return !p || p.appPid === e.appPid ? !1 : s(e)?.status === "approved";
|
11
14
|
}
|
12
15
|
function w(e = window.blocklet) {
|
13
16
|
return i(e)?.appPid;
|
@@ -56,24 +59,24 @@ function u(e = window.blocklet) {
|
|
56
59
|
}) : null;
|
57
60
|
}
|
58
61
|
function g(e) {
|
59
|
-
const p = [], r = c(e),
|
60
|
-
return
|
62
|
+
const p = [], r = c(e), n = u(e), t = d(e);
|
63
|
+
return n && p.push(n), r && r?.appId !== n?.appId && t && p.push(r), p.reverse();
|
61
64
|
}
|
62
|
-
async function
|
65
|
+
async function l(e, p = !1) {
|
63
66
|
if (!p && a[e])
|
64
67
|
return a[e];
|
65
68
|
try {
|
66
69
|
const r = new URL("__blocklet__.js", e);
|
67
70
|
r.searchParams.set("type", "json");
|
68
|
-
const
|
69
|
-
return a[e] =
|
71
|
+
const t = await (await fetch(r.href)).json();
|
72
|
+
return a[e] = t, t;
|
70
73
|
} catch (r) {
|
71
74
|
return console.error(`Failed to get blocklet data: ${e}`, r), null;
|
72
75
|
}
|
73
76
|
}
|
74
77
|
export {
|
75
78
|
g as getApps,
|
76
|
-
|
79
|
+
l as getBlockletData,
|
77
80
|
s as getConfig,
|
78
81
|
u as getCurrentApp,
|
79
82
|
c as getFederatedApp,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.16",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -66,16 +66,16 @@
|
|
66
66
|
"react": "^19.0.0",
|
67
67
|
"react-router-dom": "^6.22.3"
|
68
68
|
},
|
69
|
-
"gitHead": "
|
69
|
+
"gitHead": "27542c7d118ed769c6adeeb10611238dbeb1f664",
|
70
70
|
"dependencies": {
|
71
|
-
"@arcblock/bridge": "3.1.
|
71
|
+
"@arcblock/bridge": "3.1.16",
|
72
72
|
"@arcblock/did": "^1.21.3",
|
73
73
|
"@arcblock/did-motif": "^1.1.14",
|
74
|
-
"@arcblock/icons": "3.1.
|
75
|
-
"@arcblock/nft-display": "3.1.
|
76
|
-
"@arcblock/react-hooks": "3.1.
|
74
|
+
"@arcblock/icons": "3.1.16",
|
75
|
+
"@arcblock/nft-display": "3.1.16",
|
76
|
+
"@arcblock/react-hooks": "3.1.16",
|
77
77
|
"@blocklet/js-sdk": "^1.16.48",
|
78
|
-
"@blocklet/theme": "3.1.
|
78
|
+
"@blocklet/theme": "3.1.16",
|
79
79
|
"@fontsource/roboto": "~5.1.1",
|
80
80
|
"@fontsource/ubuntu-mono": "^5.2.6",
|
81
81
|
"@iconify-icons/logos": "^1.2.36",
|
package/src/Util/federated.ts
CHANGED
@@ -19,7 +19,7 @@ export function getFederatedEnabled(blocklet = window.blocklet) {
|
|
19
19
|
}
|
20
20
|
const master = getMaster(blocklet);
|
21
21
|
// 如果当前应用是 master,则代表未开启统一登录
|
22
|
-
if (master.appPid === blocklet.appPid) {
|
22
|
+
if (!master || master.appPid === blocklet.appPid) {
|
23
23
|
return false;
|
24
24
|
}
|
25
25
|
|