@@ -23,6 +23,7 @@ const toolbarList = (state, dispatcher) => [
2323 icon : FaPlus ,
2424 action : createNode ,
2525 active : true ,
26+ visibility : true ,
2627 hotkey : 'Ctrl+G' ,
2728 } ,
2829 { type : 'vsep' } ,
@@ -32,6 +33,7 @@ const toolbarList = (state, dispatcher) => [
3233 icon : FaFileImport ,
3334 action : readFile ,
3435 active : true ,
36+ visibility : true ,
3537 hotkey : 'Ctrl+O' ,
3638 } ,
3739 {
@@ -40,20 +42,23 @@ const toolbarList = (state, dispatcher) => [
4042 icon : FaSave ,
4143 action : saveGraphMLFile ,
4244 active : state . curGraphInstance ,
45+ visibility : true ,
4346 } ,
4447 {
4548 type : 'action' ,
4649 text : 'Save As' ,
4750 icon : FaSave ,
4851 action : ( s , d ) => saveAction ( s , d ) ,
4952 active : true ,
53+ visibility : true ,
5054 } ,
5155 {
5256 type : 'action' ,
5357 text : 'Empty' ,
5458 icon : FaThermometerEmpty ,
5559 action : clearAll ,
5660 active : true ,
61+ visibility : true ,
5762 hotkey : 'Ctrl+Backspace' ,
5863 } ,
5964 { type : 'vsep' } ,
@@ -63,6 +68,7 @@ const toolbarList = (state, dispatcher) => [
6368 icon : FaUndo ,
6469 action : undo ,
6570 active : state . undoEnabled ,
71+ visibility : true ,
6672 hotkey : 'Ctrl+Z' ,
6773 } ,
6874 {
@@ -71,6 +77,7 @@ const toolbarList = (state, dispatcher) => [
7177 icon : FaRedo ,
7278 action : redo ,
7379 active : state . redoEnabled ,
80+ visibility : true ,
7481 hotkey : 'Ctrl+Shift+Z,Ctrl+Y' ,
7582 } ,
7683 { type : 'vsep' } ,
@@ -80,6 +87,7 @@ const toolbarList = (state, dispatcher) => [
8087 icon : FaEdit ,
8188 action : editElement ,
8289 active : ( state . eleSelected && state . eleSelectedPayload . type !== 'MIX' ) ,
90+ visibility : true ,
8391 hotkey : 'Ctrl+E' ,
8492 } ,
8593 {
@@ -88,6 +96,7 @@ const toolbarList = (state, dispatcher) => [
8896 icon : FaTrash ,
8997 action : deleteElem ,
9098 active : state . eleSelected ,
99+ visibility : true ,
91100 hotkey : 'Delete,Backspace,Del,Clear' ,
92101 } ,
93102 { type : 'vsep' } ,
@@ -97,6 +106,7 @@ const toolbarList = (state, dispatcher) => [
97106 icon : FaHistory ,
98107 action : viewHistory ,
99108 active : true ,
109+ visibility : true ,
100110 } ,
101111 { type : 'vsep' } ,
102112 // server buttons
@@ -106,48 +116,55 @@ const toolbarList = (state, dispatcher) => [
106116 icon : state . isWorkflowOnServer ? FaToggleOn : FiToggleLeft ,
107117 action : ( ) => toggleServer ( state , dispatcher ) ,
108118 active : true ,
119+ visibility : true ,
109120 } ,
110121 {
111122 type : 'action' ,
112123 text : 'Build' ,
113124 icon : FaHammer ,
114125 action : ( ) => state . curGraphInstance && state . curGraphInstance . build ( ) ,
115126 active : state . isWorkflowOnServer ,
127+ visibility : state . isWorkflowOnServer ,
116128 } ,
117129 {
118130 type : 'action' ,
119131 text : 'Debug' ,
120132 icon : FaBug ,
121133 action : ( ) => state . curGraphInstance && state . curGraphInstance . debug ( ) ,
122134 active : state . isWorkflowOnServer ,
135+ visibility : state . isWorkflowOnServer ,
123136 } ,
124137 {
125138 type : 'action' ,
126139 text : 'Run' ,
127140 icon : FiPlay ,
128141 action : ( ) => state . curGraphInstance && state . curGraphInstance . run ( ) ,
129142 active : state . isWorkflowOnServer ,
143+ visibility : state . isWorkflowOnServer ,
130144 } ,
131145 {
132146 type : 'action' ,
133147 text : 'Clear' ,
134148 icon : FaRegTimesCircle ,
135149 action : ( ) => state . curGraphInstance && state . curGraphInstance . clear ( ) ,
136150 active : state . isWorkflowOnServer ,
151+ visibility : state . isWorkflowOnServer ,
137152 } ,
138153 {
139154 type : 'action' ,
140155 text : 'Stop' ,
141156 icon : FiStopCircle ,
142157 action : ( ) => state . curGraphInstance && state . curGraphInstance . stop ( ) ,
143158 active : state . isWorkflowOnServer ,
159+ visibility : state . isWorkflowOnServer ,
144160 } ,
145161 {
146162 type : 'action' ,
147163 text : 'Destroy' ,
148164 icon : FaBomb ,
149165 action : ( ) => state . curGraphInstance && state . curGraphInstance . destroy ( ) ,
150166 active : state . isWorkflowOnServer ,
167+ visibility : state . isWorkflowOnServer ,
151168 } ,
152169
153170 // Not being implemented in version 1
@@ -195,13 +212,15 @@ const toolbarList = (state, dispatcher) => [
195212 icon : FiTriangle ,
196213 action : ( ) => { window . open ( 'https://github.com/ControlCore-Project/concore-editor' , '_blank' ) ; } ,
197214 active : true ,
215+ visibility : true ,
198216 } ,
199217 {
200218 type : 'action' ,
201219 text : 'Share' ,
202220 icon : FaShare ,
203221 action : openShareModal ,
204222 active : true ,
223+ visibility : true ,
205224 } ,
206225 {
207226 type : 'menu' ,
@@ -211,6 +230,7 @@ const toolbarList = (state, dispatcher) => [
211230 { fn : ( ) => downloadImg ( s , d , 'JPG' ) , name : 'JPG' } ,
212231 { fn : ( ) => downloadImg ( s , d , 'PNG' ) , name : 'PNG' } ,
213232 ] ,
233+ visibility : true ,
214234 active : true ,
215235 } ,
216236 { type : 'vsep' } ,
0 commit comments