mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-07-06 18:01:22 +02:00
Add constraints on bot code editor window size
This commit is contained in:
Vendored
+13
-13
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -13,8 +13,8 @@
|
|||||||
<link rel="shortcut icon" href="/favicon.ico" />
|
<link rel="shortcut icon" href="/favicon.ico" />
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||||
<link rel="manifest" href="/site.webmanifest" />
|
<link rel="manifest" href="/site.webmanifest" />
|
||||||
<script type="module" crossorigin src="/assets/index-LNhn5rJq.js"></script>
|
<script type="module" crossorigin src="/assets/index-BtBXI4sW.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-9kq4Muxx.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DiCOP9Mw.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -10,19 +10,21 @@ interface BotCodeEditorProps {
|
|||||||
|
|
||||||
export function BotCodeEditor({ value, onChange, id }: BotCodeEditorProps) {
|
export function BotCodeEditor({ value, onChange, id }: BotCodeEditorProps) {
|
||||||
return (
|
return (
|
||||||
<CodeMirror
|
<div className="w-full overflow-hidden rounded-md border border-input">
|
||||||
value={value}
|
<CodeMirror
|
||||||
onChange={onChange}
|
value={value}
|
||||||
extensions={[python()]}
|
onChange={onChange}
|
||||||
theme={oneDark}
|
extensions={[python()]}
|
||||||
height="256px"
|
theme={oneDark}
|
||||||
basicSetup={{
|
height="256px"
|
||||||
lineNumbers: true,
|
basicSetup={{
|
||||||
foldGutter: false,
|
lineNumbers: true,
|
||||||
highlightActiveLine: true,
|
foldGutter: false,
|
||||||
}}
|
highlightActiveLine: true,
|
||||||
className="rounded-md border border-input overflow-hidden text-sm"
|
}}
|
||||||
id={id}
|
className="text-sm"
|
||||||
/>
|
id={id}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,3 +37,12 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Constrain CodeMirror editor width */
|
||||||
|
.cm-editor {
|
||||||
|
max-width: 100% !important;
|
||||||
|
contain: inline-size;
|
||||||
|
}
|
||||||
|
.cm-editor .cm-scroller {
|
||||||
|
overflow-x: auto !important;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user