From 35db35e4ce2d3a7c71b6a2b7296290845e47c62b Mon Sep 17 00:00:00 2001 From: wood chen Date: Mon, 2 Jun 2025 08:20:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=89=A9=E5=B1=95=E5=90=8D?= =?UTF-8?q?=E8=A7=84=E5=88=99=E7=BC=96=E8=BE=91=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0RedirectMode=E5=AD=97=E6=AE=B5=E7=9A=84?= =?UTF-8?q?=E6=94=AF=E6=8C=81=EF=BC=8C=E7=A1=AE=E4=BF=9D=E5=9C=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E6=AD=A3=E7=A1=AE=E8=AF=BB=E5=8F=96=E5=92=8C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA302=E8=B7=B3=E8=BD=AC=E7=8A=B6=E6=80=81?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=BC=BA=E7=94=A8=E6=88=B7=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E5=8F=AF=E8=AF=BB=E6=80=A7=E5=92=8C=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E6=80=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/app/dashboard/config/page.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/web/app/dashboard/config/page.tsx b/web/app/dashboard/config/page.tsx index 54f4b2a..b2125ab 100644 --- a/web/app/dashboard/config/page.tsx +++ b/web/app/dashboard/config/page.tsx @@ -533,7 +533,7 @@ export default function ConfigPage() { }, [handleDialogOpenChange]); // 处理扩展名规则的编辑 - const handleExtensionRuleEdit = (path: string, index?: number, rule?: { Extensions: string; Target: string; SizeThreshold?: number; MaxSize?: number }) => { + const handleExtensionRuleEdit = (path: string, index?: number, rule?: { Extensions: string; Target: string; SizeThreshold?: number; MaxSize?: number; RedirectMode?: boolean }) => { setEditingPath(path); if (index !== undefined && rule) { @@ -555,7 +555,7 @@ export default function ConfigPage() { setNewExtensionRule({ extensions: rule.Extensions, target: rule.Target, - redirectMode: false, // TODO: 从rule中获取RedirectMode + redirectMode: rule.RedirectMode || false, // 正确读取RedirectMode字段 sizeThreshold: thresholdValue, maxSize: maxValue, sizeThresholdUnit: thresholdUnit, @@ -872,7 +872,14 @@ export default function ConfigPage() { className="bg-muted/30 rounded-md p-2 text-xs" >
- {rule.Extensions} +
+ {rule.Extensions} + {rule.RedirectMode && ( + + 302 + + )} +