parent
ff5de3625e
commit
9baf0f772e
@ -16,6 +16,8 @@ export function createMainWindow() {
|
|||||||
const theme = appConfig.get('theme') || 'light'
|
const theme = appConfig.get('theme') || 'light'
|
||||||
|
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
|
const isMac = process.platform === 'darwin'
|
||||||
|
|
||||||
const mainWindow = new BrowserWindow({
|
const mainWindow = new BrowserWindow({
|
||||||
x: mainWindowState.x,
|
x: mainWindowState.x,
|
||||||
y: mainWindowState.y,
|
y: mainWindowState.y,
|
||||||
@ -25,11 +27,12 @@ export function createMainWindow() {
|
|||||||
minHeight: 600,
|
minHeight: 600,
|
||||||
show: true,
|
show: true,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
transparent: process.platform === 'darwin',
|
transparent: isMac,
|
||||||
vibrancy: 'fullscreen-ui',
|
vibrancy: 'fullscreen-ui',
|
||||||
visualEffectState: 'active',
|
visualEffectState: 'active',
|
||||||
titleBarStyle: 'hidden',
|
titleBarStyle: 'hidden',
|
||||||
titleBarOverlay: theme === 'dark' ? titleBarOverlayDark : titleBarOverlayLight,
|
titleBarOverlay: theme === 'dark' ? titleBarOverlayDark : titleBarOverlayLight,
|
||||||
|
backgroundColor: isMac ? undefined : theme === 'dark' ? '#181818' : '#FFFFFF',
|
||||||
trafficLightPosition: { x: 8, y: 12 },
|
trafficLightPosition: { x: 8, y: 12 },
|
||||||
...(process.platform === 'linux' ? { icon } : {}),
|
...(process.platform === 'linux' ? { icon } : {}),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
|||||||
@ -1,36 +1,40 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="zh-CN">
|
<html lang="zh-CN">
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
<head>
|
||||||
<meta name="viewport" content="initial-scale=1, width=device-width" />
|
<meta charset="UTF-8" />
|
||||||
<meta
|
<meta name="viewport" content="initial-scale=1, width=device-width" />
|
||||||
http-equiv="Content-Security-Policy"
|
<meta http-equiv="Content-Security-Policy"
|
||||||
content="default-src 'self'; connect-src *; script-src 'self' *; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' *; font-src 'self' data: *; img-src 'self' data: file: *; frame-src * file:" />
|
content="default-src 'self'; connect-src *; script-src 'self' *; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' *; font-src 'self' data: *; img-src 'self' data: file: *; frame-src * file:" />
|
||||||
<style>
|
<style>
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
#spinner {
|
|
||||||
position: fixed;
|
#spinner {
|
||||||
width: 100vw;
|
position: fixed;
|
||||||
height: 100vh;
|
width: 100vw;
|
||||||
display: flex;
|
height: 100vh;
|
||||||
flex-direction: row;
|
display: flex;
|
||||||
justify-content: center;
|
flex-direction: row;
|
||||||
align-items: center;
|
justify-content: center;
|
||||||
background: rgba(255, 255, 255, 0.5);
|
align-items: center;
|
||||||
}
|
}
|
||||||
#spinner img {
|
|
||||||
width: 100px;
|
#spinner img {
|
||||||
}
|
width: 100px;
|
||||||
</style>
|
border-radius: 50px;
|
||||||
</head>
|
}
|
||||||
<body>
|
</style>
|
||||||
<div id="root"></div>
|
</head>
|
||||||
<div id="spinner">
|
|
||||||
<img src="/src/assets/images/logo/cherry-text.svg" />
|
<body>
|
||||||
</div>
|
<div id="root"></div>
|
||||||
<script type="module" src="/src/main.tsx"></script>
|
<div id="spinner">
|
||||||
</body>
|
<img src="/src/assets/images/logo.png" />
|
||||||
</html>
|
</div>
|
||||||
|
<script type="module" src="/src/main.tsx"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user