pinokiod 3.252.0 → 3.253.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server/index.js +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.252.0",
3
+ "version": "3.253.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -3240,8 +3240,13 @@ class Server {
3240
3240
  let mode = this.kernel.store.get("mode")
3241
3241
  // let drive = this.kernel.store.get("drive")
3242
3242
 
3243
+ let theme_changed = false
3244
+
3243
3245
  // 1. Handle THEME
3244
3246
  if (config.theme) {
3247
+ if (config.theme !== theme) {
3248
+ theme_changed = true
3249
+ }
3245
3250
  this.kernel.store.set("theme", config.theme)
3246
3251
  //this.theme = config.theme
3247
3252
  }
@@ -3328,6 +3333,17 @@ class Server {
3328
3333
  this.kernel.store.set("HTTPS_PROXY", config.HTTPS_PROXY)
3329
3334
  this.kernel.store.set("NO_PROXY", config.NO_PROXY)
3330
3335
 
3336
+ if (theme_changed) {
3337
+ await this.syncConfig()
3338
+ if (this.onrefresh) {
3339
+ try {
3340
+ this.onrefresh({ theme: this.theme, colors: this.colors })
3341
+ } catch (err) {
3342
+ console.error('[Pinokiod] onrefresh error', err)
3343
+ }
3344
+ }
3345
+ }
3346
+
3331
3347
  if (mode_changed) {
3332
3348
  return {
3333
3349
  title: "Restart Required",