From 99d2c7f20ff95fde2a0d8dfeb6ba2fe88ff26c1f Mon Sep 17 00:00:00 2001 From: Kerwin Date: Thu, 20 Nov 2025 19:27:39 +0800 Subject: [PATCH] updat: config --- db/converter/system_config_converter.go | 10 +- web/components/SystemConfigCacheInfo.vue | 204 ++++++++++++++++++ web/pages/index.vue | 39 ++-- web/pages/r/[key].vue | 17 +- web/stores/systemConfig.ts | 255 +++++++++++++++++++++-- 5 files changed, 491 insertions(+), 34 deletions(-) create mode 100644 web/components/SystemConfigCacheInfo.vue diff --git a/db/converter/system_config_converter.go b/db/converter/system_config_converter.go index 661180a..5a5debd 100644 --- a/db/converter/system_config_converter.go +++ b/db/converter/system_config_converter.go @@ -353,10 +353,16 @@ func SystemConfigToPublicResponse(configs []entity.SystemConfig) map[string]inte response["telegram_qr_image"] = config.Value case entity.ConfigKeyQrCodeStyle: response["qr_code_style"] = config.Value - // 跳过不需要返回给公众的配置 case entity.ConfigKeyAutoProcessReadyResources: - case entity.ConfigKeyAutoProcessInterval: + if val, err := strconv.ParseBool(config.Value); err == nil { + response["auto_process_ready_resources"] = val + } case entity.ConfigKeyAutoTransferEnabled: + if val, err := strconv.ParseBool(config.Value); err == nil { + response["auto_transfer_enabled"] = val + } + // 跳过不需要返回给公众的配置 + case entity.ConfigKeyAutoProcessInterval: case entity.ConfigKeyAutoTransferLimitDays: case entity.ConfigKeyAutoTransferMinSpace: case entity.ConfigKeyAutoFetchHotDramaEnabled: diff --git a/web/components/SystemConfigCacheInfo.vue b/web/components/SystemConfigCacheInfo.vue new file mode 100644 index 0000000..65c8b93 --- /dev/null +++ b/web/components/SystemConfigCacheInfo.vue @@ -0,0 +1,204 @@ + + + + + \ No newline at end of file diff --git a/web/pages/index.vue b/web/pages/index.vue index 10a4e0f..b6c9407 100644 --- a/web/pages/index.vue +++ b/web/pages/index.vue @@ -301,25 +301,35 @@ + + +