feat(settings): add Ollama connection status check setting

- Add new setting to enable/disable Ollama connection status check
- Update translations for the new setting across all supported languages
This commit is contained in:
n4ze3m
2024-11-17 12:26:14 +05:30
parent ca26e059eb
commit 92013f3bfc
36 changed files with 148 additions and 59 deletions

View File

@@ -16,13 +16,12 @@ import {
import { useStorage } from "@plasmohq/storage/hook"
export const GeneralSettings = () => {
const { clearChat } =
useMessageOption()
const { clearChat } = useMessageOption()
const [ speechToTextLanguage, setSpeechToTextLanguage ] = useStorage(
"speechToTextLanguage",
"en-US"
)
const [speechToTextLanguage, setSpeechToTextLanguage] = useStorage(
"speechToTextLanguage",
"en-US"
)
const [copilotResumeLastChat, setCopilotResumeLastChat] = useStorage(
"copilotResumeLastChat",
false
@@ -41,6 +40,11 @@ export const GeneralSettings = () => {
const [sendNotificationAfterIndexing, setSendNotificationAfterIndexing] =
useStorage("sendNotificationAfterIndexing", false)
const [checkOllamaStatus, setCheckOllamaStatus] = useStorage(
"checkOllamaStatus",
true
)
const queryClient = useQueryClient()
const { mode, toggleDarkMode } = useDarkMode()
@@ -160,6 +164,19 @@ export const GeneralSettings = () => {
/>
</div>
<div className="flex flex-row justify-between">
<div className="inline-flex items-center gap-2">
<span className="text-gray-700 dark:text-neutral-50">
{t("generalSettings.settings.ollamaStatus.label")}
</span>
</div>
<Switch
checked={checkOllamaStatus}
onChange={(checked) => setCheckOllamaStatus(checked)}
/>
</div>
<div className="flex flex-row justify-between">
<span className="text-gray-700 dark:text-neutral-50 ">
{t("generalSettings.settings.darkMode.label")}