check for light theme before enabling particles
parent
cd0b69b03f
commit
72653c1e93
|
@ -23,7 +23,7 @@ async function doPing(){
|
||||||
PNotify.notice('Connection lost with API server')
|
PNotify.notice('Connection lost with API server')
|
||||||
}
|
}
|
||||||
apiOnline = false
|
apiOnline = false
|
||||||
}, 1000)
|
}, 10000)
|
||||||
return await fetch('/ping', {
|
return await fetch('/ping', {
|
||||||
headers: {
|
headers: {
|
||||||
"token": webpass
|
"token": webpass
|
||||||
|
|
|
@ -156,9 +156,19 @@ fetch('/config/get/ui.animated_background', {
|
||||||
if (resp == "false"){
|
if (resp == "false"){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
/* particlesJS.load(@dom-id, @path-json, @callback (optional)); */
|
fetch('/config/get/ui.theme', {
|
||||||
particlesJS.load('particles-js', '/shared/main/particles.json', function() {
|
headers: {
|
||||||
console.debug('callback - particles.js config loaded')
|
"token": webpass
|
||||||
})
|
}})
|
||||||
|
.then((resp) => resp.text()) // Transform the data into text
|
||||||
|
.then(function(resp) {
|
||||||
|
if (resp == '"dark"'){
|
||||||
|
/* particlesJS.load(@dom-id, @path-json, @callback (optional)); */
|
||||||
|
particlesJS.load('particles-js', '/shared/main/particles.json', function() {
|
||||||
|
console.debug('callback - particles.js config loaded')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
Loading…
Reference in New Issue