/* Copyright (C) 2025 QuantumNous This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ import React, { useRef } from 'react'; import { Modal, Form, Button } from '@/components/ui'; import { Filter, Calendar, Clock, User, Search, X } from 'lucide-react'; const SearchModal = ({ searchModalVisible, handleSearchConfirm, handleCloseModal, isMobile, isAdminUser, inputs, dataExportDefaultTime, timeOptions, handleInputChange, t, }) => { const formRef = useRef(); const { start_timestamp, end_timestamp, username } = inputs; // 自定义标题 const customTitle = (

{t('筛选数据')}

{t('设置查询条件以筛选数据')}

); // 自定义底部按钮 const customFooter = (
); // 表单字段包装器 - 紧凑版 const FormFieldWrapper = ({ icon: Icon, label, children, gradient }) => (
{label}
{children}
); return (
{/* 时间范围区域 */}
{t('时间范围')}
{/* 时间选择器 - 单列布局确保宽度足够 */} handleInputChange(value, 'start_timestamp')} style={{ width: '100%' }} className='[&_.ant-input-affix-wrapper]:!rounded-lg [&_.ant-input]:!text-sm' /> handleInputChange(value, 'end_timestamp')} style={{ width: '100%' }} className='[&_.ant-input-affix-wrapper]:!rounded-lg [&_.ant-input]:!text-sm' />
{/* 其他选项区域 */}
{t('查询选项')}
handleInputChange(value, 'data_export_default_time') } style={{ width: '100%' }} className='[&_.ant-select]:!rounded-lg' /> {isAdminUser && ( handleInputChange(value, 'username')} style={{ width: '100%' }} className='[&_.ant-input-affix-wrapper]:!rounded-lg' /> )}
); }; export default SearchModal;