-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
886 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,7 +73,7 @@ | |
"@typescript-eslint/eslint-plugin": "^6.12.0", | ||
"@typescript-eslint/parser": "^6.12.0", | ||
"@vitejs/plugin-react": "^4.2.1", | ||
"@vitest/ui": "^0.34.6", | ||
"@vitest/ui": "^1.6.0", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-eslint": "10.1.0", | ||
"babel-loader": "^8.1.0", | ||
|
@@ -122,7 +122,7 @@ | |
"vite-plugin-electron-renderer": "^0.12.1", | ||
"vite-plugin-environment": "^1.1.3", | ||
"vite-plugin-time-reporter": "^2.1.0", | ||
"vitest": "^0.34.6", | ||
"vitest": "^1.6.0", | ||
"webdriverio": "^4.14.0" | ||
}, | ||
"dependencies": { | ||
|
@@ -262,15 +262,15 @@ | |
}, | ||
"//remember to match this with github actions in main.yml": "", | ||
"engines": { | ||
"node": "18.16.0" | ||
"node": "20.12.2" | ||
}, | ||
"debug": { | ||
"env": { | ||
"VITE_DEV_SERVER_URL": "http://127.0.0.1:7777" | ||
} | ||
}, | ||
"volta": { | ||
"node": "18.16.0", | ||
"node": "20.12.2", | ||
"yarn": "1.22.19" | ||
}, | ||
"packageManager": "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import * as React from "react"; | ||
import { css } from "@emotion/react"; | ||
import { Folder } from "../model/Folder/Folder"; | ||
import { Project } from "../model/Project/Project"; | ||
import SyntaxHighlighter, { | ||
registerLanguage | ||
} from "react-syntax-highlighter/light"; | ||
import xmlLang from "react-syntax-highlighter/languages/hljs/xml"; | ||
import syntaxStyle from "./ImdiSyntaxStyle"; | ||
registerLanguage("xml", xmlLang); | ||
|
||
export const LametaXmlView: React.FunctionComponent<{ | ||
target: any; | ||
|
||
// note, folder will equal project if we're generating at the project level | ||
// otherwise, folder will be a session or person | ||
project: Project; | ||
|
||
folder: Folder; | ||
}> = (props) => { | ||
const [xml, setXml] = React.useState<string>(""); | ||
|
||
React.useEffect(() => { | ||
if (props.target instanceof Project) { | ||
setXml(props.project.metadataFile?.getXml(false) || ""); | ||
} | ||
}, [props.target, props.project, props.folder]); | ||
|
||
return ( | ||
<div | ||
css={css` | ||
// Enhance: the size and scrolling of this got all messed up with the switch to electron 6 | ||
// (though it could have been anything). It's currently a hack. | ||
height: 500px; | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; // <-- grow to fit available space and then... | ||
overflow: hidden; // <-- ... show scroll if too big, instead of just going off the screen. | ||
code, | ||
code * { | ||
font-family: sans-serif; | ||
white-space: pre-wrap; | ||
} | ||
pre { | ||
flex: 1; // fill space | ||
} | ||
`} | ||
> | ||
<SyntaxHighlighter | ||
language="xml" | ||
style={{ ...syntaxStyle, marginTop: 0, paddingTop: 0 }} | ||
> | ||
{xml} | ||
</SyntaxHighlighter> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.