This commit is contained in:
IndieKKY
2024-10-05 20:03:02 +08:00
parent b283695b02
commit d52231227e
33 changed files with 44 additions and 51 deletions

View File

@@ -1,7 +1,7 @@
import { setCurFetched, setCurInfo, setData, setInfos, setTitle, setUrl } from '@/redux/envReducer'
import { useMemo } from 'react'
import { useAppDispatch } from './redux'
import { MESSAGE_TO_APP_SET_INFOS, MESSAGE_TO_APP_SET_VIDEO_INFO } from '@/const'
import { MESSAGE_TO_APP_SET_INFOS, MESSAGE_TO_APP_SET_VIDEO_INFO } from '@/consts/const'
import useMessageService from '@/messaging/useMessageService'
const useMessagingService = () => {

View File

@@ -1,7 +1,7 @@
import {useAppDispatch, useAppSelector} from './redux'
import {useEffect, useMemo} from 'react'
import {setSearchResult, setSearchText, } from '../redux/envReducer'
import {Search} from '../util/search'
import {Search} from '../utils/search'
interface Document {
idx: number

View File

@@ -1,7 +1,7 @@
import {useAppDispatch, useAppSelector} from './redux'
import React, {useCallback} from 'react'
import {setNeedScroll, setReviewAction, setTempData} from '../redux/envReducer'
import {MESSAGE_TO_INJECT_MOVE} from '../const'
import {MESSAGE_TO_INJECT_MOVE} from '../consts/const'
import useMessage from '../messaging/useMessage'
const useSubtitle = () => {
const dispatch = useAppDispatch()

View File

@@ -16,10 +16,10 @@ import {
setTempData,
} from '../redux/envReducer'
import {EventBusContext} from '../Router'
import {EVENT_EXPAND, GEMINI_TOKENS, TOTAL_HEIGHT_MAX, TOTAL_HEIGHT_MIN, WORDS_MIN, WORDS_RATE, MESSAGE_TO_INJECT_GET_VIDEO_STATUS, MESSAGE_TO_INJECT_GET_VIDEO_ELEMENT_INFO, MESSAGE_TO_INJECT_REFRESH_VIDEO_INFO, MESSAGE_TO_INJECT_HIDE_TRANS, MESSAGE_TO_INJECT_UPDATETRANSRESULT, TOTAL_HEIGHT_DEF} from '../const'
import {EVENT_EXPAND, GEMINI_TOKENS, TOTAL_HEIGHT_MAX, TOTAL_HEIGHT_MIN, WORDS_MIN, WORDS_RATE, MESSAGE_TO_INJECT_GET_VIDEO_STATUS, MESSAGE_TO_INJECT_GET_VIDEO_ELEMENT_INFO, MESSAGE_TO_INJECT_REFRESH_VIDEO_INFO, MESSAGE_TO_INJECT_HIDE_TRANS, MESSAGE_TO_INJECT_UPDATETRANSRESULT, TOTAL_HEIGHT_DEF} from '../consts/const'
import {useAsyncEffect, useInterval} from 'ahooks'
import {getModelMaxTokens, getWholeText} from '../util/biz_util'
import {MESSAGE_TO_INJECT_GET_SUBTITLE} from '../const'
import {getModelMaxTokens, getWholeText} from '../utils/biz_util'
import {MESSAGE_TO_INJECT_GET_SUBTITLE} from '../consts/const'
import useMessage from '../messaging/useMessage'
import { injectWaiter } from '@/messaging/useMessageService'

View File

@@ -26,11 +26,11 @@ import {
SUMMARIZE_TYPES,
TRANSLATE_COOLDOWN,
TRANSLATE_FETCH_DEFAULT,
} from '../const'
} from '../consts/const'
import toast from 'react-hot-toast'
import {useMemoizedFn} from 'ahooks/es'
import {extractJsonArray, extractJsonObject, getModel} from '../util/biz_util'
import {formatTime} from '../util/util'
import {extractJsonArray, extractJsonObject, getModel} from '../utils/biz_util'
import {formatTime} from '../utils/util'
import useMessage from '@/messaging/useMessage'
const useTranslate = () => {
const dispatch = useAppDispatch()