From 8de9c0fac28e68a999c513a6e582a51bded4da69 Mon Sep 17 00:00:00 2001 From: dineug Date: Sun, 21 Jan 2024 14:32:14 +0900 Subject: [PATCH] fix: intellij-webview theme --- packages/erd-editor-intellij-webview/src/main.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/erd-editor-intellij-webview/src/main.ts b/packages/erd-editor-intellij-webview/src/main.ts index 9a3c288d..1cc27b44 100644 --- a/packages/erd-editor-intellij-webview/src/main.ts +++ b/packages/erd-editor-intellij-webview/src/main.ts @@ -47,9 +47,6 @@ setExportFileCallback(async (blob, options) => { ); }); -const getSystemTheme = () => - document.body.classList.contains('vscode-light') ? 'light' : 'dark'; - const handleChange = () => { dispatch( vscodeSaveValueAction({ @@ -90,8 +87,7 @@ bridge.on({ webviewUpdateTheme: ({ payload }) => { editor.setPresetTheme({ ...payload, - appearance: - payload.appearance === 'auto' ? getSystemTheme() : payload.appearance, + appearance: payload.appearance === 'auto' ? 'dark' : payload.appearance, }); }, webviewUpdateReadonly: ({ payload }) => {