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 {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
|
root: HTMLElement
|
||||||
message: MessageInstance
|
message: MessageInstance
|
||||||
modal: HookAPI
|
modal: HookAPI
|
||||||
keyv: KeyvStorage
|
keyv: KeyvStorage
|
||||||
|
|||||||
@ -41,9 +41,7 @@ export function useAppInit() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const transparentWindow = windowStyle === 'transparent' && isMac && !minappShow
|
const transparentWindow = windowStyle === 'transparent' && isMac && !minappShow
|
||||||
window.document.body.style.background = transparentWindow
|
window.root.style.background = transparentWindow ? 'var(--navbar-background-mac)' : 'var(--navbar-background)'
|
||||||
? 'var(--navbar-background-mac)'
|
|
||||||
: 'var(--navbar-background)'
|
|
||||||
}, [windowStyle, minappShow])
|
}, [windowStyle, minappShow])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@ -32,7 +32,7 @@ const initialState: SettingsState = {
|
|||||||
messageFont: 'system',
|
messageFont: 'system',
|
||||||
showInputEstimatedTokens: false,
|
showInputEstimatedTokens: false,
|
||||||
theme: ThemeMode.light,
|
theme: ThemeMode.light,
|
||||||
windowStyle: 'opaque',
|
windowStyle: 'transparent',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
topicPosition: 'right',
|
topicPosition: 'right',
|
||||||
pasteLongTextAsFile: true,
|
pasteLongTextAsFile: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user