mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-20 11:13:43 +08:00
feat: Implement premium search history, add 'auto' fullscreen option, and update project version.
This commit is contained in:
@@ -11,9 +11,10 @@ interface SearchBoxProps {
|
||||
onClear?: () => void;
|
||||
initialQuery?: string;
|
||||
placeholder?: string;
|
||||
isPremium?: boolean;
|
||||
}
|
||||
|
||||
export function SearchBox({ onSearch, onClear, initialQuery = '', placeholder = '搜索电影、电视剧、综艺...' }: SearchBoxProps) {
|
||||
export function SearchBox({ onSearch, onClear, initialQuery = '', placeholder = '搜索电影、电视剧、综艺...', isPremium = false }: SearchBoxProps) {
|
||||
const [query, setQuery] = useState(initialQuery);
|
||||
const inputRef = useRef<HTMLInputElement>(null);
|
||||
|
||||
@@ -35,7 +36,7 @@ export function SearchBox({ onSearch, onClear, initialQuery = '', placeholder =
|
||||
onSearch(selectedQuery);
|
||||
// Blur the input after selecting from history
|
||||
inputRef.current?.blur();
|
||||
});
|
||||
}, isPremium);
|
||||
|
||||
// Update query when initialQuery changes
|
||||
useEffect(() => {
|
||||
|
||||
@@ -12,6 +12,7 @@ interface SearchFormProps {
|
||||
checkedSources?: number;
|
||||
totalSources?: number;
|
||||
placeholder?: string;
|
||||
isPremium?: boolean;
|
||||
}
|
||||
|
||||
export function SearchForm({
|
||||
@@ -23,6 +24,7 @@ export function SearchForm({
|
||||
checkedSources = 0,
|
||||
totalSources = 16,
|
||||
placeholder,
|
||||
isPremium = false,
|
||||
}: SearchFormProps) {
|
||||
return (
|
||||
<div className="max-w-3xl mx-auto">
|
||||
@@ -31,6 +33,7 @@ export function SearchForm({
|
||||
onClear={onClear}
|
||||
initialQuery={initialQuery}
|
||||
placeholder={placeholder}
|
||||
isPremium={isPremium}
|
||||
/>
|
||||
|
||||
{/* Loading Animation */}
|
||||
|
||||
@@ -9,8 +9,8 @@ import { Icons } from '@/components/ui/Icon';
|
||||
import type { ProxyMode } from '@/lib/store/settings-store';
|
||||
|
||||
interface PlayerSettingsProps {
|
||||
fullscreenType: 'native' | 'window';
|
||||
onFullscreenTypeChange: (type: 'native' | 'window') => void;
|
||||
fullscreenType: 'auto' | 'native' | 'window';
|
||||
onFullscreenTypeChange: (type: 'auto' | 'native' | 'window') => void;
|
||||
proxyMode: ProxyMode;
|
||||
onProxyModeChange: (mode: ProxyMode) => void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user