mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-13 05:20:28 +08:00
fix(editor): update theme mode for MonacoEditor to use 'light' instead of 'vs' in multiple components #5440
This commit is contained in:
parent
3db69bd816
commit
d0d35da2f1
@ -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: {
|
||||
|
||||
@ -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: {
|
||||
|
||||
@ -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: {
|
||||
|
||||
@ -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: {
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user