refactor(electron): sqlite db data workflow (remove symlink & fs watcher) (#2491)

This commit is contained in:
Peng Xiao
2023-05-29 12:53:15 +08:00
committed by GitHub
parent f3ac12254c
commit 20cf45270d
58 changed files with 1078 additions and 896 deletions

View File

@@ -3,6 +3,7 @@ import electronWindowState from 'electron-window-state';
import { join } from 'path';
import { isMacOS, isWindows } from '../../utils';
import { getExposedMeta } from './exposed';
import { logger } from './logger';
const IS_DEV: boolean =
@@ -17,6 +18,8 @@ async function createWindow() {
defaultHeight: 800,
});
const exposedMeta = getExposedMeta();
const browserWindow = new BrowserWindow({
titleBarStyle: isMacOS()
? 'hiddenInset'
@@ -40,6 +43,8 @@ async function createWindow() {
webviewTag: false, // The webview tag is not recommended. Consider alternatives like iframe or Electron's BrowserView. https://www.electronjs.org/docs/latest/api/webview-tag#warning
spellcheck: false, // FIXME: enable?
preload: join(__dirname, '../preload/index.js'),
// serialize exposed meta that to be used in preload
additionalArguments: [`--exposed-meta=` + JSON.stringify(exposedMeta)],
},
});