pinokiod 3.240.0 → 3.241.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.
- package/package.json +1 -1
- package/server/index.js +8 -0
- package/server/views/settings.ejs +2 -2
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -3650,6 +3650,7 @@ class Server {
|
|
|
3650
3650
|
this.browser = options.browser
|
|
3651
3651
|
this.onrestart = options.onrestart
|
|
3652
3652
|
this.onquit = options.onquit
|
|
3653
|
+
this.onrefresh = options.onrefresh
|
|
3653
3654
|
}
|
|
3654
3655
|
|
|
3655
3656
|
if (this.listening) {
|
|
@@ -3680,6 +3681,13 @@ class Server {
|
|
|
3680
3681
|
|
|
3681
3682
|
// configure from kernel.store
|
|
3682
3683
|
await this.syncConfig()
|
|
3684
|
+
if (this.onrefresh) {
|
|
3685
|
+
try {
|
|
3686
|
+
this.onrefresh({ theme: this.theme, colors: this.colors })
|
|
3687
|
+
} catch (err) {
|
|
3688
|
+
console.error('[Pinokiod] onrefresh error', err)
|
|
3689
|
+
}
|
|
3690
|
+
}
|
|
3683
3691
|
|
|
3684
3692
|
try {
|
|
3685
3693
|
let _home = this.kernel.store.get("home") || process.env.PINOKIO_HOME
|
|
@@ -799,7 +799,7 @@ console.log("body", body)
|
|
|
799
799
|
if (res.success) {
|
|
800
800
|
document.querySelector(".loading").classList.add("hidden")
|
|
801
801
|
setTimeout(() => {
|
|
802
|
-
location.href = "/"
|
|
802
|
+
location.href = "/home"
|
|
803
803
|
}, 1000)
|
|
804
804
|
}
|
|
805
805
|
} catch (e) {
|
|
@@ -823,7 +823,7 @@ console.log("body", body)
|
|
|
823
823
|
if (res.success) {
|
|
824
824
|
document.querySelector(".loading").classList.add("hidden")
|
|
825
825
|
setTimeout(() => {
|
|
826
|
-
location.href = "/"
|
|
826
|
+
location.href = "/home"
|
|
827
827
|
}, 1000)
|
|
828
828
|
}
|
|
829
829
|
} catch (e) {
|