You've already forked bilibili-subtitle
fix
This commit is contained in:
@@ -17,9 +17,6 @@ import {
|
|||||||
TRANSLATE_FETCH_MIN,
|
TRANSLATE_FETCH_MIN,
|
||||||
TRANSLATE_FETCH_STEP,
|
TRANSLATE_FETCH_STEP,
|
||||||
WORDS_DEFAULT,
|
WORDS_DEFAULT,
|
||||||
WORDS_MAX,
|
|
||||||
WORDS_MIN,
|
|
||||||
WORDS_STEP
|
|
||||||
} from '../const'
|
} from '../const'
|
||||||
import {IoWarning} from 'react-icons/all'
|
import {IoWarning} from 'react-icons/all'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
@@ -78,13 +75,13 @@ const Settings = () => {
|
|||||||
const fold = useAppSelector(state => state.env.fold)
|
const fold = useAppSelector(state => state.env.fold)
|
||||||
const totalHeight = useAppSelector(state => state.env.totalHeight)
|
const totalHeight = useAppSelector(state => state.env.totalHeight)
|
||||||
const [promptsValue, setPromptsValue] = useState<{[key: string]: string}>(envData.prompts??{})
|
const [promptsValue, setPromptsValue] = useState<{[key: string]: string}>(envData.prompts??{})
|
||||||
const wordsList = useMemo(() => {
|
// const wordsList = useMemo(() => {
|
||||||
const list = []
|
// const list = []
|
||||||
for (let i = WORDS_MIN; i <= WORDS_MAX; i += WORDS_STEP) {
|
// for (let i = WORDS_MIN; i <= WORDS_MAX; i += WORDS_STEP) {
|
||||||
list.push(i)
|
// list.push(i)
|
||||||
}
|
// }
|
||||||
return list
|
// return list
|
||||||
}, [])
|
// }, [])
|
||||||
const transFetchAmountList = useMemo(() => {
|
const transFetchAmountList = useMemo(() => {
|
||||||
const list = []
|
const list = []
|
||||||
for (let i = TRANSLATE_FETCH_MIN; i <= TRANSLATE_FETCH_MAX; i += TRANSLATE_FETCH_STEP) {
|
for (let i = TRANSLATE_FETCH_MIN; i <= TRANSLATE_FETCH_MAX; i += TRANSLATE_FETCH_STEP) {
|
||||||
|
@@ -143,8 +143,8 @@ export const HEADER_HEIGHT = 44
|
|||||||
export const TITLE_HEIGHT = 24
|
export const TITLE_HEIGHT = 24
|
||||||
|
|
||||||
export const WORDS_DEFAULT = import.meta.env.VITE_ENV === 'web-dev'?500:2000
|
export const WORDS_DEFAULT = import.meta.env.VITE_ENV === 'web-dev'?500:2000
|
||||||
export const WORDS_MIN = 1000
|
export const WORDS_MIN = 500
|
||||||
export const WORDS_MAX = 3000
|
export const WORDS_MAX = 16000
|
||||||
export const WORDS_STEP = 500
|
export const WORDS_STEP = 500
|
||||||
export const SUMMARIZE_THRESHOLD = 100
|
export const SUMMARIZE_THRESHOLD = 100
|
||||||
export const SUMMARIZE_LANGUAGE_DEFAULT = 'cn'
|
export const SUMMARIZE_LANGUAGE_DEFAULT = 'cn'
|
||||||
|
Reference in New Issue
Block a user