diff --git a/public/config.js b/public/config.js index 71347049..916d9686 100644 --- a/public/config.js +++ b/public/config.js @@ -1,7 +1,7 @@ window.__CONFIG__ = { // The URL for the CORS proxy, the URL must NOT end with a slash! // If not specified, the onboarding will not allow a "default setup". The user will have to use the extension or set up a proxy themselves - VITE_CORS_PROXY_URL: "REPLACE THIS", + VITE_CORS_PROXY_URL: "https://torn-unicorn.fly.dev", // The READ API key to access TMDB VITE_TMDB_READ_API_KEY: "eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI1NzlkZWYyZDY5ZWFlNDk4ZjJiOTI4MTgyNDdjM2ViMCIsInN1YiI6IjY2MjdmMGJlNjJmMzM1MDE0YmQ4NTFmMiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.h3KpPvkiaz8uNz1bntAKqsPrxG_4UUWaY3kYME6N6m8", diff --git a/src/components/Icon.tsx b/src/components/Icon.tsx index dbbcf9a8..51bd0de6 100644 --- a/src/components/Icon.tsx +++ b/src/components/Icon.tsx @@ -65,6 +65,7 @@ export enum Icons { CIRCLE_QUESTION = "circle_question", BRUSH = "brush", UPLOAD = "upload", + WEB = "web", } export interface IconProps { @@ -136,6 +137,18 @@ const iconList: Record = { circle_question: ``, brush: ``, upload: ``, + web: ` + + + + + + + + + + + `, }; function ChromeCastButton() { diff --git a/src/components/player/atoms/Settings.tsx b/src/components/player/atoms/Settings.tsx index 9d45a559..b3eb2a59 100644 --- a/src/components/player/atoms/Settings.tsx +++ b/src/components/player/atoms/Settings.tsx @@ -18,7 +18,7 @@ import { AudioView } from "./settings/AudioView"; import { CaptionSettingsView } from "./settings/CaptionSettingsView"; import { CaptionsView } from "./settings/CaptionsView"; import { DownloadRoutes } from "./settings/Downloads"; -import { OpenSubtitlesCaptionView } from "./settings/opensubtitles"; +import { OpenSubtitlesCaptionView } from "./settings/Opensubtitles"; import { PlaybackSettingsView } from "./settings/PlaybackSettingsView"; import { QualityView } from "./settings/QualityView"; import { SettingsMenu } from "./settings/SettingsMenu"; diff --git a/src/components/player/atoms/settings/CaptionsView.tsx b/src/components/player/atoms/settings/CaptionsView.tsx index 3d669db6..eae8f8a6 100644 --- a/src/components/player/atoms/settings/CaptionsView.tsx +++ b/src/components/player/atoms/settings/CaptionsView.tsx @@ -235,8 +235,15 @@ export function CaptionsView({ id }: { id: string }) { }} onDrop={(event) => onDrop(event)} > -
+
+
- router.navigate("/captions/opensubtitles")} - selected={useSubtitleStore((s) => s.isOpenSubtitles)} - chevron - > - {t("player.menus.subtitles.OpenSubtitlesChoice")} - {content} diff --git a/src/components/player/atoms/settings/opensubtitles.tsx b/src/components/player/atoms/settings/Opensubtitles.tsx similarity index 97% rename from src/components/player/atoms/settings/opensubtitles.tsx rename to src/components/player/atoms/settings/Opensubtitles.tsx index 2fab45aa..b4dd2b1b 100644 --- a/src/components/player/atoms/settings/opensubtitles.tsx +++ b/src/components/player/atoms/settings/Opensubtitles.tsx @@ -1,11 +1,9 @@ -import classNames from "classnames"; import Fuse from "fuse.js"; import { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { useAsyncFn } from "react-use"; import { FlagIcon } from "@/components/FlagIcon"; -import { Icon, Icons } from "@/components/Icon"; import { useCaptions } from "@/components/player/hooks/useCaptions"; import { Menu } from "@/components/player/internals/ContextMenu"; import { Input } from "@/components/player/internals/ContextMenu/Input"; @@ -85,7 +83,6 @@ export function OpenSubtitlesCaptionView({ id }: { id: string }) { const { selectCaptionById } = useCaptions(); const captionList = usePlayerStore((s) => s.captionList); const getHlsCaptionList = usePlayerStore((s) => s.display?.getCaptionList); - const [dragging] = useState(false); const captions = useMemo( () => diff --git a/src/pages/Discover.tsx b/src/pages/Discover.tsx index 66e14971..f4573da4 100644 --- a/src/pages/Discover.tsx +++ b/src/pages/Discover.tsx @@ -254,13 +254,18 @@ export function Discover() { const [isHovered, setIsHovered] = useState(false); + useEffect(() => { + if (!isHovered) { + document.body.style.overflow = "auto"; + } + }, [isHovered]); + const handleMouseEnter = () => { document.body.style.overflow = "hidden"; setIsHovered(true); }; const handleMouseLeave = () => { - document.body.style.overflow = "auto"; setIsHovered(false); };