diff --git a/web/public/logo.png b/web/public/logo.png index 6811977..ab91e86 100644 Binary files a/web/public/logo.png and b/web/public/logo.png differ diff --git a/web/public/logo-white.png b/web/public/running-sas-white.png similarity index 100% rename from web/public/logo-white.png rename to web/public/running-sas-white.png diff --git a/web/public/running-sas.png b/web/public/running-sas.png new file mode 100644 index 0000000..6811977 Binary files /dev/null and b/web/public/running-sas.png differ diff --git a/web/src/components/header.tsx b/web/src/components/header.tsx index d536b7e..3c514d8 100644 --- a/web/src/components/header.tsx +++ b/web/src/components/header.tsx @@ -28,10 +28,10 @@ const Header = (props: any) => { > logo ({ '&.Mui-selected': { color: 'black' } + }, + subMenu: { + marginTop: '25px', + display: 'flex', + justifyContent: 'center' + }, + runButton: { + display: 'flex', + alignItems: 'center', + padding: '5px 5px', + minWidth: 'unset' } })) @@ -22,8 +33,10 @@ const Studio = () => { const location = useLocation() const [fileContent, setFileContent] = useState('') const [log, setLog] = useState('') + const [ctrlPressed, setCtrlPressed] = useState(false) const [webout, setWebout] = useState('') const [tab, setTab] = React.useState('1') + const handleTabChange = (_e: any, newValue: string) => { setTab(newValue) } @@ -61,6 +74,21 @@ const Studio = () => { .catch((err) => console.log(err)) } + const handleKeyDown = (event: any) => { + if (event.ctrlKey) { + if (event.key === 'v') { + setCtrlPressed(false) + } + + if (event.key === 'Enter') runCode(getSelection() || fileContent) + if (!ctrlPressed) setCtrlPressed(true) + } + } + + const handleKeyUp = (event: any) => { + if (!event.ctrlKey && ctrlPressed) setCtrlPressed(false) + } + useEffect(() => { const content = localStorage.getItem('fileContent') ?? '' setFileContent(content) @@ -86,7 +114,11 @@ const Studio = () => { const classes = useStyles() return ( - + { - + + +
+ + + +
{/* */} { elevation={3} > { if (val) setFileContent(val) }} /> +

+ Press CTRL + ENTER to run SAS code +

- - -