diff --git a/src/biz/Settings.tsx b/src/biz/Settings.tsx index 6047420..a002a9c 100644 --- a/src/biz/Settings.tsx +++ b/src/biz/Settings.tsx @@ -93,6 +93,12 @@ const Settings = () => { } return list }, []) + const apiKeySetted = useMemo(() => { + if (aiTypeValue === 'gemini') { + return !!geminiApiKeyValue + } + return !!apiKeyValue + }, [aiTypeValue, apiKeyValue, geminiApiKeyValue]) const onChangeHideOnDisableAutoTranslate = useCallback((e: any) => { setHideOnDisableAutoTranslateValue(e.target.checked) @@ -303,7 +309,7 @@ const Settings = () => {
翻译配置 - {!apiKeyValue &&
+ {!apiKeySetted &&
}
}> @@ -338,7 +344,7 @@ const Settings = () => {
总结配置 - {!apiKeyValue &&
+ {!apiKeySetted &&
}
}>