Skip to content

Commit 56e535e

Browse files
authored
Merge pull request #239 from ControlCore-Project/dev
Merge the recent fixes since March 31st
2 parents 626524b + 0bf9eb4 commit 56e535e

8 files changed

Lines changed: 5682 additions & 10406 deletions

File tree

package-lock.json

Lines changed: 5622 additions & 10377 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"hotkeys-js": "^3.8.7",
2020
"jquery": "^3.0.0",
2121
"konva": "^7.0.3",
22+
"lucide-react": "^0.487.0",
2223
"md5": "^2.3.0",
2324
"moment": "^2.29.4",
2425
"prismjs": "^1.30.0",
@@ -31,7 +32,7 @@
3132
"react-keyed-file-browser": "^1.14.0",
3233
"react-markdown": "^8.0.7",
3334
"react-modal": "^3.16.3",
34-
"react-scripts": "4.0.3",
35+
"react-scripts": "5.0.1",
3536
"react-simple-code-editor": "^0.13.0",
3637
"react-spinners": "^0.13.8",
3738
"react-toastify": "^8.0.0",
@@ -49,7 +50,7 @@
4950
"workbox-routing": "^5.1.3",
5051
"workbox-strategies": "^5.1.3",
5152
"workbox-streams": "^5.1.3",
52-
"xml2js": "^0.4.23",
53+
"xml2js": "^0.5.0",
5354
"zealit": "^2.4.1"
5455
},
5556
"scripts": {

server/model/workflows.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
import xml.etree.ElementTree as ET
88
import random
99
import string
10-
10+
from dotenv import load_dotenv
11+
load_dotenv()
1112

1213
class WorkFlowModel:
1314
def __init__(self) -> None:

server/requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
dnspython==2.1.0
2-
Flask==2.0.1
1+
dnspython==2.6.1
2+
Flask==2.2.5
33
python-dotenv==0.19.0
4-
pymongo==3.12.0
5-
gunicorn==20.0.4
6-
flask-cors==3.0.10
4+
pymongo==4.6.3
5+
gunicorn==23.0.0
6+
flask-cors==6.0.0
77
defusedxml==0.7.1

src/GraphArea.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ function Graph({
2727
}
2828
if (graphML) myGraph.setGraphML(graphML);
2929
myGraph.setCurStatus();
30+
myGraph.cy.on('zoom', () => {
31+
dispatcher({ type: T.SET_ZOOM_LEVEL, payload: (myGraph.cy.zoom() * 100).toFixed(0) });
32+
});
3033
return myGraph;
3134
};
3235
// Remote server implementation - Not being used.

src/GraphWorkspace.jsx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React, { useEffect } from 'react';
1+
import React from 'react';
22
import ZoomComp from './component/ZoomSetter';
33

4-
import { actionType as T } from './reducer';
4+
// import { actionType as T } from './reducer';
55
import './graphWorkspace.css';
6-
import localStorageManager from './graph-builder/local-storage-manager';
6+
// import localStorageManager from './graph-builder/local-storage-manager';
77
import TabBar from './component/TabBar';
88
import Graph from './GraphArea';
99

@@ -12,16 +12,17 @@ const GraphComp = (props) => {
1212
const { dispatcher, superState } = props;
1313
// const [loadedFromStorage, setLoadedFromStorage] = React.useState(false);
1414

15-
useEffect(() => {
16-
const allSavedGs = localStorageManager.getAllGraphs().map((graphID) => ({
17-
graphID,
18-
}));
19-
dispatcher({
20-
type: T.ADD_GRAPH_BULK,
21-
payload: allSavedGs,
22-
});
23-
// setLoadedFromStorage(true);
24-
}, []);
15+
// The functionality for loading graphs from previous sessions is currently on hold.
16+
// useEffect(() => {
17+
// const allSavedGs = localStorageManager.getAllGraphs().map((graphID) => ({
18+
// graphID,
19+
// }));
20+
// dispatcher({
21+
// type: T.ADD_GRAPH_BULK,
22+
// payload: allSavedGs,
23+
// });
24+
// // setLoadedFromStorage(true);
25+
// }, []);
2526

2627
// Remote server implementation - Not being used.
2728
// useEffect(() => {

src/component/FullScreenButton.jsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React, { useState } from 'react';
2+
import { Maximize, Minimize } from 'lucide-react';
3+
4+
export default function FullScreenButton() {
5+
const [isFullscreen, setIsFullscreen] = useState(false);
6+
7+
const toggleFullscreen = () => {
8+
if (!document.fullscreenElement) {
9+
document.documentElement.requestFullscreen();
10+
setIsFullscreen(true);
11+
} else {
12+
document.exitFullscreen();
13+
setIsFullscreen(false);
14+
}
15+
};
16+
17+
return (
18+
<button type="button" onClick={toggleFullscreen}>
19+
{isFullscreen ? <Minimize size={20} /> : <Maximize size={20} />}
20+
</button>
21+
);
22+
}

src/component/Header.jsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
ActionButton, Vsep, Hsep, Space, TextBox, Switcher, DropDown, FileUploader,
99
} from './HeaderComps';
1010
import 'rc-switch/assets/index.css';
11+
import FullScreenButton from './FullScreenButton';
1112
// import ServerActions from './serverActions/ServerActions';
1213

1314
const setHotKeys = (actions) => {
@@ -38,13 +39,15 @@ const Header = ({ superState, dispatcher }) => {
3839

3940
return (
4041
<header className="header">
41-
<section className="middle titlebar">
42-
{
43-
superState.curGraphInstance ? `${
44-
superState.curGraphInstance.projectName
45-
} - concore Editor` : 'untitled'
46-
}
47-
</section>
42+
<div style={{ display: 'flex' }}>
43+
<section className="middle titlebar">
44+
{
45+
superState.curGraphInstance ? `${superState.curGraphInstance.projectName
46+
} - concore Editor` : 'untitled'
47+
}
48+
</section>
49+
<FullScreenButton />
50+
</div>
4851
<section className="toolbar">
4952
{
5053
actions.map(({
@@ -67,7 +70,7 @@ const Header = ({ superState, dispatcher }) => {
6770
case 'menu': return <DropDown {...props} />;
6871
case 'file-upload': return <FileUploader {...props} superState={superState} />;
6972
case 'action': return <ActionButton {...props} />;
70-
// case 'serverActions': return <ServerActions superState={superState} />;
73+
// case 'serverActions': return <ServerActions superState={superState} />;
7174
default: return <></>;
7275
}
7376
})

0 commit comments

Comments
 (0)