@arcblock/ux 2.10.62 → 2.10.64
Sign up to get free protection for your applications and to get access to all the features.
package/lib/Util/federated.d.ts
CHANGED
@@ -20,6 +20,7 @@ export function getCurrentApp(blocklet?: any): {
|
|
20
20
|
appLogo: any;
|
21
21
|
appPid: any;
|
22
22
|
appUrl: any;
|
23
|
+
currentAppUrl: string | undefined;
|
23
24
|
version: any;
|
24
25
|
sourceAppPid: null;
|
25
26
|
provider: string;
|
@@ -29,6 +30,7 @@ export function getCurrentApp(blocklet?: any): {
|
|
29
30
|
appName: any;
|
30
31
|
appDescription: any;
|
31
32
|
appUrl: any;
|
33
|
+
currentAppUrl: string;
|
32
34
|
sourceAppPid: null;
|
33
35
|
provider: string;
|
34
36
|
type: string;
|
@@ -51,6 +53,7 @@ export function getApps(blocklet: any): ({
|
|
51
53
|
appName: any;
|
52
54
|
appDescription: any;
|
53
55
|
appUrl: any;
|
56
|
+
currentAppUrl: string;
|
54
57
|
sourceAppPid: null;
|
55
58
|
provider: string;
|
56
59
|
type: string;
|
package/lib/Util/federated.js
CHANGED
@@ -40,6 +40,10 @@ export function getCurrentApp(blocklet = window.blocklet) {
|
|
40
40
|
appLogo: blocklet.appLogo,
|
41
41
|
appPid: blocklet.appPid,
|
42
42
|
appUrl: blocklet.appUrl,
|
43
|
+
// 该判断条件用于限制非统一登录模式下,当前访问的 url 与应用设置的主 url 不一致情况时有效
|
44
|
+
// 页面的请求优先会向当前访问的域名发送,避免产生 cors 的问题
|
45
|
+
// 而在统一登录模式下,这个值不应该提供,因为它始终会需要跨域的请求
|
46
|
+
currentAppUrl: blocklet === window.blocklet ? window.location.origin : undefined,
|
43
47
|
version: blocklet.version,
|
44
48
|
// NOTICE: null 代表该值置空
|
45
49
|
sourceAppPid: null,
|
@@ -55,6 +59,8 @@ export function getCurrentApp(blocklet = window.blocklet) {
|
|
55
59
|
appName: blocklet.appName,
|
56
60
|
appDescription: blocklet.appDescription,
|
57
61
|
appUrl: blocklet.baseUrl,
|
62
|
+
// 在 server 的登录环境下,始终提供当前的 url 作为 appUrl
|
63
|
+
currentAppUrl: window.location.origin,
|
58
64
|
// NOTICE: null 代表该值置空
|
59
65
|
sourceAppPid: null,
|
60
66
|
provider: 'wallet',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "2.10.
|
3
|
+
"version": "2.10.64",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -64,12 +64,12 @@
|
|
64
64
|
"react": ">=18.2.0",
|
65
65
|
"react-router-dom": ">=6.22.3"
|
66
66
|
},
|
67
|
-
"gitHead": "
|
67
|
+
"gitHead": "b5362da4f7e1caa78ed39a37f3844e193d9d289f",
|
68
68
|
"dependencies": {
|
69
69
|
"@arcblock/did-motif": "^1.1.13",
|
70
|
-
"@arcblock/icons": "^2.10.
|
71
|
-
"@arcblock/nft-display": "^2.10.
|
72
|
-
"@arcblock/react-hooks": "^2.10.
|
70
|
+
"@arcblock/icons": "^2.10.64",
|
71
|
+
"@arcblock/nft-display": "^2.10.64",
|
72
|
+
"@arcblock/react-hooks": "^2.10.64",
|
73
73
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
74
74
|
"@fontsource/inter": "^5.0.16",
|
75
75
|
"@fontsource/ubuntu-mono": "^5.0.18",
|
package/src/Util/federated.js
CHANGED
@@ -48,6 +48,10 @@ export function getCurrentApp(blocklet = window.blocklet) {
|
|
48
48
|
appLogo: blocklet.appLogo,
|
49
49
|
appPid: blocklet.appPid,
|
50
50
|
appUrl: blocklet.appUrl,
|
51
|
+
// 该判断条件用于限制非统一登录模式下,当前访问的 url 与应用设置的主 url 不一致情况时有效
|
52
|
+
// 页面的请求优先会向当前访问的域名发送,避免产生 cors 的问题
|
53
|
+
// 而在统一登录模式下,这个值不应该提供,因为它始终会需要跨域的请求
|
54
|
+
currentAppUrl: blocklet === window.blocklet ? window.location.origin : undefined,
|
51
55
|
version: blocklet.version,
|
52
56
|
// NOTICE: null 代表该值置空
|
53
57
|
sourceAppPid: null,
|
@@ -63,6 +67,8 @@ export function getCurrentApp(blocklet = window.blocklet) {
|
|
63
67
|
appName: blocklet.appName,
|
64
68
|
appDescription: blocklet.appDescription,
|
65
69
|
appUrl: blocklet.baseUrl,
|
70
|
+
// 在 server 的登录环境下,始终提供当前的 url 作为 appUrl
|
71
|
+
currentAppUrl: window.location.origin,
|
66
72
|
// NOTICE: null 代表该值置空
|
67
73
|
sourceAppPid: null,
|
68
74
|
provider: 'wallet',
|