Merge branch 'main' into teste-locale2

This commit is contained in:
Zamitto
2024-05-29 22:25:46 -03:00
committed by GitHub
134 changed files with 2440 additions and 2549 deletions

View File

@@ -5,6 +5,7 @@ import { TextField, Button, CheckboxField, Select } from "@renderer/components";
import { useTranslation } from "react-i18next";
import * as styles from "./settings-general.css";
import type { UserPreferences } from "@types";
import { useAppSelector } from "@renderer/hooks";
import { changeLanguage } from "i18next";
import * as languageResources from "@locales";
@@ -15,16 +16,18 @@ interface LanguageOption {
}
export interface SettingsGeneralProps {
userPreferences: UserPreferences | null;
updateUserPreferences: (values: Partial<UserPreferences>) => void;
}
export function SettingsGeneral({
userPreferences,
updateUserPreferences,
}: SettingsGeneralProps) {
const { t } = useTranslation("settings");
const userPreferences = useAppSelector(
(state) => state.userPreferences.value
);
const [form, setForm] = useState({
downloadsPath: "",
downloadNotificationsEnabled: false,