From aa098df6a59e19eab0afde97639044ff06d7c5e8 Mon Sep 17 00:00:00 2001 From: IndieKKY Date: Sat, 20 Jan 2024 13:21:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81gemini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/biz/Settings.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 &&
}
}>