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 +0 -1
- package/package.json +1 -1
- package/server/index.js +17 -0
package/kernel/util.js
CHANGED
package/package.json
CHANGED
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
|