From 4b13230dc2d9d97f4970567fc8deea55a6b16130 Mon Sep 17 00:00:00 2001 From: IndieKKY Date: Sun, 6 Oct 2024 14:08:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CompactSegmentItem.tsx | 2 +- src/components/Header.tsx | 2 +- src/components/MoreBtn.tsx | 2 +- src/components/NormalSegmentItem.tsx | 2 +- src/components/SegmentCard.tsx | 2 +- src/hooks/useSubtitleService.ts | 2 +- src/hooks/useTranslate.ts | 2 +- src/pages/MainPage.tsx | 2 +- src/utils/{biz_util.ts => bizUtil.ts} | 0 src/utils/{pinyin_util.ts => pinyinUtil.ts} | 0 src/utils/search.ts | 2 +- 11 files changed, 9 insertions(+), 9 deletions(-) rename src/utils/{biz_util.ts => bizUtil.ts} (100%) rename src/utils/{pinyin_util.ts => pinyinUtil.ts} (100%) diff --git a/src/components/CompactSegmentItem.tsx b/src/components/CompactSegmentItem.tsx index ea0ff3c..d6c6adc 100644 --- a/src/components/CompactSegmentItem.tsx +++ b/src/components/CompactSegmentItem.tsx @@ -1,6 +1,6 @@ import React, {useMemo} from 'react' import {useAppSelector} from '../hooks/redux' -import {getDisplay, getTransText} from '../utils/biz_util' +import {getDisplay, getTransText} from '../utils/bizUtil' import classNames from 'classnames' const CompactSegmentItem = (props: { diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 86357b0..8f124e4 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -5,7 +5,7 @@ import {find, remove} from 'lodash-es' import {setCurFetched, setCurInfo, setData, setInfos, setUploadedTranscript} from '../redux/envReducer' import MoreBtn from './MoreBtn' import classNames from 'classnames' -import {parseTranscript} from '../utils/biz_util' +import {parseTranscript} from '../utils/bizUtil' const Header = (props: { foldCallback: () => void diff --git a/src/components/MoreBtn.tsx b/src/components/MoreBtn.tsx index 634a84d..d523d34 100644 --- a/src/components/MoreBtn.tsx +++ b/src/components/MoreBtn.tsx @@ -17,7 +17,7 @@ import {EVENT_EXPAND, MESSAGE_TO_INJECT_DOWNLOAD_AUDIO} from '../consts/const' import {formatSrtTime, formatTime, formatVttTime} from '../utils/util' import {downloadText, openUrl} from '@kky002/kky-util' import toast from 'react-hot-toast' -import {getSummarize} from '../utils/biz_util' +import {getSummarize} from '../utils/bizUtil' import useMessage from '../messaging/layer2/useMessaging' interface Props { placement: Placement diff --git a/src/components/NormalSegmentItem.tsx b/src/components/NormalSegmentItem.tsx index 3dd0fa5..2365ffa 100644 --- a/src/components/NormalSegmentItem.tsx +++ b/src/components/NormalSegmentItem.tsx @@ -1,7 +1,7 @@ import React, {useMemo} from 'react' import {formatTime} from '../utils/util' import {useAppSelector} from '../hooks/redux' -import {getDisplay, getTransText} from '../utils/biz_util' +import {getDisplay, getTransText} from '../utils/bizUtil' import classNames from 'classnames' const NormalSegmentItem = (props: { diff --git a/src/components/SegmentCard.tsx b/src/components/SegmentCard.tsx index 9201f17..c30ca46 100644 --- a/src/components/SegmentCard.tsx +++ b/src/components/SegmentCard.tsx @@ -7,7 +7,7 @@ import {PAGE_MAIN, PAGE_SETTINGS, SUMMARIZE_THRESHOLD, SUMMARIZE_TYPES} from '.. import useTranslate from '../hooks/useTranslate' import {BsDashSquare, BsPlusSquare, CgFileDocument, FaQuestion, GrOverview, RiFileCopy2Line} from 'react-icons/all' import toast from 'react-hot-toast' -import {getLastTime, getSummaryStr, isSummaryEmpty, parseStrTimeToSeconds} from '../utils/biz_util' +import {getLastTime, getSummaryStr, isSummaryEmpty, parseStrTimeToSeconds} from '../utils/bizUtil' import {useInViewport} from 'ahooks' import SegmentItem from './SegmentItem' import {stopPopFunc} from '../utils/util' diff --git a/src/hooks/useSubtitleService.ts b/src/hooks/useSubtitleService.ts index 7773516..7422386 100644 --- a/src/hooks/useSubtitleService.ts +++ b/src/hooks/useSubtitleService.ts @@ -18,7 +18,7 @@ import { 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 '../consts/const' import {useAsyncEffect, useInterval} from 'ahooks' -import {getModelMaxTokens, getWholeText} from '../utils/biz_util' +import {getModelMaxTokens, getWholeText} from '../utils/bizUtil' import {MESSAGE_TO_INJECT_GET_SUBTITLE} from '../consts/const' import useMessage from '../messaging/layer2/useMessaging' diff --git a/src/hooks/useTranslate.ts b/src/hooks/useTranslate.ts index 9d33a3e..b7e68fd 100644 --- a/src/hooks/useTranslate.ts +++ b/src/hooks/useTranslate.ts @@ -29,7 +29,7 @@ import { } from '../consts/const' import toast from 'react-hot-toast' import {useMemoizedFn} from 'ahooks/es' -import {extractJsonArray, extractJsonObject, getModel} from '../utils/biz_util' +import {extractJsonArray, extractJsonObject, getModel} from '../utils/bizUtil' import {formatTime} from '../utils/util' import useMessaging from '@/messaging/layer2/useMessaging' const useTranslate = () => { diff --git a/src/pages/MainPage.tsx b/src/pages/MainPage.tsx index f4cc3d1..86df2a8 100644 --- a/src/pages/MainPage.tsx +++ b/src/pages/MainPage.tsx @@ -6,7 +6,7 @@ import useSubtitleService from '../hooks/useSubtitleService' import {EVENT_EXPAND, MESSAGE_TO_INJECT_FOLD} from '../consts/const' import {EventBusContext} from '../Router' import useTranslateService from '../hooks/useTranslateService' -import {setTheme} from '../utils/biz_util' +import {setTheme} from '../utils/bizUtil' import useSearchService from '../hooks/useSearchService' import useMessage from '../messaging/layer2/useMessaging' import {setFold} from '../redux/envReducer' diff --git a/src/utils/biz_util.ts b/src/utils/bizUtil.ts similarity index 100% rename from src/utils/biz_util.ts rename to src/utils/bizUtil.ts diff --git a/src/utils/pinyin_util.ts b/src/utils/pinyinUtil.ts similarity index 100% rename from src/utils/pinyin_util.ts rename to src/utils/pinyinUtil.ts diff --git a/src/utils/search.ts b/src/utils/search.ts index 0d480ce..02b281f 100644 --- a/src/utils/search.ts +++ b/src/utils/search.ts @@ -1,6 +1,6 @@ import * as JsSearch from 'js-search' import {uniq} from 'lodash-es' -import {getWords, getWordsPinyin} from './pinyin_util' +import {getWords, getWordsPinyin} from './pinyinUtil' const tokenize = (maxLength: number, content: string, options?: SearchOptions) => { const result: string[] = []