File tree Expand file tree Collapse file tree 6 files changed +33
-7
lines changed
packages/node_modules/overmind-devtools Expand file tree Collapse file tree 6 files changed +33
-7
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const ActionsList: SFC = () => {
1313 { state . currentApp . actionsList . map ( ( item ) => {
1414 if ( item . type === ActionsListItemType . ACTION ) {
1515 const action = state . currentApp . actions [ item . id ]
16+
1617 return (
1718 < div
1819 className = { styles . actionItem }
@@ -32,6 +33,12 @@ const ActionsList: SFC = () => {
3233 action . actionName
3334 ) }
3435 </ span >
36+ < span
37+ className = { styles . errorIndication }
38+ style = { {
39+ visibility : action . hasError ? 'visible' : 'hidden' ,
40+ } }
41+ />
3542 </ div >
3643 )
3744 }
Original file line number Diff line number Diff line change @@ -6,22 +6,31 @@ export const list = css`
66
77export const actionItem = css `
88 position : relative;
9+ display : flex;
10+ align-items : center;
911 padding : var (--padding-1 );
1012 cursor : pointer;
11- text-indent : 30px ;
1213 border-bottom : 1px solid var (--color-dark-3 );
1314 : hover {
1415 background-color : var (--color-dark-3 );
1516 }
1617`
1718
18- export const actionColor = css `
19- position : absolute;
20- top : calc (50% - 5px );
21- left : 10px ;
19+ export const errorIndication = css `
20+ margin-left : auto;
21+ background-color : var (--color-red );
2222 border-radius : 2px ;
2323 width : 10px ;
2424 height : 10px ;
25+ margin-right : 10px ;
26+ `
27+
28+ export const actionColor = css `
29+ border-radius : 2px ;
30+ flex : 0 0 10px ;
31+ height : 10px ;
32+ margin-left : 10px ;
33+ margin-right : 10px ;
2534`
2635
2736export const actionSubItem = css `
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ export const addAction: Operator<StartActionMessage> = action(
195195 ...action ,
196196 isRunning : true ,
197197 operators : [ ] ,
198+ hasError : false ,
198199 }
199200
200201 if (
@@ -306,6 +307,7 @@ export const updateEffect: Operator<EffectMessage> = action(
306307 ( { value : message , state } ) => {
307308 const effect = message . data
308309 const id = getActionId ( effect )
310+ const action = state . apps [ message . appName ] . actions [ id ]
309311 const operator =
310312 state . apps [ message . appName ] . actions [ id ] . operators [ effect . operatorId ]
311313 const existingEvent = operator . events . find (
@@ -322,6 +324,10 @@ export const updateEffect: Operator<EffectMessage> = action(
322324 data : effect ,
323325 } )
324326 }
327+
328+ if ( effect . error ) {
329+ action . hasError = true
330+ }
325331 }
326332)
327333
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ export type Action = {
7777 isRunning : boolean
7878 operators : Operator [ ]
7979 value : any
80+ hasError : boolean
8081}
8182
8283export type Actions = {
Original file line number Diff line number Diff line change @@ -84,12 +84,12 @@ export const description = css`
8484 font-size : var (--font-size-2 );
8585 text-transform : none;
8686 font-weight : normal;
87- padding : none ;
87+ padding : 0 ;
8888`
8989
9090export const hint = css `
9191 font-size : var (--font-size-1 );
9292 text-transform : none;
9393 font-weight : normal;
94- padding : none ;
94+ padding : 0 ;
9595`
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ module.exports = {
1010 path : path . resolve ( 'dist' ) ,
1111 filename : 'bundle.js' ,
1212 } ,
13+ devServer : {
14+ disableHostCheck : true ,
15+ } ,
1316 module : {
1417 rules : [
1518 {
You can’t perform that action at this time.
0 commit comments