Skip to content

Commit df49b86

Browse files
authored
Merge pull request #64 from Rahuljagwani/main
issue #61 Project Details modal removed on starting for first time
2 parents 84fb223 + e2f0813 commit df49b86

6 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/component/Header.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const Header = ({ superState, dispatcher }) => {
4141
{
4242
superState.curGraphInstance ? `${
4343
superState.curGraphInstance.projectName
44-
} - concore Editor` : ''
44+
} - concore Editor` : 'untitled'
4545
}
4646
</section>
4747
<section className="toolbar">

src/component/TabBar.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const TabBar = ({ superState, dispatcher }) => {
1616
if (!window.confirm('Do you confirm to close the tab? This action is irreversable.')) return;
1717
localStorageManager.remove(superState.graphs[i] ? superState.graphs[i].graphID : null);
1818
dispatcher({ type: T.REMOVE_GRAPH, payload: i });
19+
window.location.reload();
1920
};
2021
const editCur = (e) => {
2122
e.stopPropagation();

src/component/modals/NodeDetails.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ const NodeDetails = ({
9999
<input
100100
className="nodeLabelFile"
101101
type="text"
102-
required
103102
label="Node Label file"
104103
placeholder="Select file"
105104
onChange={(e) => {

src/component/modals/ProjectDetails.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const ProjectDetails = ({ superState, dispatcher }) => {
1010
const [authorName, setAuthorName] = useState('Default');
1111
// const [serverID, setServerID] = useState('');
1212
const inputRef = useCallback((node) => node && node.focus(), []);
13-
const newGraphModal = superState.newGraphModal || superState.graphs.length === 0;
13+
const { newGraphModal } = superState;
1414
const editDetailsModal = superState.editDetailsModal || (curGraph && !curGraph.projectName);
1515

1616
const setProjAuthorName = (a) => {

src/config/defaultValidators.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const nodeValidator = `(node, nodes, edges) => {
2-
var regex = /^[A-za-z0-9]+:[A-Za-z0-9.]+$/;
2+
var regex = /^[A-za-z0-9]+[:[A-Za-z0-9.]+]|[^$]$/;
33
let message = { ok: true, err: null };
44
if (!regex.test(node.label)) {
55
message = {

src/toolbarActions/toolbarList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const toolbarList = (state, dispatcher) => [
2222
text: 'Node',
2323
icon: FaPlus,
2424
action: createNode,
25-
active: true,
25+
active: state.curGraphInstance,
2626
visibility: true,
2727
hotkey: 'Ctrl+G',
2828
},

0 commit comments

Comments
 (0)