mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-21 18:13:55 +00:00
feat: removing sentry
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user