Skip to content

Commit d4cc51e

Browse files
committed
issue #61 Project Details modal removed on starting for first time
1 parent 84fb223 commit d4cc51e

4 files changed

Lines changed: 4 additions & 3 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/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/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)