@@ -30,6 +30,7 @@ import { InputText } from "../../ts/components/input_text";
3030import  {  InputHost  }  from  "../../ts/components/input_host" ; 
3131import  {  Collapse ,  ListGroup ,  ListGroupItem  }  from  "react-bootstrap" ; 
3232import  {  InputSelect  }  from  "../../ts/components/input_select" ; 
33+ import  {  Plus  }  from  "react-feather" ; 
3334import  {  SubPage  }  from  "../../ts/components/sub_page" ; 
3435import  {  Table  }  from  "../../ts/components/table" ; 
3536import  type  {  ChargeManagerStatus  }  from  "./main" ; 
@@ -492,21 +493,32 @@ export class ChargeManagerChargers extends ConfigComponent<'charge_manager/confi
492493                                    state . scanResult . filter ( s  =>  ! state . chargers . some ( c  =>  c . host  ==  s . hostname  +  ".local"  ||  c . host  ==  s . ip ) ) 
493494                                        . map ( s  =>  ( 
494495                                            < ListGroupItem  key = { s . hostname } 
496+                                                         className = "p-0" 
495497                                                        action  type = "button" 
496498                                                        onClick = { s . error  !=  0  ? undefined  : ( )  =>  { 
497499                                                            this . setState ( { addCharger : { host : s . hostname  +  ".local" ,  name : s . display_name ,  rot : - 1 } } ) 
498500                                                        } } 
499501                                                        style = { s . error  ==  0  ? ""  : "cursor: default; background-color: #eeeeee !important;" } > 
500-                                                 < div  class = "d-flex w-100 justify-content-between" > 
501-                                                     < span  class = "h5 text-left" > { s . display_name } </ span > 
502-                                                     { s . error  ==  0  ? null  :
503-                                                         < span  class = "text-right"  style = "color:red" > { translate_unchecked ( `charge_manager.content.scan_error_${ s . error }  ) } </ span > 
502+                                                 < div  class = "d-flex w-100 justify-content-between align-items-center" > 
503+                                                     < div  class = "flex-grow-1 col p-2" > 
504+                                                         < div  class = "row m-0 w-100 justify-content-between" > 
505+                                                             < span  class = "col p-0 h5 text-left" > { s . display_name } </ span > 
506+                                                             { s . error  ==  0  ? null  :
507+                                                                 < span  class = "col-auto p-0 text-right"  style = "color:red" > { translate_unchecked ( `charge_manager.content.scan_error_${ s . error }  ) } </ span > 
508+                                                             } 
509+                                                         </ div > 
510+                                                         < div  class = "row m-0 p-0 d-flex w-100 justify-content-between" > 
511+                                                             { util . remoteAccessMode  ? < span > { s . hostname  +  ".local" } </ span >  : < a  target = "_blank"  rel = "noopener noreferrer"  href = { "http://"  +  s . hostname  +  ".local" } > { s . hostname  +  ".local" } </ a > } 
512+                                                             { util . remoteAccessMode  ? < span > { s . ip } </ span >  : < a  target = "_blank"  rel = "noopener noreferrer"  href = { "http://"  +  s . ip } > { s . ip } </ a > } 
513+                                                         </ div > 
514+                                                     </ div > 
515+                                                     { s . error  ==  0  ?
516+                                                         < div  class = "col-auto d-flex align-items-center justify-content-center px-3"  style = { { backgroundColor : "#007bff" ,  minHeight : "100%" ,  alignSelf : "stretch" } } > 
517+                                                             < Plus  size = "24"  color = "white" /> 
518+                                                         </ div > 
519+                                                         : null 
504520                                                    } 
505521                                                </ div > 
506-                                                 < div  class = "d-flex w-100 justify-content-between" > 
507-                                                     { util . remoteAccessMode  ? < span > { s . hostname  +  ".local" } </ span >  : < a  target = "_blank"  rel = "noopener noreferrer"  href = { "http://"  +  s . hostname  +  ".local" } > { s . hostname  +  ".local" } </ a > } 
508-                                                     { util . remoteAccessMode  ? < span > { s . ip } </ span >  : < a  target = "_blank"  rel = "noopener noreferrer"  href = { "http://"  +  s . ip } > { s . ip } </ a > } 
509-                                                 </ div > 
510522                                            </ ListGroupItem > ) ) 
511523                                } </ ListGroup > 
512524                            </ FormRow > 
0 commit comments