enable sandbox

This commit is contained in:
Kendall Garner
2026-05-20 22:21:22 -07:00
parent 2befcb4e74
commit ad0a0bbba5
3 changed files with 19 additions and 11 deletions
+15
View File
@@ -0,0 +1,15 @@
export const disableAutoUpdates = () => {
return process.env['DISABLE_AUTO_UPDATES'];
};
export const isMacOS = () => {
return process.platform === 'darwin';
};
export const isWindows = () => {
return process.platform === 'win32';
};
export const isLinux = () => {
return process.platform === 'linux';
};
+3 -10
View File
@@ -33,16 +33,9 @@ import { store } from './features/core/settings';
import { canHandleVisualizerDisplayMedia } from './features/core/visualizer';
import MenuBuilder, { MenuPlaybackState } from './menu';
import './features';
import {
autoUpdaterLogInterface,
createLog,
disableAutoUpdates,
hotkeyToElectronAccelerator,
isLinux,
isMacOS,
isWindows,
} from './utils';
import { autoUpdaterLogInterface, createLog, hotkeyToElectronAccelerator } from './utils';
import { disableAutoUpdates, isLinux, isMacOS, isWindows } from '/@/main/env';
import { PlayerRepeat, PlayerStatus, PlayerType, TitleTheme } from '/@/shared/types/types';
const ALPHA_UPDATER_CONFIG: {
@@ -518,7 +511,7 @@ async function createWindow(first = true): Promise<void> {
devTools: true,
nodeIntegration: false,
preload: join(__dirname, '../preload/index.js'),
sandbox: false,
sandbox: true,
webSecurity: !store.get('ignore_cors'),
},
width: 1440,
+1 -1
View File
@@ -1,6 +1,6 @@
import { ipcRenderer, IpcRendererEvent, webFrame } from 'electron';
import { disableAutoUpdates, isLinux, isMacOS, isWindows } from '../main/utils';
import { disableAutoUpdates, isLinux, isMacOS, isWindows } from '../main/env';
const openItem = async (path: string) => {
return ipcRenderer.invoke('open-item', path);