pinokiod 2.15.41 → 2.15.42

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 +17 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "2.15.41",
3
+ "version": "2.15.42",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -1304,6 +1304,23 @@ class Server {
1304
1304
  qr_cloudflare = await QRCode.toDataURL(this.cloudflare_pub)
1305
1305
  }
1306
1306
 
1307
+ // custom theme
1308
+ console.log(this.kernel.path('web'))
1309
+ let exists = await fse.pathExists(this.kernel.path("web"))
1310
+ console.log("Exists", exists)
1311
+ if (exists) {
1312
+ let config_exists = await fse.pathExists(this.kernel.path("web/config.json"))
1313
+ if (config_exists) {
1314
+ let config = (await this.kernel.loader.load(this.kernel.path("web/config.json"))).resolved
1315
+ if (config) {
1316
+ if (this.colors) {
1317
+ if (config.color) this.colors.color = config.color
1318
+ if (config.symbolColor) this.colors.symbolColor = config.symbolColor
1319
+ }
1320
+ }
1321
+ }
1322
+ }
1323
+
1307
1324
  res.render("index", {
1308
1325
  home_url: `http://localhost:${this.port}`,
1309
1326
  proxy: home_proxy,
@@ -2019,20 +2036,6 @@ class Server {
2019
2036
  await fs.promises.writeFile(path.resolve(this.homedir, "ENVIRONMENT"), str)
2020
2037
  }
2021
2038
 
2022
- // custom theme
2023
- console.log(this.kernel.path('web'))
2024
- let exists = await fse.pathExists(this.kernel.path("web"))
2025
- console.log("Exists", exists)
2026
- if (exists) {
2027
- let config_exists = await fse.pathExists(this.kernel.path("web/config.json"))
2028
- if (config_exists) {
2029
- let config = (await this.kernel.loader.load(this.kernel.path("web/config.json"))).resolved
2030
- if (config) {
2031
- if (config.color) this.colors.color = config.color
2032
- if (config.symbolColor) this.colors.symbolColor = config.symbolColor
2033
- }
2034
- }
2035
- }
2036
2039
 
2037
2040
 
2038
2041
  // let env = await Environment.get(this.kernel.homedir)