diff --git a/src/features/settings/panels/PanelGeneral.tsx b/src/features/settings/panels/PanelGeneral.tsx
index b58bcac..fe2186b 100644
--- a/src/features/settings/panels/PanelGeneral.tsx
+++ b/src/features/settings/panels/PanelGeneral.tsx
@@ -21,6 +21,7 @@ export function PanelGeneral() {
const canDirectoryPicker = downloadTypes.has(BatchDownloadType.SelectDirectory);
const canStreamingZip = downloadTypes.has(BatchDownloadType.StreamZip);
const canBlobZip = downloadTypes.has(BatchDownloadType.PackZip);
+ const showBatchDownload = downloadTypes.size > 0;
const canDirectWrite = capabilities.directFsAccess;
const [hasRememberedDir, setHasRememberedDir] = useState(false);
const [pickingDirectory, setPickingDirectory] = useState(false);
@@ -71,151 +72,145 @@ export function PanelGeneral() {
通用设置
-
批量下载
-
- 点击「下载全部」时,将按下方勾选项的顺序依次尝试。若选中的模式均不可用或全部失败,会弹出提示。
-
+ {showBatchDownload && (
+ <>
+
批量下载
+
+ 点击「下载全部」时,将按下方勾选项的顺序依次尝试。若选中的模式均不可用或全部失败,会弹出提示。
+
-
-
setBatch('directoryPicker', checked)}
- />
-
-
-
setBatch('rememberDirectory', checked)}
- />
-
- {hasRememberedDir ? '已记住一个输出目录' : '尚未记住输出目录'}
-
-
-
-
- setBatch('streamingZip', checked)}
- />
-
-
+ {canDirectoryPicker && (
<>
- 在内存中生成 ZIP 后触发一次浏览器下载。兼容性最好;ZIP 需整包驻留内存,建议合计不超过约
- 500MB~1GB(视设备可用内存而定,过大可能失败或卡顿)。
+ setBatch('directoryPicker', checked)}
+ />
+
+
+
setBatch('rememberDirectory', checked)}
+ />
+
+
+ {hasRememberedDir ? '已记住一个输出目录' : '尚未记住输出目录'}
+
+
+
+
>
- ) : (
- '当前环境不支持打包 ZIP 下载。'
- )
- }
- onChange={(checked) => setBatch('blobZip', checked)}
- />
-
+ )}
-
解密后自动保存
-
- {canDirectWrite
- ? '解密完成后直接保存到本机,无需再手动下载。'
- : '当前环境无法直接保存到本机,请使用上方的批量下载。此项设置会保留,在桌面客户端中生效。'}
-
+ {canStreamingZip && (
+
setBatch('streamingZip', checked)}
+ />
+ )}
-
-
-
-
-
- {directWrite.outputMode === 'besideSource'
- ? '解密后的文件保存在加密文件旁边。'
- : '解密后的文件保存到下方指定的文件夹。'}
-
-
-
-
-
-
-
- dispatch(
- updateDirectWriteSetting({ fixedDirectoryPath: e.target.value === '' ? null : e.target.value }),
- )
- }
- />
-
+ {canBlobZip && (
+
+ 在内存中生成 ZIP 后触发一次浏览器下载。兼容性最好;ZIP 需整包驻留内存,建议合计不超过约
+ 500MB~1GB(视设备可用内存而定,过大可能失败或卡顿)。
+ >
+ }
+ onChange={(checked) => setBatch('blobZip', checked)}
+ />
+ )}
-
+ >
+ )}
-
dispatch(updateDirectWriteSetting({ deleteSourceAfterDecrypt: checked }))}
- />
-
+ {canDirectWrite && (
+ <>
+ 解密后自动保存
+ 解密完成后直接保存到本机,无需再手动下载。
+
+
+
+
+
+
+ {directWrite.outputMode === 'besideSource'
+ ? '解密后的文件保存在加密文件旁边。'
+ : '解密后的文件保存到下方指定的文件夹。'}
+
+
+
+
+
+
+
+ dispatch(
+ updateDirectWriteSetting({ fixedDirectoryPath: e.target.value === '' ? null : e.target.value }),
+ )
+ }
+ />
+
+
+
+
+
dispatch(updateDirectWriteSetting({ deleteSourceAfterDecrypt: checked }))}
+ />
+
+ >
+ )}
);
}
@@ -224,15 +219,14 @@ type BatchOptionProps = {
id: string;
checked: boolean;
disabled?: boolean;
- dimmed?: boolean;
title: string;
description: ReactNode;
onChange: (checked: boolean) => void;
};
-function BatchOption({ id, checked, disabled, dimmed, title, description, onChange }: BatchOptionProps) {
+function BatchOption({ id, checked, disabled, title, description, onChange }: BatchOptionProps) {
return (
-