feat: Implement premium search history, add 'auto' fullscreen option, and update project version.

This commit is contained in:
kuekhaoyang
2026-02-16 11:10:09 +08:00
parent e04fe79355
commit d54039663a
9 changed files with 99 additions and 80 deletions
+3 -2
View File
@@ -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(() => {
+3
View File
@@ -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 */}
+2 -2
View File
@@ -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;
}