You've already forked bilibili-subtitle
支持gemini
This commit is contained in:
@@ -93,6 +93,12 @@ const Settings = () => {
|
|||||||
}
|
}
|
||||||
return list
|
return list
|
||||||
}, [])
|
}, [])
|
||||||
|
const apiKeySetted = useMemo(() => {
|
||||||
|
if (aiTypeValue === 'gemini') {
|
||||||
|
return !!geminiApiKeyValue
|
||||||
|
}
|
||||||
|
return !!apiKeyValue
|
||||||
|
}, [aiTypeValue, apiKeyValue, geminiApiKeyValue])
|
||||||
|
|
||||||
const onChangeHideOnDisableAutoTranslate = useCallback((e: any) => {
|
const onChangeHideOnDisableAutoTranslate = useCallback((e: any) => {
|
||||||
setHideOnDisableAutoTranslateValue(e.target.checked)
|
setHideOnDisableAutoTranslateValue(e.target.checked)
|
||||||
@@ -303,7 +309,7 @@ const Settings = () => {
|
|||||||
|
|
||||||
<Section title={<div className='flex items-center'>
|
<Section title={<div className='flex items-center'>
|
||||||
翻译配置
|
翻译配置
|
||||||
{!apiKeyValue && <div className='tooltip tooltip-right ml-1' data-tip='未设置ApiKey无法使用'>
|
{!apiKeySetted && <div className='tooltip tooltip-right ml-1' data-tip='未设置ApiKey无法使用'>
|
||||||
<IoWarning className='text-sm text-warning'/>
|
<IoWarning className='text-sm text-warning'/>
|
||||||
</div>}
|
</div>}
|
||||||
</div>}>
|
</div>}>
|
||||||
@@ -338,7 +344,7 @@ const Settings = () => {
|
|||||||
</Section>
|
</Section>
|
||||||
<Section title={<div className='flex items-center'>
|
<Section title={<div className='flex items-center'>
|
||||||
总结配置
|
总结配置
|
||||||
{!apiKeyValue && <div className='tooltip tooltip-right ml-1' data-tip='未设置ApiKey无法使用'>
|
{!apiKeySetted && <div className='tooltip tooltip-right ml-1' data-tip='未设置ApiKey无法使用'>
|
||||||
<IoWarning className='text-sm text-warning'/>
|
<IoWarning className='text-sm text-warning'/>
|
||||||
</div>}
|
</div>}
|
||||||
</div>}>
|
</div>}>
|
||||||
|
Reference in New Issue
Block a user