mirror of
https://github.com/p-stream/p-stream.git
synced 2026-05-08 14:30:13 +00:00
remove captions search bar
This commit is contained in:
parent
5a2160cf49
commit
862df50885
1 changed files with 2 additions and 9 deletions
|
|
@ -11,7 +11,6 @@ import { FlagIcon } from "@/components/FlagIcon";
|
||||||
import { Icon, Icons } from "@/components/Icon";
|
import { Icon, Icons } from "@/components/Icon";
|
||||||
import { useCaptions } from "@/components/player/hooks/useCaptions";
|
import { useCaptions } from "@/components/player/hooks/useCaptions";
|
||||||
import { Menu } from "@/components/player/internals/ContextMenu";
|
import { Menu } from "@/components/player/internals/ContextMenu";
|
||||||
import { Input } from "@/components/player/internals/ContextMenu/Input";
|
|
||||||
import { SelectableLink } from "@/components/player/internals/ContextMenu/Links";
|
import { SelectableLink } from "@/components/player/internals/ContextMenu/Links";
|
||||||
import {
|
import {
|
||||||
captionIsVisible,
|
captionIsVisible,
|
||||||
|
|
@ -311,7 +310,6 @@ export function CaptionsView({
|
||||||
const { disable, selectCaptionById } = useCaptions();
|
const { disable, selectCaptionById } = useCaptions();
|
||||||
const [dragging, setDragging] = useState(false);
|
const [dragging, setDragging] = useState(false);
|
||||||
const setCaption = usePlayerStore((s) => s.setCaption);
|
const setCaption = usePlayerStore((s) => s.setCaption);
|
||||||
const [searchQuery, setSearchQuery] = useState("");
|
|
||||||
const [currentlyDownloading, setCurrentlyDownloading] = useState<
|
const [currentlyDownloading, setCurrentlyDownloading] = useState<
|
||||||
string | null
|
string | null
|
||||||
>(null);
|
>(null);
|
||||||
|
|
@ -343,8 +341,8 @@ export function CaptionsView({
|
||||||
);
|
);
|
||||||
|
|
||||||
// Filter lists based on search query
|
// Filter lists based on search query
|
||||||
const sourceList = useSubtitleList(sourceCaptions, searchQuery);
|
const sourceList = useSubtitleList(sourceCaptions, "");
|
||||||
const externalList = useSubtitleList(externalCaptions, searchQuery);
|
const externalList = useSubtitleList(externalCaptions, "");
|
||||||
|
|
||||||
// Get current subtitle text preview
|
// Get current subtitle text preview
|
||||||
const currentSubtitleText = useMemo(() => {
|
const currentSubtitleText = useMemo(() => {
|
||||||
|
|
@ -552,11 +550,6 @@ export function CaptionsView({
|
||||||
|
|
||||||
<div className="h-1" />
|
<div className="h-1" />
|
||||||
|
|
||||||
{/* Search input */}
|
|
||||||
{(sourceCaptions.length || externalCaptions.length) > 0 && (
|
|
||||||
<Input value={searchQuery} onInput={setSearchQuery} />
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* No subtitles available message */}
|
{/* No subtitles available message */}
|
||||||
{!isLoadingExternalSubtitles &&
|
{!isLoadingExternalSubtitles &&
|
||||||
sourceCaptions.length === 0 &&
|
sourceCaptions.length === 0 &&
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue