refactor: rename 'yacd' to 'enable_yacd'

This commit is contained in:
Andrey Petelin
2025-10-10 19:29:16 +05:00
committed by divocat
parent 036808917d
commit 1e6b555bfa
2 changed files with 4 additions and 4 deletions

View File

@@ -167,7 +167,7 @@ function createSettingsContent(section) {
o = section.option(
form.Flag,
'yacd',
'enable_yacd',
_('Enable YACD'),
`<a href="${main.getClashApiUrl()}/ui" target="_blank">${main.getClashApiUrl()}/ui</a>`,
);

View File

@@ -1050,10 +1050,10 @@ sing_box_configure_experimental() {
config_get cache_file "settings" "cache_path" "/tmp/sing-box/cache.db"
config=$(sing_box_cm_configure_cache_file "$config" true "$cache_file" true)
local yacd_enabled external_controller_ui
config_get_bool yacd_enabled "settings" "yacd" 0
local enable_yacd external_controller_ui
config_get_bool enable_yacd "settings" "enable_yacd" 0
log "Configuring Clash API"
if [ "$yacd_enabled" -eq 1 ]; then
if [ "$enable_yacd" -eq 1 ]; then
log "YACD is enabled, enabling Clash API with downloadable YACD" "debug"
local external_controller_ui="ui"
config=$(sing_box_cm_configure_clash_api "$config" "$SB_CLASH_API_CONTROLLER" "$external_controller_ui")