@@ -72,6 +72,12 @@ class GraphServer extends GraphLoadSave {
7272 Axios . post ( `http://127.0.0.1:5000/build/${ this . superState . uploadedDirName } ?fetch=${ this . superState . graphs [ this . superState . curGraphIndex ] . fileName . split ( '.' ) [ 0 ] } &unlock=${ this . superState . unlockCheck } &docker=${ this . superState . dockerCheck } &maxtime=${ this . superState . maxTime } ¶ms=${ this . superState . params } &octave=${ this . superState . octave } ` )
7373 . then ( ( res ) => { // eslint-disable-next-line
7474 toast . success ( res . data [ 'message' ] )
75+ this . dispatcher ( {
76+ type : T . SET_FUNCTIONS ,
77+ payload : {
78+ built : false , ran : false , debugged : true , cleared : false , stopped : false , destroyed : true ,
79+ } ,
80+ } ) ;
7581 this . dispatcher ( { type : T . SET_LOADER , payload : false } ) ;
7682 } ) . catch ( ( err ) => { // eslint-disable-next-line
7783 toast . error ( err . message ) ;
@@ -86,6 +92,12 @@ class GraphServer extends GraphLoadSave {
8692 Axios . post ( `http://127.0.0.1:5000/debug/${ this . superState . graphs [ this . superState . curGraphIndex ] . fileName . split ( '.' ) [ 0 ] } ` )
8793 . then ( ( res ) => { // eslint-disable-next-line
8894 toast . success ( res . data [ 'message' ] )
95+ this . dispatcher ( {
96+ type : T . SET_FUNCTIONS ,
97+ payload : {
98+ built : false , ran : false , debugged : false , cleared : true , stopped : true , destroyed : true ,
99+ } ,
100+ } ) ;
89101 this . dispatcher ( { type : T . SET_LOADER , payload : false } ) ;
90102 } ) . catch ( ( err ) => { // eslint-disable-next-line
91103 toast . error ( err . message ) ;
@@ -100,6 +112,12 @@ class GraphServer extends GraphLoadSave {
100112 Axios . post ( `http://127.0.0.1:5000/run/${ this . superState . graphs [ this . superState . curGraphIndex ] . fileName . split ( '.' ) [ 0 ] } ` )
101113 . then ( ( res ) => { // eslint-disable-next-line
102114 toast . success ( res . data [ 'message' ] )
115+ this . dispatcher ( {
116+ type : T . SET_FUNCTIONS ,
117+ payload : {
118+ built : false , ran : false , debugged : false , cleared : true , stopped : true , destroyed : true ,
119+ } ,
120+ } ) ;
103121 this . dispatcher ( { type : T . SET_LOADER , payload : false } ) ;
104122 } ) . catch ( ( err ) => { // eslint-disable-next-line
105123 toast . error ( err . message ) ;
@@ -115,6 +133,12 @@ class GraphServer extends GraphLoadSave {
115133 ?unlock=${ this . superState . unlockCheck } &maxtime=${ this . superState . maxTime } ¶ms=${ this . superState . params } ` )
116134 . then ( ( res ) => { // eslint-disable-next-line
117135 toast . success ( res . data [ 'message' ] ) ;
136+ this . dispatcher ( {
137+ type : T . SET_FUNCTIONS ,
138+ payload : {
139+ built : false , ran : true , debugged : true , cleared : false , stopped : true , destroyed : true ,
140+ } ,
141+ } ) ;
118142 this . dispatcher ( { type : T . SET_LOADER , payload : false } ) ;
119143 } ) . catch ( ( err ) => { // eslint-disable-next-line
120144 toast . error ( err . message ) ;
@@ -129,6 +153,12 @@ class GraphServer extends GraphLoadSave {
129153 Axios . post ( `http://127.0.0.1:5000/stop/${ this . superState . graphs [ this . superState . curGraphIndex ] . fileName . split ( '.' ) [ 0 ] } ` )
130154 . then ( ( res ) => { // eslint-disable-next-line
131155 toast . success ( res . data [ 'message' ] )
156+ this . dispatcher ( {
157+ type : T . SET_FUNCTIONS ,
158+ payload : {
159+ built : false , ran : false , debugged : false , cleared : true , stopped : false , destroyed : true ,
160+ } ,
161+ } ) ;
132162 this . dispatcher ( { type : T . SET_LOADER , payload : false } ) ;
133163 } ) . catch ( ( err ) => { // eslint-disable-next-line
134164 toast . error ( err . message ) ;
@@ -143,6 +173,12 @@ class GraphServer extends GraphLoadSave {
143173 Axios . delete ( `http://127.0.0.1:5000/destroy/${ this . superState . graphs [ this . superState . curGraphIndex ] . fileName . split ( '.' ) [ 0 ] } ` )
144174 . then ( ( res ) => { // eslint-disable-next-line
145175 toast . success ( res . data [ 'message' ] )
176+ this . dispatcher ( {
177+ type : T . SET_FUNCTIONS ,
178+ payload : {
179+ built : true , ran : false , debugged : false , cleared : false , stopped : false , destroyed : false ,
180+ } ,
181+ } ) ;
146182 this . dispatcher ( { type : T . SET_LOADER , payload : false } ) ;
147183 } ) . catch ( ( err ) => { // eslint-disable-next-line
148184 toast . error ( err . message ) ;
0 commit comments