github.com/simpleiot/simpleiot@v0.18.3/frontend/src/Components/NodeNetworkManager.elm (about)

     1  module Components.NodeNetworkManager exposing (view)
     2  
     3  import Api.Point as Point
     4  import Components.NodeOptions exposing (NodeOptions, oToInputO)
     5  import Element exposing (..)
     6  import Element.Border as Border
     7  import UI.Icon as Icon
     8  import UI.NodeInputs as NodeInputs
     9  import UI.Style as Style
    10  
    11  
    12  view : NodeOptions msg -> Element msg
    13  view o =
    14      column
    15          [ width fill
    16          , Border.widthEach { top = 2, bottom = 0, left = 0, right = 0 }
    17          , Border.color Style.colors.black
    18          , spacing 6
    19          ]
    20      <|
    21          wrappedRow [ spacing 10 ]
    22              [ Icon.network
    23              , text <|
    24                  Point.getText o.node.points Point.typeDescription ""
    25              ]
    26              :: (if o.expDetail then
    27                      let
    28                          labelWidth =
    29                              150
    30  
    31                          opts =
    32                              oToInputO o labelWidth
    33  
    34                          textInput =
    35                              NodeInputs.nodeTextInput opts "0"
    36                      in
    37                      [ textInput Point.typeDescription "Description" ""
    38                      ]
    39  
    40                  else
    41                      []
    42                 )