@next-core/brick-kit 2.101.1 → 2.101.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.101.2](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.101.1...@next-core/brick-kit@2.101.2) (2022-01-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * dark theme refine ([db6d4e5](https://github.com/easyops-cn/next-core/commit/db6d4e58c98779329e9dad99ee0fcde22631e44b))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [2.101.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.101.0...@next-core/brick-kit@2.101.1) (2022-01-05)
7
18
 
8
19
 
@@ -1527,6 +1527,11 @@
1527
1527
  return {
1528
1528
  check: collectCoverage ? fakeCheckPermissions : checkPermissions
1529
1529
  };
1530
+
1531
+ case "THEME":
1532
+ return {
1533
+ getTheme: collectCoverage ? () => "light" : getTheme
1534
+ };
1530
1535
  }
1531
1536
  }
1532
1537
 
@@ -1903,11 +1908,6 @@
1903
1908
  getUrl: getUrlBySegueFactory(app, segues)
1904
1909
  };
1905
1910
 
1906
- case "THEME":
1907
- return {
1908
- getTheme
1909
- };
1910
-
1911
1911
  case "SESSION_STORAGE":
1912
1912
  return {
1913
1913
  getItem: getItemFactory("session")
@@ -10279,7 +10279,7 @@
10279
10279
  var _this3 = this;
10280
10280
 
10281
10281
  return _asyncToGenerator__default["default"](function* () {
10282
- var _apiAnalyzer$getInsta;
10282
+ var _apiAnalyzer$getInsta, _currentApp$theme;
10283
10283
 
10284
10284
  _this3.state = "initial";
10285
10285
  _this3.renderId = lodash.uniqueId("render-id-");
@@ -10330,6 +10330,8 @@
10330
10330
  var legacy = currentApp ? currentApp.legacy : undefined;
10331
10331
  _this3.kernel.nextApp = currentApp;
10332
10332
  var layoutType = (currentApp === null || currentApp === void 0 ? void 0 : currentApp.layoutType) || "console";
10333
+ setTheme((_currentApp$theme = currentApp === null || currentApp === void 0 ? void 0 : currentApp.theme) !== null && _currentApp$theme !== void 0 ? _currentApp$theme : "light");
10334
+ setMode("default");
10333
10335
  devtoolsHookEmit("rendering");
10334
10336
  unmountTree(mountPoints.bg);
10335
10337
 
@@ -10340,7 +10342,7 @@
10340
10342
  };
10341
10343
 
10342
10344
  if (storyboard) {
10343
- var _currentApp$breadcrum, _currentApp$breadcrum2, _currentApp$theme;
10345
+ var _currentApp$breadcrum, _currentApp$breadcrum2;
10344
10346
 
10345
10347
  if (appChanged && currentApp.id && isLoggedIn()) {
10346
10348
  var usedCustomApis = brickUtils.mapCustomApisToNameAndNamespace(brickUtils.scanCustomApisInStoryboard(storyboard));
@@ -10437,10 +10439,8 @@
10437
10439
  _this3.kernel.unsetBars({
10438
10440
  appChanged,
10439
10441
  legacy: actualLegacy
10440
- });
10442
+ }); // There is a window to set theme and mode by `lifeCycle.onBeforePageLoad`.
10441
10443
 
10442
- setTheme((_currentApp$theme = currentApp.theme) !== null && _currentApp$theme !== void 0 ? _currentApp$theme : "light");
10443
- setMode("default"); // There is a window to set theme and mode by `lifeCycle.onBeforePageLoad`.
10444
10444
 
10445
10445
  _this3.locationContext.handleBeforePageLoad();
10446
10446