zova-module-a-style 5.0.27 → 5.0.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-module-a-style",
3
- "version": "5.0.27",
3
+ "version": "5.0.28",
4
4
  "title": "a-style",
5
5
  "zovaModule": {
6
6
  "capabilities": {
@@ -37,5 +37,5 @@
37
37
  "tsc:publish": "npm run clean && tsc -b",
38
38
  "prepublishOnly": "npm run tsc:publish"
39
39
  },
40
- "gitHead": "e7d4e08972de87d39a406ca5f903a608c7e5e492"
40
+ "gitHead": "f810d92f5bb294d7f1dedb7ab0b7c6f5173cfedf"
41
41
  }
@@ -22,8 +22,8 @@ export class BeanTheme extends BeanModelBase<ScopeModule> {
22
22
 
23
23
  protected async __init__() {
24
24
  // support admin
25
- const useQueryMethod = this.app.config.ssr.cookieThemeName ? '$useQueryCookie' : '$useQueryLocal';
26
- this.name = this[useQueryMethod]({
25
+ const useQueryMethodThemeName = this.app.config.ssr.cookieThemeName ? '$useQueryCookie' : '$useQueryLocal';
26
+ this.name = this[useQueryMethodThemeName]({
27
27
  queryKey: ['themename'],
28
28
  meta: {
29
29
  persister: {
@@ -32,10 +32,14 @@ export class BeanTheme extends BeanModelBase<ScopeModule> {
32
32
  defaultData: this.scope.config.defaultTheme,
33
33
  },
34
34
  });
35
- this.darkMode = this.$useQueryLocal({
35
+ const useQueryMethodThemeDark = this.app.config.ssr.cookieThemeDark ? '$useQueryCookie' : '$useQueryLocal';
36
+ this.darkMode = this[useQueryMethodThemeDark]({
36
37
  queryKey: ['themedark'],
37
38
  meta: {
38
- defaultData: 'auto',
39
+ persister: {
40
+ maxAge: this.scope.config.model.themename.persister.maxAge,
41
+ },
42
+ defaultData: this.app.config.ssr.cookieThemeDark ? true : 'auto',
39
43
  },
40
44
  });
41
45
  this._updateDark();