fix: transparent window
This commit is contained in:
parent
938ff38aeb
commit
e8b992c289
1
src/renderer/src/env.d.ts
vendored
1
src/renderer/src/env.d.ts
vendored
@ -14,6 +14,7 @@ interface ImportMeta {
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
root: HTMLElement
|
||||
message: MessageInstance
|
||||
modal: HookAPI
|
||||
keyv: KeyvStorage
|
||||
|
||||
@ -41,9 +41,7 @@ export function useAppInit() {
|
||||
|
||||
useEffect(() => {
|
||||
const transparentWindow = windowStyle === 'transparent' && isMac && !minappShow
|
||||
window.document.body.style.background = transparentWindow
|
||||
? 'var(--navbar-background-mac)'
|
||||
: 'var(--navbar-background)'
|
||||
window.root.style.background = transparentWindow ? 'var(--navbar-background-mac)' : 'var(--navbar-background)'
|
||||
}, [windowStyle, minappShow])
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@ -32,7 +32,7 @@ const initialState: SettingsState = {
|
||||
messageFont: 'system',
|
||||
showInputEstimatedTokens: false,
|
||||
theme: ThemeMode.light,
|
||||
windowStyle: 'opaque',
|
||||
windowStyle: 'transparent',
|
||||
fontSize: 14,
|
||||
topicPosition: 'right',
|
||||
pasteLongTextAsFile: true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user