feat: add detail sidebar for record list page, improve token list page (#3589)

This commit is contained in:
WindSpiritSR
2025-02-16 22:01:25 +08:00
committed by GitHub
parent 26718bc4a1
commit 2a5722e45b
6 changed files with 141 additions and 53 deletions

View File

@ -22,6 +22,10 @@ export const Editor = (props) => {
height: "100%",
style: {height: "100%"},
} : {};
const fillWidth = props.fillWidth ? {
width: "100%",
style: {width: "100%"},
} : {};
let extensions = [];
switch (props.lang) {
case "javascript":
@ -37,13 +41,17 @@ export const Editor = (props) => {
case "xml":
extensions = [langs.xml()];
break;
case "json":
extensions = [langs.json()];
break;
}
return (
<CodeMirror
value={props.value}
height={props.height}
{...props}
{...fillHeight}
{...fillWidth}
readOnly={props.readOnly}
theme={props.dark ? materialDark : "light"}
extensions={extensions}