fix: transparent window

This commit is contained in:
kangfenmao 2024-09-24 23:25:22 +08:00
parent 938ff38aeb
commit e8b992c289
3 changed files with 3 additions and 4 deletions

View File

@ -14,6 +14,7 @@ interface ImportMeta {
declare global {
interface Window {
root: HTMLElement
message: MessageInstance
modal: HookAPI
keyv: KeyvStorage

View File

@ -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(() => {

View File

@ -32,7 +32,7 @@ const initialState: SettingsState = {
messageFont: 'system',
showInputEstimatedTokens: false,
theme: ThemeMode.light,
windowStyle: 'opaque',
windowStyle: 'transparent',
fontSize: 14,
topicPosition: 'right',
pasteLongTextAsFile: true,