pinokiod 2.15.40 → 2.15.41

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/kernel/util.js CHANGED
@@ -64,7 +64,6 @@ const parse_env = async (filename) => {
64
64
  const openfs = (dirPath, options) => {
65
65
  let command = '';
66
66
  const platform = os.platform()
67
- let type = (options && options.
68
67
  let mode = "view"
69
68
  if (options && options.mode) {
70
69
  mode = options.mode
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "2.15.40",
3
+ "version": "2.15.41",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -1761,6 +1761,7 @@ class Server {
1761
1761
  }
1762
1762
 
1763
1763
  async syncConfig() {
1764
+
1764
1765
  // 1. THEME
1765
1766
  this.theme = this.kernel.store.get("theme") || "light"
1766
1767
  if (this.theme === "dark") {
@@ -2018,6 +2019,22 @@ class Server {
2018
2019
  await fs.promises.writeFile(path.resolve(this.homedir, "ENVIRONMENT"), str)
2019
2020
  }
2020
2021
 
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
+
2037
+
2021
2038
  // let env = await Environment.get(this.kernel.homedir)
2022
2039
  // if (env && env.PINOKIO_PORT) {
2023
2040
  // this.port = env.PINOKIO_PORT