diff --git a/apps/desktop/src/components/ExportRecordManager.tsx b/apps/desktop/src/components/ExportRecordManager.tsx index b75f2c8..4ba281b 100644 --- a/apps/desktop/src/components/ExportRecordManager.tsx +++ b/apps/desktop/src/components/ExportRecordManager.tsx @@ -143,8 +143,32 @@ const ExportRecordManager: React.FC = ({ // 重新导出 const handleReExport = async (recordId: string) => { try { - await invoke('re_export_record', { recordId }); - await loadExportRecords(); + // 打开文件选择对话框 + const { open } = await import('@tauri-apps/plugin-dialog'); + const selected = await open({ + title: '选择导出路径', + directory: false, + multiple: false, + filters: [ + { + name: '剪映项目', + extensions: ['json'] + }, + { + name: '所有文件', + extensions: ['*'] + } + ] + }); + + if (selected) { + await invoke('re_export_record', { + recordId, + newFilePath: selected + }); + await loadExportRecords(); + console.log('重新导出成功'); + } } catch (err) { setError(`重新导出失败: ${err}`); } @@ -372,66 +396,77 @@ const ExportRecordManager: React.FC = ({ {statistics && (
{/* 总导出次数 */} -
-
-
-
-
- -
+
+
+
+

总导出次数

+

+ {statistics.total_exports} +

-
- {statistics.total_exports} +
+
-
总导出次数
{/* 成功导出 */} -
-
-
-
-
- -
+
+
+
+

成功导出

+

+ {statistics.successful_exports} +

+ {statistics.total_exports > 0 && ( +

+ {((statistics.successful_exports / statistics.total_exports) * 100).toFixed(1)}% 成功率 +

+ )}
-
- {statistics.successful_exports} +
+
-
成功导出
{/* 失败导出 */} -
-
-
-
-
- -
+
+
+
+

失败导出

+

+ {statistics.failed_exports} +

+ {statistics.total_exports > 0 && ( +

+ {((statistics.failed_exports / statistics.total_exports) * 100).toFixed(1)}% 失败率 +

+ )}
-
- {statistics.failed_exports} +
+
-
失败导出
{/* 总文件大小 */} -
-
-
-
-
- -
+
+
+
+

总文件大小

+

+ {formatFileSize(statistics.total_file_size)} +

+ {statistics.total_exports > 0 && ( +

+ 平均 {formatFileSize(statistics.total_file_size / statistics.total_exports)} +

+ )}
-
- {formatFileSize(statistics.total_file_size)} +
+
-
总文件大小