pull/2356/head
lyswhut 2025-04-19 19:52:36 +08:00
parent 4fa6449a41
commit 5f4b4f09da
3 changed files with 5 additions and 2 deletions

View File

@ -14,6 +14,8 @@ import { openDirInExplorer } from '@common/utils/electron'
export const initGlobalData = () => {
const envParams = parseEnvParams()
envParams.cmdParams.dt = !!envParams.cmdParams.dt
global.envParams = {
cmdParams: envParams.cmdParams,
deeplink: envParams.deeplink,

View File

@ -77,6 +77,7 @@ export const createWindow = async(userApi: LX.UserApi.UserApiInfo) => {
minimizable: false,
maximizable: false,
fullscreenable: false,
roundedCorners: false,
hasShadow: false,
show: false,
webPreferences: {

View File

@ -87,7 +87,7 @@ export const createWindow = () => {
resizable: false,
maximizable: false,
fullscreenable: true,
roundedCorners: false,
roundedCorners: global.envParams.cmdParams.dt,
show: false,
webPreferences: {
session: ses,
@ -109,7 +109,7 @@ export const createWindow = () => {
browserWindow = new BrowserWindow(options)
const winURL = process.env.NODE_ENV !== 'production' ? 'http://localhost:9080' : `file://${path.join(encodePath(__dirname), 'index.html')}`
void browserWindow.loadURL(winURL + `?os=${getPlatform()}&dt=${!!global.envParams.cmdParams.dt}&dark=${shouldUseDarkColors}&theme=${encodeURIComponent(JSON.stringify(theme))}`)
void browserWindow.loadURL(winURL + `?os=${getPlatform()}&dt=${global.envParams.cmdParams.dt}&dark=${shouldUseDarkColors}&theme=${encodeURIComponent(JSON.stringify(theme))}`)
winEvent()