From cf65d3f3635096864b81e62ed2b45b471e774a86 Mon Sep 17 00:00:00 2001 From: dev Date: Tue, 17 Nov 2026 16:08:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(settings):=20=E7=94=9F=E4=BA=A7=E5=87=AD?= =?UTF-8?q?=E6=8D=AE=E7=BC=BA=E5=A4=B1=E8=AF=B4=E6=98=8E=E5=87=86=E7=A1=AE?= =?UTF-8?q?=E5=8C=96=EF=BC=9B=E5=AD=98=E5=82=A8=E9=A1=B5=E4=BF=9D=E7=95=99?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E6=94=B6=E8=BF=9B=E6=8A=98=E5=8F=A0=E5=B9=B6?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E6=9C=AF=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/LibraryStorageSection.tsx | 139 +++++++++++++------------- web/src/ProductionBindingsSection.tsx | 7 +- 2 files changed, 76 insertions(+), 70 deletions(-) diff --git a/web/src/LibraryStorageSection.tsx b/web/src/LibraryStorageSection.tsx index d3a78e3..1493841 100644 --- a/web/src/LibraryStorageSection.tsx +++ b/web/src/LibraryStorageSection.tsx @@ -89,78 +89,81 @@ export function LibraryStorageSection() { )} -
-

保留与依赖保护

-

- {policyConfigured - ? `策略:${[ - plan && plan.policy.keep_versions > 0 ? `保留最近 ${plan.policy.keep_versions} 个版本` : '', - plan && plan.policy.keep_days > 0 ? `保留 ${plan.policy.keep_days} 天` : '', - ] - .filter(Boolean) - .join(' + ')}` - : '策略:未设置(不生成清理候选)'} -

-

- 受保护版本 {plan?.protected.length ?? 0} 个:生产生效、每库最近封存、每次生产预备份、在飞作业引用, - 不论多久都不会进入候选。 -

- {data.versions.filter((item) => item.protected).length > 0 ? ( - - ) : null} -
- -
-

清理预览

- {policyConfigured ? ( - plan && plan.candidates.length > 0 ? ( - <> -

- 按策略可考虑清理 {plan.candidates.length} 个版本,独占字节上限{' '} - {formatBytes(plan.reclaim_preview_bytes)}(共享 blob 不会因此释放,这不是可回收空间)。 -

- + ) : null} +
- +
+

清理预览

+ {policyConfigured ? ( + plan && plan.candidates.length > 0 ? ( + <> +

+ 按策略可考虑清理 {plan.candidates.length} 个版本,独占字节上限{' '} + {formatBytes(plan.reclaim_preview_bytes)}(共享归档文件不会因此释放,这不是可回收空间)。 +

+ + + ) : ( +

按当前策略没有可清理的候选版本。

+ ) + ) : ( +

+ 保留数量与天数都未设置,按「全部保留」处理:不生成候选,也不提供默认值。 +

+ )} + {plan?.blocked.length ? ( + + ) : null} +
+ + + ) : null} diff --git a/web/src/ProductionBindingsSection.tsx b/web/src/ProductionBindingsSection.tsx index 7857d84..251d841 100644 --- a/web/src/ProductionBindingsSection.tsx +++ b/web/src/ProductionBindingsSection.tsx @@ -148,8 +148,11 @@ export function ProductionBindingsView(props: ProductionBindingsViewProps) { ) : null} {bindings && !bindings.production_connected ? (

- 生产端核对不可用:{bindings.production_message}。 - {bindings.production_base_url ? `(生产地址:${bindings.production_base_url})` : ''} + 生产端核对不可用: + {/api key file/i.test(bindings.production_message) + ? '生产 API 读取凭据未配置(不影响整库执行器;整库同步走独立数据库/索引/存储通道)' + : bindings.production_message} + 。{bindings.production_base_url ? `(生产地址:${bindings.production_base_url})` : ''}

) : null} {bindings && bindings.production_connected && bindings.production_base_url ? (