diff --git a/src/components/layout/Modal.tsx b/src/components/layout/Modal.tsx index 8ae2f58f..aa25ca7a 100644 --- a/src/components/layout/Modal.tsx +++ b/src/components/layout/Modal.tsx @@ -39,7 +39,7 @@ export function ModalCard(props: { className?: string; children?: ReactNode }) { return (
diff --git a/src/views/SettingsModal.tsx b/src/views/SettingsModal.tsx index b6ad9c19..b05ebe14 100644 --- a/src/views/SettingsModal.tsx +++ b/src/views/SettingsModal.tsx @@ -5,9 +5,9 @@ import { useSettings } from "@/state/settings"; import { useTranslation } from "react-i18next"; import { CaptionCue } from "@/video/components/actions/CaptionRendererAction"; import { Slider } from "@/video/components/popouts/CaptionSettingsPopout"; -import { appLanguageOptions } from "@/setup/i18n"; import { LangCode, captionLanguages } from "@/setup/iso6391"; import { useMemo } from "react"; +import { appLanguageOptions } from "@/setup/i18n"; export default function SettingsModal(props: { onClose: () => void; @@ -15,6 +15,8 @@ export default function SettingsModal(props: { }) { const { captionSettings, + language, + setLanguage, setCaptionLanguage, setCaptionBackgroundColor, setCaptionColor, @@ -34,106 +36,117 @@ export default function SettingsModal(props: { ).toFixed(0); return ( - -
- {t("settings.title")} -
props.onClose()} className="hover:cursor-pointer"> - -
-
-
-
- - l.id === i18n.language)! - } - setSelectedItem={(val) => { - i18n.changeLanguage(val.id); - }} - options={appLanguageOptions} - /> -
-
- - { - setCaptionLanguage(val.id as LangCode); - }} - options={captionLanguages} - /> -
-
-
-
- setCaptionFontSize(e.target.valueAsNumber)} - /> - - setCaptionBackgroundColor(e.target.valueAsNumber) - } - /> -
- -
- {colors.map((color) => ( -
setCaptionColor(color)} - > -
- -
- ))} -
+ +
+
+ {t("settings.title")} +
props.onClose()} + className="hover:cursor-pointer" + > +
-
- {selectedCaptionLanguage.id !== "none" ? ( -
- +
+
+ + l.id === language)! + } + setSelectedItem={(val) => { + i18n.changeLanguage(val.id); + setLanguage(val.id as LangCode); + }} + options={appLanguageOptions} />
- ) : null} +
+ + { + setCaptionLanguage(val.id as LangCode); + }} + options={captionLanguages} + /> +
+
+ setCaptionFontSize(e.target.valueAsNumber)} + /> + + setCaptionBackgroundColor(e.target.valueAsNumber) + } + /> +
+ +
+ {colors.map((color) => ( +
setCaptionColor(color)} + > +
+ +
+ ))} +
+
+
+
+
+
+
+ {selectedCaptionLanguage.id !== "none" ? ( +
+ +
+ ) : null} +
+