Files
kuekhaoyang 3564ce1ede chore: update package versions and add user config sync API
- Bump version to 4.8.0 and update dependencies in package.json
- Implement user config sync API for cross-device settings persistence
- Add resolution badge auto-hide hook for improved user experience
- Create useConfigSync hook to manage user settings synchronization with the server
2026-03-18 12:44:05 +08:00

55 lines
1.2 KiB
TypeScript

'use client';
import { SearchLoadingAnimation } from '@/components/SearchLoadingAnimation';
import { SearchBox } from './SearchBox';
interface SearchFormProps {
onSearch: (query: string) => void;
onClear?: () => void;
onCancelSearch?: () => void;
isLoading: boolean;
initialQuery?: string;
currentSource?: string;
checkedSources?: number;
totalSources?: number;
placeholder?: string;
isPremium?: boolean;
}
export function SearchForm({
onSearch,
onClear,
onCancelSearch,
isLoading,
initialQuery = '',
currentSource = '',
checkedSources = 0,
totalSources = 16,
placeholder,
isPremium = false,
}: SearchFormProps) {
return (
<div className="max-w-3xl mx-auto">
<SearchBox
onSearch={onSearch}
onClear={onClear}
initialQuery={initialQuery}
placeholder={placeholder}
isPremium={isPremium}
/>
{/* Loading Animation */}
{isLoading && (
<div className="mt-4">
<SearchLoadingAnimation
currentSource={currentSource}
checkedSources={checkedSources}
totalSources={totalSources}
onCancel={onCancelSearch}
/>
</div>
)}
</div>
);
}