mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: removing sentry
This commit is contained in:
parent
59b1f2d5a5
commit
dc7591ee28
77 changed files with 161 additions and 7545 deletions
|
@ -1,5 +1,4 @@
|
|||
import { app, BrowserWindow, net, protocol } from "electron";
|
||||
import { init } from "@sentry/electron/main";
|
||||
import i18n from "i18next";
|
||||
import path from "node:path";
|
||||
import { electronApp, optimizer } from "@electron-toolkit/utils";
|
||||
|
@ -11,20 +10,6 @@ import { userPreferencesRepository } from "@main/repository";
|
|||
const gotTheLock = app.requestSingleInstanceLock();
|
||||
if (!gotTheLock) app.quit();
|
||||
|
||||
if (import.meta.env.MAIN_VITE_SENTRY_DSN) {
|
||||
init({
|
||||
dsn: import.meta.env.MAIN_VITE_SENTRY_DSN,
|
||||
beforeSend: async (event) => {
|
||||
const userPreferences = await userPreferencesRepository.findOne({
|
||||
where: { id: 1 },
|
||||
});
|
||||
|
||||
if (userPreferences?.telemetryEnabled) return event;
|
||||
return null;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
i18n.init({
|
||||
resources,
|
||||
lng: "en",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue