add settings

This commit is contained in:
微凉
2021-11-12 22:56:30 +08:00
parent 2c675ae909
commit e902c2ded7
4 changed files with 35 additions and 10 deletions

View File

@ -189,6 +189,22 @@ func initSettings() {
Type: "select",
Values: "default,github,vuepress",
},
{
Key: "autoplay video",
Value: "true",
Type: "bool",
},
{
Key: "autoplay audio",
Value: "true",
Type: "bool",
},
{
Key: "check parent folder",
Value: "true",
Type: "bool",
Description: "check parent folder password",
},
}
for _, v := range settings {
_, err := model.GetSettingByKey(v.Key)
@ -199,8 +215,5 @@ func initSettings() {
}
}
}
textTypes, err := model.GetSettingByKey("text types")
if err == nil {
conf.TextTypes = strings.Split(textTypes.Value, ",")
}
model.LoadSettings()
}