Commit 88baa433 authored by Fabien Maniere's avatar Fabien Maniere

files clean/lint

parent cd69d92a
...@@ -107,9 +107,8 @@ component = R.hooksComponent componentName cpt ...@@ -107,9 +107,8 @@ component = R.hooksComponent componentName cpt
{ title: props.title { title: props.title
, className: contentClassName , className: contentClassName
} }
[ [ H.span { className: "font-family-theme text-small" }
H.span { className: "font-family-theme text-small" } [ [ H.text $ " " <> componentLabel <> " "
H.text $ " " <> componentLabel <> " "
] ]
] ]
] ]
......
...@@ -58,8 +58,8 @@ actionDeleteUserCpt = here.component "actionDeleteUser" cpt ...@@ -58,8 +58,8 @@ actionDeleteUserCpt = here.component "actionDeleteUser" cpt
where where
cpt _ _ = do cpt _ _ = do
pure $ pure $
Tools.panelNoFooter { Tools.panelNoFooter
mError: Nothing { mError: Nothing
, iconName: "" , iconName: ""
, textTitle: "Delete user" , textTitle: "Delete user"
} }
......
...@@ -80,8 +80,8 @@ linkNodeCpt' = here.component "__clone__" cpt ...@@ -80,8 +80,8 @@ linkNodeCpt' = here.component "__clone__" cpt
_ -> mempty _ -> mempty
pure $ pure $
Tools.panel { Tools.panel
mError: Nothing { mError: Nothing
, iconName: "link" , iconName: "link"
, textTitle: "Link" , textTitle: "Link"
} }
......
...@@ -20,7 +20,6 @@ import Reactix as R ...@@ -20,7 +20,6 @@ import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Toestand as T import Toestand as T
here :: R2.Here here :: R2.Here
here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.ManageTeam" here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.ManageTeam"
...@@ -92,13 +91,12 @@ teamLayoutRowsCpt = here.component "teamLayoutRows" cpt ...@@ -92,13 +91,12 @@ teamLayoutRowsCpt = here.component "teamLayoutRows" cpt
let focusOnShareTab = \_ -> tabFocusHandler Share let focusOnShareTab = \_ -> tabFocusHandler Share
pure $ pure $
Tools.panelNoFooter { Tools.panelNoFooter
mError: error' { mError: error'
, iconName: "users" , iconName: "users"
, textTitle: "Manage the team" , textTitle: "Manage the team"
} }
[ [ if null team_members' then
if null team_members' then
H.div { style: { margin: "10px" } } H.div { style: { margin: "10px" } }
[ H.p {} [ H.p {}
[ H.text "Your team is empty, you can send some invitations (" [ H.text "Your team is empty, you can send some invitations ("
...@@ -110,7 +108,8 @@ teamLayoutRowsCpt = here.component "teamLayoutRows" cpt ...@@ -110,7 +108,8 @@ teamLayoutRowsCpt = here.component "teamLayoutRows" cpt
, showLabel: true , showLabel: true
} }
, H.text ")." , H.text ")."
] ] ]
]
else else
R.fragment R.fragment
(makeLeader team_owner_username : (map makeTeam team_members')) (makeLeader team_owner_username : (map makeTeam team_members'))
......
...@@ -46,8 +46,8 @@ mergeNodeCpt = here.component "mergeNode" cpt ...@@ -46,8 +46,8 @@ mergeNodeCpt = here.component "mergeNode" cpt
} }
_ -> H.div {} [] _ -> H.div {} []
pure $ Tools.panel { pure $ Tools.panel
mError: Nothing { mError: Nothing
, iconName: "random" , iconName: "random"
, textTitle: "Merge this list of terms with an other one" , textTitle: "Merge this list of terms with an other one"
} }
......
...@@ -72,8 +72,8 @@ moveNodeCpt' = here.component "__clone__" cpt ...@@ -72,8 +72,8 @@ moveNodeCpt' = here.component "__clone__" cpt
_ -> H.div {} [] _ -> H.div {} []
pure $ pure $
Tools.panel { Tools.panel
mError: Nothing { mError: Nothing
, iconName: "arrows" , iconName: "arrows"
, textTitle: "Move this node" , textTitle: "Move this node"
} }
......
...@@ -101,8 +101,8 @@ shareNodeInnerCpt = here.component "shareNodeInner" cpt ...@@ -101,8 +101,8 @@ shareNodeInnerCpt = here.component "shareNodeInner" cpt
text' /\ text <- R2.useBox' "" text' /\ text <- R2.useBox' ""
mError' /\ mError <- R2.useBox' Nothing mError' /\ mError <- R2.useBox' Nothing
pure $ Tools.panel { pure $ Tools.panel
mError: mError' { mError: mError'
, iconName: "user-plus" , iconName: "user-plus"
, textTitle: "Invite user(s) to the team" , textTitle: "Invite user(s) to the team"
} }
...@@ -164,8 +164,8 @@ publishNodeCpt = here.component "publishNode" cpt ...@@ -164,8 +164,8 @@ publishNodeCpt = here.component "publishNode" cpt
} }
_ -> H.div {} [] _ -> H.div {} []
pure $ Tools.panel { pure $ Tools.panel
mError: Nothing { mError: Nothing
, iconName: "" , iconName: ""
, textTitle: "Publish the node" , textTitle: "Publish the node"
} }
...@@ -212,11 +212,12 @@ shareURLInnercpt :: R.Component (url :: String) ...@@ -212,11 +212,12 @@ shareURLInnercpt :: R.Component (url :: String)
shareURLInnercpt = here.component "shareURLInner" cpt shareURLInnercpt = here.component "shareURLInner" cpt
where where
cpt { url } _ = do cpt { url } _ = do
pure $ Tools.panelNoFooter { pure $ Tools.panelNoFooter
mError: Nothing { mError: Nothing
, iconName: "share-alt" , iconName: "share-alt"
, textTitle: "Share the node (URL)" , textTitle: "Share the node (URL)"
} [ H.div {} [ H.text url ] ] }
[ H.div {} [ H.text url ] ]
loadUrl :: { session :: Session, id :: NodeID, nodeType :: NodeType } -> AffRESTError String loadUrl :: { session :: Session, id :: NodeID, nodeType :: NodeType } -> AffRESTError String
loadUrl { session, id, nodeType } = get session $ GR.ShareURL id nodeType loadUrl { session, id, nodeType } = get session $ GR.ShareURL id nodeType
...@@ -326,11 +326,12 @@ uploadFileViewWithLangsCpt = here.component "uploadFileViewWithLangs" cpt ...@@ -326,11 +326,12 @@ uploadFileViewWithLangsCpt = here.component "uploadFileViewWithLangs" cpt
[ H.text "Reset" ] [ H.text "Reset" ]
, uploadButton props [] , uploadButton props []
] ]
pure $ Tools.panel { pure $ Tools.panel
mError: Nothing { mError: Nothing
, iconName: "upload" , iconName: "upload"
, textTitle: "Upload and analyze a corpus" , textTitle: "Upload and analyze a corpus"
} (bodies <> [ footer ]) }
(bodies <> [ footer ])
-- | Properties of a file upload -- | Properties of a file upload
type UploadFileProps = type UploadFileProps =
...@@ -608,8 +609,8 @@ uploadListViewCpt = here.component "uploadListView" cpt ...@@ -608,8 +609,8 @@ uploadListViewCpt = here.component "uploadListView" cpt
-- Render -- Render
pure $ pure $
Tools.panel { Tools.panel
mError: Nothing { mError: Nothing
, iconName: "upload" , iconName: "upload"
, textTitle: "Upload (and replace) a list of terms" , textTitle: "Upload (and replace) a list of terms"
} }
...@@ -950,8 +951,8 @@ uploadTermListViewCpt = here.component "uploadTermListView" cpt ...@@ -950,8 +951,8 @@ uploadTermListViewCpt = here.component "uploadTermListView" cpt
} }
] ]
pure $ Tools.panel { pure $ Tools.panel
mError: Nothing { mError: Nothing
, iconName: "upload" , iconName: "upload"
, textTitle: "Upload (and replace) a list of terms" , textTitle: "Upload (and replace) a list of terms"
} }
...@@ -1118,11 +1119,12 @@ uploadFrameCalcViewWithLangsCpt = here.component "uploadFrameCalcViewWithLangs" ...@@ -1118,11 +1119,12 @@ uploadFrameCalcViewWithLangsCpt = here.component "uploadFrameCalcViewWithLangs"
[ H.text "Upload!" ] [ H.text "Upload!" ]
] ]
pure $ Tools.panel { pure $ Tools.panel
mError: Nothing { mError: Nothing
, iconName: "upload" , iconName: "upload"
, textTitle: "Upload a calc" , textTitle: "Upload a calc"
} (bodies <> [ footer ]) }
(bodies <> [ footer ])
where where
onClick lang' selection' _ = do onClick lang' selection' _ = do
......
...@@ -41,7 +41,6 @@ import Reactix.DOM.HTML as H ...@@ -41,7 +41,6 @@ import Reactix.DOM.HTML as H
import Toestand as T import Toestand as T
import DOM.Simple.Console (log2) import DOM.Simple.Console (log2)
here :: R2.Here here :: R2.Here
here = R2.here "Gargantext.Components.Forest.Tree.Node.Box" here = R2.here "Gargantext.Components.Forest.Tree.Node.Box"
...@@ -67,7 +66,6 @@ nodePopupViewCpt = here.component "nodePopupView" cpt ...@@ -67,7 +66,6 @@ nodePopupViewCpt = here.component "nodePopupView" cpt
logNodePopup <- T.read nodePopup logNodePopup <- T.read nodePopup
R.useEffect' $ here.log2 "action:" logNodePopup R.useEffect' $ here.log2 "action:" logNodePopup
pure $ pure $
......
...@@ -33,7 +33,8 @@ fragmentPT text = H.div { style: { margin: "10px" } } [ H.text text ] ...@@ -33,7 +33,8 @@ fragmentPT text = H.div { style: { margin: "10px" } } [ H.text text ]
type PanelProps = type PanelProps =
( mError :: Maybe String ( mError :: Maybe String
, iconName :: String , iconName :: String
, textTitle :: String ) , textTitle :: String
)
-- | Last element of panel's children goes to footer, all others go to body -- | Last element of panel's children goes to footer, all others go to body
panel :: R2.Component PanelProps panel :: R2.Component PanelProps
...@@ -62,7 +63,8 @@ panelCpt = here.component "panel" cpt ...@@ -62,7 +63,8 @@ panelCpt = here.component "panel" cpt
[ B.icon { name: iconName } [ B.icon { name: iconName }
, H.span { className: "px-1" } [ H.text textTitle ] , H.span { className: "px-1" } [ H.text textTitle ]
] ]
, R2.col 12 bodies ] , R2.col 12 bodies
]
, errorCpt , errorCpt
] ]
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment