pinokiod 2.15.40 → 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.
- package/kernel/util.js +0 -1
- package/package.json +1 -1
- package/server/index.js +20 -0
package/kernel/util.js
CHANGED
package/package.json
CHANGED
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,
|
|
@@ -1761,6 +1778,7 @@ class Server {
|
|
|
1761
1778
|
}
|
|
1762
1779
|
|
|
1763
1780
|
async syncConfig() {
|
|
1781
|
+
|
|
1764
1782
|
// 1. THEME
|
|
1765
1783
|
this.theme = this.kernel.store.get("theme") || "light"
|
|
1766
1784
|
if (this.theme === "dark") {
|
|
@@ -2018,6 +2036,8 @@ class Server {
|
|
|
2018
2036
|
await fs.promises.writeFile(path.resolve(this.homedir, "ENVIRONMENT"), str)
|
|
2019
2037
|
}
|
|
2020
2038
|
|
|
2039
|
+
|
|
2040
|
+
|
|
2021
2041
|
// let env = await Environment.get(this.kernel.homedir)
|
|
2022
2042
|
// if (env && env.PINOKIO_PORT) {
|
|
2023
2043
|
// this.port = env.PINOKIO_PORT
|