fix(editor): update theme mode for MonacoEditor to use 'light' instead of 'vs' in multiple components #5440

This commit is contained in:
Tunglies 2025-11-13 08:39:10 +08:00
parent 3db69bd816
commit d0d35da2f1
No known key found for this signature in database
GPG Key ID: B9B01B389469B3E8
5 changed files with 5 additions and 5 deletions

View File

@ -192,7 +192,7 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
>
<MonacoEditor
language={language}
theme={themeMode === "light" ? "vs" : "vs-dark"}
theme={themeMode === "light" ? "light" : "vs-dark"}
options={{
tabSize: ["yaml", "javascript", "css"].includes(language) ? 2 : 4, // 根据语言类型设置缩进大小
minimap: {

View File

@ -1092,7 +1092,7 @@ export const GroupsEditorViewer = (props: Props) => {
height="100%"
language="yaml"
value={currData}
theme={themeMode === "light" ? "vs" : "vs-dark"}
theme={themeMode === "light" ? "light" : "vs-dark"}
options={{
tabSize: 2, // 根据语言类型设置缩进大小
minimap: {

View File

@ -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: {

View File

@ -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: {

View File

@ -1040,7 +1040,7 @@ export function DnsViewer({ ref }: { ref?: Ref<DialogRef> }) {
height="100vh"
language="yaml"
value={yamlContent}
theme={themeMode === "light" ? "vs" : "vs-dark"}
theme={themeMode === "light" ? "light" : "vs-dark"}
className="flex-grow"
options={{
tabSize: 2,