import { Info, Zap } from "lucide-react" import { useState } from "react" import { useTranslation } from "react-i18next" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" import { Separator } from "@/components/ui/separator" import { Switch } from "@/components/ui/switch" import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip" import { GpuStatus } from "@/features/video-compiler/components/gpu-status" import { useUserSettings } from "../../hooks/use-user-settings" /** * Типы прокси-серверов */ const PROXY_TYPES = ["http", "https", "socks5"] as const type ProxyType = (typeof PROXY_TYPES)[number] /** * Вкладка настроек производительности * Содержит настройки GPU ускорения и прокси-сервера */ export function PerformanceSettingsTab() { const { t } = useTranslation() const { // GPU настройки gpuAccelerationEnabled = true, preferredGpuEncoder = "auto", // Прокси настройки proxyEnabled = false, proxyType = "http", proxyHost = "", proxyPort = "", proxyUsername = "", proxyPassword = "", // Дополнительные настройки производительности maxConcurrentJobs = 2, renderQuality = "high", backgroundRenderingEnabled = true, renderDelay = 5, // Методы обновления handleGpuAccelerationChange, handlePreferredGpuEncoderChange, handleProxyEnabledChange, handleProxyTypeChange, handleProxyHostChange, handleProxyPortChange, handleProxyUsernameChange, handleProxyPasswordChange, handleMaxConcurrentJobsChange, handleRenderQualityChange, handleBackgroundRenderingChange, handleRenderDelayChange, } = useUserSettings() // Локальное состояние для управления видимостью пароля const [showPassword, setShowPassword] = useState(false) return (
{t("dialogs.userSettings.performance.backgroundRenderingDesc")}
{t("dialogs.userSettings.performance.renderDelayTooltip")}
{t("dialogs.userSettings.performance.autoProxyMediaDesc")}