mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
删除用户功能
This commit is contained in:
1 parent
441eeadaf3
commit
39ea30664d
12 files changed
+159
-23
No files matched your search
+12
-1
@@ -68,7 +68,18 @@ class SystemSettingHandler extends SystemHandler {
|
||||
if (typeof args[key] === 'object') {
|
||||
const subtasks = [];
|
||||
for (const sub in args[key]) {
|
||||
subtasks.push(system.set(`${key}.${sub}`, args[key][sub]));
|
||||
if (setting.SYSTEM_SETTINGS_BY_KEY[`${key}.${sub}`]) {
|
||||
const s = setting.SYSTEM_SETTINGS_BY_KEY[`${key}.${sub}`];
|
||||
if (s.ui === 'checkbox') {
|
||||
if (args[key][sub] === 'on') {
|
||||
subtasks.push(system.set(`${key}.${sub}`, true));
|
||||
} else {
|
||||
subtasks.push(system.set(`${key}.${sub}`, false));
|
||||
}
|
||||
} else {
|
||||
subtasks.push(system.set(`${key}.${sub}`, args[key][sub]));
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks.push(Promise.all(subtasks));
|
||||
} else tasks.push(system.set(key, args[key]));
|
||||
|
||||
Reference in new issue
Block a user