feat: sync httpdns sdk/platform updates without large binaries

This commit is contained in:
robin
2026-03-04 17:59:14 +08:00
parent 853897a6f8
commit 532891fad0
700 changed files with 6096 additions and 2712 deletions

View File

@@ -7,4 +7,27 @@ Tea.context(function () {
if (!this.settings) {
this.settings = {}
}
let toBool = function (v) {
if (typeof v === "boolean") {
return v
}
if (typeof v === "number") {
return v === 1
}
if (typeof v === "string") {
let s = v.toLowerCase().trim()
return s === "1" || s === "true" || s === "on" || s === "yes" || s === "enabled"
}
return false
}
this.settings.autoRemoteStart = toBool(this.settings.autoRemoteStart)
this.settings.accessLogIsOn = toBool(this.settings.accessLogIsOn)
this.settings.isOn = toBool(this.settings.isOn)
if (!this.settings.timeZone || this.settings.timeZone.length == 0) {
this.settings.timeZone = "Asia/Shanghai"
}
})