@next-core/brick-kit 2.149.1 → 2.150.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/dist/index.bundle.js +42 -12
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +42 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/types/auth.d.ts.map +1 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.bundle.js
CHANGED
|
@@ -1384,7 +1384,8 @@
|
|
|
1384
1384
|
loginFrom: newAuth.loginFrom,
|
|
1385
1385
|
accessRule: newAuth.accessRule,
|
|
1386
1386
|
isAdmin: newAuth.isAdmin,
|
|
1387
|
-
csrfToken: newAuth.csrfToken
|
|
1387
|
+
csrfToken: newAuth.csrfToken,
|
|
1388
|
+
license: newAuth.license
|
|
1388
1389
|
}); // re-init analytics to set user_id
|
|
1389
1390
|
|
|
1390
1391
|
if (easyopsAnalytics.userAnalytics.initialized) {
|
|
@@ -12396,7 +12397,7 @@
|
|
|
12396
12397
|
// we say *page found*, otherwise, *page not found*.
|
|
12397
12398
|
|
|
12398
12399
|
if (route && route.type !== "routes" || failed) {
|
|
12399
|
-
var _this3$kernel$bootstr, _this3$kernel$bootstr2;
|
|
12400
|
+
var _this3$kernel$bootstr, _this3$kernel$bootstr2, _getAuth$license;
|
|
12400
12401
|
|
|
12401
12402
|
main.length > 0 && mountTree(main, mountPoints.main);
|
|
12402
12403
|
portal.length > 0 && mountTree(portal, mountPoints.portal);
|
|
@@ -12426,7 +12427,17 @@
|
|
|
12426
12427
|
path: locationContext.getCurrentMatch().path,
|
|
12427
12428
|
username: getAuth().username,
|
|
12428
12429
|
pageTitle: document.title
|
|
12429
|
-
});
|
|
12430
|
+
}); // show app bar tips
|
|
12431
|
+
|
|
12432
|
+
var tipsDetail = [];
|
|
12433
|
+
|
|
12434
|
+
var getUnionKey = key => {
|
|
12435
|
+
var {
|
|
12436
|
+
org
|
|
12437
|
+
} = getAuth();
|
|
12438
|
+
return "".concat(key, ":").concat(org);
|
|
12439
|
+
};
|
|
12440
|
+
|
|
12430
12441
|
var renderTime = performance.now() - renderStartTime;
|
|
12431
12442
|
var {
|
|
12432
12443
|
loadTime = 0,
|
|
@@ -12436,16 +12447,35 @@
|
|
|
12436
12447
|
if (currentApp.isBuildPush && loadTime > 0 && renderTime > loadTime) {
|
|
12437
12448
|
var getSecond = time => Math.floor(time * 100) / 100;
|
|
12438
12449
|
|
|
12450
|
+
tipsDetail.push(_objectSpread__default["default"]({
|
|
12451
|
+
text: "\u60A8\u7684\u9875\u9762\u5B58\u5728\u6027\u80FD\u95EE\u9898, \u5F53\u524D\u9875\u9762\u6E32\u67D3\u65F6\u95F4 ".concat(getSecond(renderTime / 1000), " \u79D2, \u89C4\u5B9A\u9608\u503C\u4E3A: ").concat(getSecond(loadTime / 1000), " \u79D2, \u60A8\u5DF2\u8D85\u8FC7\u3002\u8BF7\u60A8\u9488\u5BF9\u8BE5\u9875\u9762\u8FDB\u884C\u6027\u80FD\u4F18\u5316!"),
|
|
12452
|
+
closable: false,
|
|
12453
|
+
isCenter: true,
|
|
12454
|
+
tipKey: getUnionKey("render"),
|
|
12455
|
+
backgroundColor: "#F3E27D"
|
|
12456
|
+
}, loadInfoPage ? {
|
|
12457
|
+
info: {
|
|
12458
|
+
label: "建议解决思路",
|
|
12459
|
+
url: loadInfoPage
|
|
12460
|
+
}
|
|
12461
|
+
} : {}));
|
|
12462
|
+
}
|
|
12463
|
+
|
|
12464
|
+
var validDaysLeft = (_getAuth$license = getAuth().license) === null || _getAuth$license === void 0 ? void 0 : _getAuth$license.validDaysLeft;
|
|
12465
|
+
|
|
12466
|
+
if (validDaysLeft && validDaysLeft <= 15 && getAuth().isAdmin) {
|
|
12467
|
+
tipsDetail.push({
|
|
12468
|
+
text: "\u79BBLicense\u8FC7\u671F\u8FD8\u6709".concat(validDaysLeft, "\u5929"),
|
|
12469
|
+
tipKey: getUnionKey("license"),
|
|
12470
|
+
closable: true,
|
|
12471
|
+
isCenter: true,
|
|
12472
|
+
backgroundColor: "#89B5F9"
|
|
12473
|
+
});
|
|
12474
|
+
}
|
|
12475
|
+
|
|
12476
|
+
if (tipsDetail.length !== 0) {
|
|
12439
12477
|
window.dispatchEvent(new CustomEvent("app.bar.tips", {
|
|
12440
|
-
detail:
|
|
12441
|
-
text: "\u60A8\u7684\u9875\u9762\u5B58\u5728\u6027\u80FD\u95EE\u9898, \u5F53\u524D\u9875\u9762\u6E32\u67D3\u65F6\u95F4\u4E3A: ".concat(getSecond(renderTime / 1000), " \u79D2, \u89C4\u5B9A\u9608\u503C\u4E3A: ").concat(getSecond(loadTime / 1000), " \u79D2; \u60A8\u5DF2\u8D85\u8FC7, \u8BF7\u60A8\u9488\u5BF9\u8BE5\u9875\u9762\u8FDB\u884C\u6027\u80FD\u4F18\u5316!"),
|
|
12442
|
-
closeable: false
|
|
12443
|
-
}, loadInfoPage ? {
|
|
12444
|
-
info: {
|
|
12445
|
-
label: "查看详情",
|
|
12446
|
-
url: loadInfoPage
|
|
12447
|
-
}
|
|
12448
|
-
} : {})]
|
|
12478
|
+
detail: tipsDetail
|
|
12449
12479
|
}));
|
|
12450
12480
|
} // analytics page_view event
|
|
12451
12481
|
|