Skip to content

Commit ebc21b8

Browse files
committed
server button disappeared when no graphs
1 parent 57de3a6 commit ebc21b8

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/toolbarActions/toolbarList.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ const toolbarList = (state, dispatcher) => [
141141
icon: FaCogs,
142142
action: () => optionModalToggle(state, dispatcher),
143143
active: state.isWorkflowOnServer,
144-
visibility: state.isWorkflowOnServer,
144+
visibility: state.isWorkflowOnServer && state.curGraphInstance,
145145
},
146146
{
147147
type: 'action',
@@ -151,7 +151,7 @@ const toolbarList = (state, dispatcher) => [
151151
active: state.curGraphIndex !== -1
152152
? state.isWorkflowOnServer && state.graphs[state.curGraphIndex].built
153153
: state.isWorkflowOnServer,
154-
visibility: state.isWorkflowOnServer,
154+
visibility: state.isWorkflowOnServer && state.curGraphInstance,
155155
},
156156
{
157157
type: 'action',
@@ -161,7 +161,7 @@ const toolbarList = (state, dispatcher) => [
161161
active: state.curGraphIndex !== -1
162162
? state.isWorkflowOnServer && state.graphs[state.curGraphIndex].debugged
163163
: state.isWorkflowOnServer,
164-
visibility: state.isWorkflowOnServer,
164+
visibility: state.isWorkflowOnServer && state.curGraphInstance,
165165
},
166166
{
167167
type: 'action',
@@ -171,7 +171,7 @@ const toolbarList = (state, dispatcher) => [
171171
active: state.curGraphIndex !== -1
172172
? state.isWorkflowOnServer && state.graphs[state.curGraphIndex].ran
173173
: state.isWorkflowOnServer,
174-
visibility: state.isWorkflowOnServer,
174+
visibility: state.isWorkflowOnServer && state.curGraphInstance,
175175
},
176176
{
177177
type: 'action',
@@ -181,7 +181,7 @@ const toolbarList = (state, dispatcher) => [
181181
active: state.curGraphIndex !== -1
182182
? state.isWorkflowOnServer && state.graphs[state.curGraphIndex].cleared
183183
: state.isWorkflowOnServer,
184-
visibility: state.isWorkflowOnServer,
184+
visibility: state.isWorkflowOnServer && state.curGraphInstance,
185185
},
186186
{
187187
type: 'action',
@@ -191,7 +191,7 @@ const toolbarList = (state, dispatcher) => [
191191
active: state.curGraphIndex !== -1
192192
? state.isWorkflowOnServer && state.graphs[state.curGraphIndex].stopped
193193
: state.isWorkflowOnServer,
194-
visibility: state.isWorkflowOnServer,
194+
visibility: state.isWorkflowOnServer && state.curGraphInstance,
195195
},
196196
{
197197
type: 'action',
@@ -201,7 +201,7 @@ const toolbarList = (state, dispatcher) => [
201201
active: state.curGraphIndex !== -1
202202
? state.isWorkflowOnServer && state.graphs[state.curGraphIndex].destroyed
203203
: state.isWorkflowOnServer,
204-
visibility: state.isWorkflowOnServer,
204+
visibility: state.isWorkflowOnServer && state.curGraphInstance,
205205
},
206206

207207
// Not being implemented in version 1

0 commit comments

Comments
 (0)