从webpack迁移到vite

This commit is contained in:
lyswhut
2023-08-07 18:49:14 +08:00
parent 31e16a7ed7
commit 028bf5919d
166 changed files with 3071 additions and 11869 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import { Tray, Menu, nativeImage } from 'electron'
import { isWin } from '@common/utils'
import { join } from 'path'
import path from 'node:path'
import {
hideWindow as hideMainWindow,
isExistWindow as isExistMainWindow,
@@ -45,7 +45,7 @@ export const createTray = () => {
themeId = global.lx.appSetting['tray.themeId']
let theme = themeList.find(item => item.id === themeId) ?? themeList[0]
const iconPath = join(global.staticPath, 'images/tray', theme.fileName + '.png')
const iconPath = path.join(global.staticPath, 'images/tray', theme.fileName + '.png')
// 托盘
tray = new Tray(nativeImage.createFromPath(iconPath))
@@ -140,7 +140,7 @@ export const createMenu = () => {
export const setTrayImage = (themeId: number) => {
if (!tray) return
let theme = themeList.find(item => item.id === themeId) ?? themeList[0]
const iconPath = join(global.staticPath, 'images/tray', theme.fileName + '.png')
const iconPath = path.join(global.staticPath, 'images/tray', theme.fileName + '.png')
tray.setImage(nativeImage.createFromPath(iconPath))
}