feat: sync httpdns sdk/platform updates without large binaries
This commit is contained in:
@@ -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"
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user