mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-22 10:26:33 +02:00
enable sandbox
This commit is contained in:
@@ -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
@@ -33,16 +33,9 @@ import { store } from './features/core/settings';
|
|||||||
import { canHandleVisualizerDisplayMedia } from './features/core/visualizer';
|
import { canHandleVisualizerDisplayMedia } from './features/core/visualizer';
|
||||||
import MenuBuilder, { MenuPlaybackState } from './menu';
|
import MenuBuilder, { MenuPlaybackState } from './menu';
|
||||||
import './features';
|
import './features';
|
||||||
import {
|
import { autoUpdaterLogInterface, createLog, hotkeyToElectronAccelerator } from './utils';
|
||||||
autoUpdaterLogInterface,
|
|
||||||
createLog,
|
|
||||||
disableAutoUpdates,
|
|
||||||
hotkeyToElectronAccelerator,
|
|
||||||
isLinux,
|
|
||||||
isMacOS,
|
|
||||||
isWindows,
|
|
||||||
} from './utils';
|
|
||||||
|
|
||||||
|
import { disableAutoUpdates, isLinux, isMacOS, isWindows } from '/@/main/env';
|
||||||
import { PlayerRepeat, PlayerStatus, PlayerType, TitleTheme } from '/@/shared/types/types';
|
import { PlayerRepeat, PlayerStatus, PlayerType, TitleTheme } from '/@/shared/types/types';
|
||||||
|
|
||||||
const ALPHA_UPDATER_CONFIG: {
|
const ALPHA_UPDATER_CONFIG: {
|
||||||
@@ -518,7 +511,7 @@ async function createWindow(first = true): Promise<void> {
|
|||||||
devTools: true,
|
devTools: true,
|
||||||
nodeIntegration: false,
|
nodeIntegration: false,
|
||||||
preload: join(__dirname, '../preload/index.js'),
|
preload: join(__dirname, '../preload/index.js'),
|
||||||
sandbox: false,
|
sandbox: true,
|
||||||
webSecurity: !store.get('ignore_cors'),
|
webSecurity: !store.get('ignore_cors'),
|
||||||
},
|
},
|
||||||
width: 1440,
|
width: 1440,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ipcRenderer, IpcRendererEvent, webFrame } from 'electron';
|
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) => {
|
const openItem = async (path: string) => {
|
||||||
return ipcRenderer.invoke('open-item', path);
|
return ipcRenderer.invoke('open-item', path);
|
||||||
|
|||||||
Reference in New Issue
Block a user