Merge branch 'main' into hyd-226-investigate-if-its-possible-to-use-psutil-to-list-processes

This commit is contained in:
Zamitto 2024-07-03 16:20:55 -03:00
commit d2e3d48ef8
3 changed files with 14 additions and 4 deletions

View File

@ -1,9 +1,9 @@
{
"app": {
"successfully_signed_in": "Logado com sucesso"
"successfully_signed_in": "Autenticado com sucesso"
},
"home": {
"featured": "Destaque",
"featured": "Destaques",
"trending": "Populares",
"surprise_me": "Surpreenda-me",
"no_results": "Nenhum resultado encontrado"

View File

@ -2,17 +2,23 @@ import { userPreferencesRepository } from "@main/repository";
import { registerEvent } from "../register-event";
import type { UserPreferences } from "@types";
import i18next from "i18next";
const updateUserPreferences = async (
_event: Electron.IpcMainInvokeEvent,
preferences: Partial<UserPreferences>
) =>
userPreferencesRepository.upsert(
) => {
if (preferences.language) {
i18next.changeLanguage(preferences.language);
}
return userPreferencesRepository.upsert(
{
id: 1,
...preferences,
},
["id"]
);
};
registerEvent("updateUserPreferences", updateUserPreferences);

View File

@ -72,6 +72,10 @@ app.whenReady().then(async () => {
where: { id: 1 },
});
if (userPreferences?.language) {
i18n.changeLanguage(userPreferences.language);
}
WindowManager.createMainWindow();
WindowManager.createSystemTray(userPreferences?.language || "en");
});