+
导入完成!
+
导入的用户数量: ${result.importedUsers}
+
备份时间: ${new Date(result.timestamp).toLocaleString('zh-CN')}
+
服务器版本: ${result.serverVersion || '未知版本'}
+
请刷新页面以查看最新数据。
+
+ `,
+ confirmButtonText: '刷新页面',
+ returnFocus: false,
+ });
+
+ // 清理状态
+ setSelectedFile(null);
+ setImportPassword('');
+ if (fileInputRef.current) {
+ fileInputRef.current.value = '';
+ }
+
+ // 刷新配置
+ if (onRefreshConfig) {
+ await onRefreshConfig();
+ }
+
+ // 刷新页面
+ window.location.reload();
+ } catch (error) {
+ Swal.fire({
+ icon: 'error',
+ title: '导入失败',
+ text: error instanceof Error ? error.message : '导入过程中发生错误',
+ returnFocus: false,
+ });
+ } finally {
+ setIsImporting(false);
+ }
+ };
+
+ return (
+