mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-12 23:33:43 +08:00
- 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
55 lines
1.2 KiB
TypeScript
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>
|
|
);
|
|
}
|