From d0d35da2f16a076b0b2bae6bcc71728c79222d30 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Thu, 13 Nov 2025 08:39:10 +0800 Subject: [PATCH] fix(editor): update theme mode for MonacoEditor to use 'light' instead of 'vs' in multiple components #5440 --- src/components/profile/editor-viewer.tsx | 2 +- src/components/profile/groups-editor-viewer.tsx | 2 +- src/components/profile/proxies-editor-viewer.tsx | 2 +- src/components/profile/rules-editor-viewer.tsx | 2 +- src/components/setting/mods/dns-viewer.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/profile/editor-viewer.tsx b/src/components/profile/editor-viewer.tsx index bc95531cc..186815ed1 100644 --- a/src/components/profile/editor-viewer.tsx +++ b/src/components/profile/editor-viewer.tsx @@ -192,7 +192,7 @@ export const EditorViewer = (props: Props) => { > { height="100%" language="yaml" value={currData} - theme={themeMode === "light" ? "vs" : "vs-dark"} + theme={themeMode === "light" ? "light" : "vs-dark"} options={{ tabSize: 2, // 根据语言类型设置缩进大小 minimap: { diff --git a/src/components/profile/proxies-editor-viewer.tsx b/src/components/profile/proxies-editor-viewer.tsx index 61811e49a..e8d4fe3b4 100644 --- a/src/components/profile/proxies-editor-viewer.tsx +++ b/src/components/profile/proxies-editor-viewer.tsx @@ -473,7 +473,7 @@ export const ProxiesEditorViewer = (props: Props) => { height="100%" language="yaml" value={currData} - theme={themeMode === "light" ? "vs" : "vs-dark"} + theme={themeMode === "light" ? "light" : "vs-dark"} options={{ tabSize: 2, // 根据语言类型设置缩进大小 minimap: { diff --git a/src/components/profile/rules-editor-viewer.tsx b/src/components/profile/rules-editor-viewer.tsx index 10524e977..9ece10982 100644 --- a/src/components/profile/rules-editor-viewer.tsx +++ b/src/components/profile/rules-editor-viewer.tsx @@ -789,7 +789,7 @@ export const RulesEditorViewer = (props: Props) => { height="100%" language="yaml" value={currData} - theme={themeMode === "light" ? "vs" : "vs-dark"} + theme={themeMode === "light" ? "light" : "vs-dark"} options={{ tabSize: 2, // 根据语言类型设置缩进大小 minimap: { diff --git a/src/components/setting/mods/dns-viewer.tsx b/src/components/setting/mods/dns-viewer.tsx index 41a227b4a..0b0f520d2 100644 --- a/src/components/setting/mods/dns-viewer.tsx +++ b/src/components/setting/mods/dns-viewer.tsx @@ -1040,7 +1040,7 @@ export function DnsViewer({ ref }: { ref?: Ref }) { height="100vh" language="yaml" value={yamlContent} - theme={themeMode === "light" ? "vs" : "vs-dark"} + theme={themeMode === "light" ? "light" : "vs-dark"} className="flex-grow" options={{ tabSize: 2,