mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
refactor(core): adjust sentry config (#10631)
This commit is contained in:
@@ -14,7 +14,6 @@ import { registerEvents } from './events';
|
||||
import { registerHandlers } from './handlers';
|
||||
import { logger } from './logger';
|
||||
import { registerProtocol } from './protocol';
|
||||
import { isOnline } from './ui';
|
||||
import { launch } from './windows-manager/launcher';
|
||||
import { launchStage } from './windows-manager/stage';
|
||||
|
||||
@@ -38,7 +37,7 @@ if (overrideSession) {
|
||||
app.setPath('sessionData', userDataPath);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
// oxlint-disable-next-line @typescript-eslint/no-var-requires
|
||||
if (require('electron-squirrel-startup')) app.quit();
|
||||
|
||||
if (process.env.SKIP_ONBOARDING) {
|
||||
@@ -97,8 +96,10 @@ if (process.env.SENTRY_RELEASE) {
|
||||
transportOptions: {
|
||||
maxAgeDays: 30,
|
||||
maxQueueSize: 100,
|
||||
shouldStore: () => !isOnline,
|
||||
shouldSend: () => isOnline,
|
||||
},
|
||||
});
|
||||
Sentry.setTags({
|
||||
distribution: 'electron',
|
||||
appVersion: app.getVersion(),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -32,8 +32,6 @@ import { getOrCreateCustomThemeWindow } from '../windows-manager/custom-theme-wi
|
||||
import { getChallengeResponse } from './challenge';
|
||||
import { uiSubjects } from './subject';
|
||||
|
||||
export let isOnline = true;
|
||||
|
||||
export const uiHandlers = {
|
||||
isMaximized: async () => {
|
||||
const window = await getMainWindow();
|
||||
@@ -75,9 +73,6 @@ export const uiHandlers = {
|
||||
const window = await getMainWindow();
|
||||
window?.hide();
|
||||
},
|
||||
handleNetworkChange: async (_, _isOnline: boolean) => {
|
||||
isOnline = _isOnline;
|
||||
},
|
||||
getChallengeResponse: async (_, challenge: string) => {
|
||||
return getChallengeResponse(challenge);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user