chore: 将部分通用变量移动到utils.ts

This commit is contained in:
qier222 2022-05-13 01:47:55 +08:00
parent 78ba547138
commit 48869266e4
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
10 changed files with 24 additions and 33 deletions

View file

@ -90,7 +90,7 @@ const Linux = () => {
const TitleBar = () => {
return (
<div className='app-region-drag fixed z-30'>
{window.env?.isWin ? <Win /> : <Linux />}
{window.env?.isWindows ? <Win /> : <Linux />}
</div>
)
}

View file

@ -27,7 +27,7 @@ declare global {
isEnableTitlebar: boolean
isLinux: boolean
isMac: boolean
isWin: boolean
isWindows: boolean
}
log?: ElectronLog
}

View file

@ -1,5 +1,4 @@
import { proxy, subscribe } from 'valtio'
import { devtools } from 'valtio/utils'
import { Player } from '@/web/utils/player'
import { merge } from 'lodash-es'
import { IpcChannels } from '@/shared/IpcChannels'
@ -34,7 +33,3 @@ subscribe(player, () => {
if (import.meta.env.DEV) {
;(window as any).player = player
}
// Devtools
devtools(state, 'state')
devtools(player, 'player')