feat: support subtitle translate

This commit is contained in:
Gabe
2025-10-07 16:35:00 +08:00
parent df8c96569a
commit b2b5bef9f5
22 changed files with 971 additions and 6 deletions

10
src/hooks/Subtitle.js Normal file
View File

@@ -0,0 +1,10 @@
import { DEFAULT_SUBTITLE_SETTING } from "../config";
import { useSetting } from "./Setting";
export function useSubtitle() {
const { setting, updateChild } = useSetting();
const subtitleSetting = setting?.subtitleSetting || DEFAULT_SUBTITLE_SETTING;
const updateSubtitle = updateChild("subtitleSetting");
return { subtitleSetting, updateSubtitle };
}