diff --git a/src/biz/Body.tsx b/src/biz/Body.tsx index 01fcb0b..2f036a5 100644 --- a/src/biz/Body.tsx +++ b/src/biz/Body.tsx @@ -368,10 +368,10 @@ const Body = () => { {/* recommend */} -
- {recommendIdx === 0 &&
+ {recommendIdx === 0 &&
{ e.preventDefault() openUrl('https://bibigpt.co/r/bilibili') @@ -380,7 +380,7 @@ const Body = () => { className='w-8 h-8'/>✨ BibiGPT ✨ 支持任意视频的网页版总结。
} - {recommendIdx === 1 &&
+ {recommendIdx === 1 &&
{ e.preventDefault() openUrl('https://chromewebstore.google.com/detail/fiaeclpicddpifeflpmlgmbjgaedladf') @@ -389,7 +389,7 @@ const Body = () => { className='w-8 h-8'/>YouTube Caption YouTube版的字幕列表。
} - {recommendIdx === 2 &&
+ {recommendIdx === 2 &&
{ e.preventDefault() openUrl('https://chromewebstore.google.com/detail/mcijpllinkhflgpkggimnafkbmpiijah') diff --git a/src/biz/Settings.tsx b/src/biz/Settings.tsx index c98d4c9..f42ba11 100644 --- a/src/biz/Settings.tsx +++ b/src/biz/Settings.tsx @@ -57,7 +57,7 @@ const FormItem = (props: { const Settings = () => { const dispatch = useAppDispatch() const envData = useAppSelector(state => state.env.envData) - const {value: autoExpandValue, onChange: setAutoExpandValue} = useEventChecked(envData.autoExpand) + // const {value: autoExpandValue, onChange: setAutoExpandValue} = useEventChecked(envData.autoExpand) // const {value: autoScrollValue, onChange: setAutoScrollValue} = useEventChecked(envData.autoScroll) const {value: translateEnableValue, onChange: setTranslateEnableValue} = useEventChecked(envData.translateEnable) const {value: summarizeEnableValue, onChange: setSummarizeEnableValue} = useEventChecked(envData.summarizeEnable) @@ -110,7 +110,7 @@ const Settings = () => { const onSave = useCallback(() => { dispatch(setEnvData({ - autoExpand: autoExpandValue, + // autoExpand: autoExpandValue, aiType: aiTypeValue, apiKey: apiKeyValue, serverUrl: serverUrlValue, @@ -134,7 +134,7 @@ const Settings = () => { })) dispatch(setPage(PAGE_MAIN)) toast.success('保存成功') - }, [dispatch, autoExpandValue, aiTypeValue, apiKeyValue, serverUrlValue, modelValue, geminiApiKeyValue, translateEnableValue, languageValue, hideOnDisableAutoTranslateValue, themeValue, transDisplayValue, summarizeEnableValue, summarizeFloatValue, summarizeLanguageValue, wordsValue, fetchAmountValue, fontSizeValue, promptsValue, searchEnabledValue, cnSearchEnabledValue, askEnabledValue]) + }, [dispatch, aiTypeValue, apiKeyValue, serverUrlValue, modelValue, geminiApiKeyValue, translateEnableValue, languageValue, hideOnDisableAutoTranslateValue, themeValue, transDisplayValue, summarizeEnableValue, summarizeFloatValue, summarizeLanguageValue, wordsValue, fetchAmountValue, fontSizeValue, promptsValue, searchEnabledValue, cnSearchEnabledValue, askEnabledValue]) const onCancel = useCallback(() => { dispatch(setPage(PAGE_MAIN)) @@ -193,10 +193,10 @@ const Settings = () => { }}>
- - - + {/* */} + {/* */} + {/* */}
diff --git a/src/hooks/useSubtitleService.ts b/src/hooks/useSubtitleService.ts index b508f64..1328288 100644 --- a/src/hooks/useSubtitleService.ts +++ b/src/hooks/useSubtitleService.ts @@ -106,13 +106,13 @@ const useSubtitleService = () => { } }, [eventBus, infos]) - // 当前未展示 & (未折叠 | 自动展开) & 有列表 => 展示第一个 + // 当前未展示 & 未折叠 & 有列表 => 展示第一个 useEffect(() => { - if (!curInfo && (!fold || (envReady && envData.autoExpand)) && (infos != null) && infos.length > 0) { + if (!curInfo && !fold && (infos != null) && infos.length > 0) { dispatch(setCurInfo(infos[0])) dispatch(setCurFetched(false)) } - }, [curInfo, dispatch, envData.autoExpand, envReady, fold, infos]) + }, [curInfo, dispatch, envReady, fold, infos]) // 获取 useEffect(() => { if (curInfo && !curFetched) { diff --git a/src/redux/envReducer.ts b/src/redux/envReducer.ts index b88f5b2..736b781 100644 --- a/src/redux/envReducer.ts +++ b/src/redux/envReducer.ts @@ -53,7 +53,7 @@ const initialState: EnvState = { serverUrl: SERVER_URL_OPENAI, translateEnable: true, summarizeEnable: true, - autoExpand: true, + // autoExpand: true, theme: 'light', searchEnabled: true, }, diff --git a/src/typings.d.ts b/src/typings.d.ts index 58d5888..9fa6505 100644 --- a/src/typings.d.ts +++ b/src/typings.d.ts @@ -1,5 +1,5 @@ interface EnvData { - autoExpand?: boolean + // autoExpand?: boolean flagDot?: boolean aiType?: 'openai' | 'gemini'