Commit 45f16a87 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FOREST] Ergo, Doc, Design.

parent 78f5ce5d
...@@ -51,17 +51,17 @@ settingsBox FolderPrivate = SettingsBox { show: true ...@@ -51,17 +51,17 @@ settingsBox FolderPrivate = SettingsBox { show: true
settingsBox FolderShared = SettingsBox { show: true settingsBox FolderShared = SettingsBox { show: true
, edit : false , edit : false
, buttons : [Documentation FolderShared , buttons : [Documentation FolderShared
--, Team -- , Add [Folder, Team]
, Delete] , Delete]
} }
settingsBox FolderPublic = SettingsBox { show: true settingsBox FolderPublic = SettingsBox { show: true
, edit : false , edit : false
, buttons : [Documentation FolderPublic , buttons : [Documentation FolderPublic
, SearchBox {-, SearchBox
, Add [ Corpus , Add [ Corpus
, Folder , Folder
] ]-}
, Delete , Delete
] ]
} }
...@@ -135,7 +135,7 @@ data NodeAction = Documentation NodeType ...@@ -135,7 +135,7 @@ data NodeAction = Documentation NodeType
| SearchBox | SearchBox
| Download | Upload | Refresh | Download | Upload | Refresh
| Move | Clone | Delete | Move | Clone | Delete
| Share | Team | Share
| Add (Array NodeType) | Add (Array NodeType)
...@@ -149,7 +149,6 @@ instance eqNodeAction :: Eq NodeAction where ...@@ -149,7 +149,6 @@ instance eqNodeAction :: Eq NodeAction where
eq Clone Clone = true eq Clone Clone = true
eq Delete Delete = true eq Delete Delete = true
eq Share Share = true eq Share Share = true
eq Team Team = true
eq (Add x) (Add y) = true && (x == y) eq (Add x) (Add y) = true && (x == y)
eq _ _ = false eq _ _ = false
...@@ -54,7 +54,7 @@ createNodeView d p@{nodeType} (_ /\ setPopupOpen) nodeTypes = R.createElement el ...@@ -54,7 +54,7 @@ createNodeView d p@{nodeType} (_ /\ setPopupOpen) nodeTypes = R.createElement el
where where
el = R.hooksComponent "CreateNodeView" cpt el = R.hooksComponent "CreateNodeView" cpt
cpt {id, name} _ = do cpt {id, name} _ = do
nodeName <- R.useState' "" nodeName <- R.useState' "Default Name"
nodeType <- R.useState' $ fromMaybe NodeUser $ head nodeTypes nodeType <- R.useState' $ fromMaybe NodeUser $ head nodeTypes
pure $ H.div {} pure $ H.div {}
[ panelBody readNodeType nodeName nodeType [ panelBody readNodeType nodeName nodeType
...@@ -79,7 +79,7 @@ createNodeView d p@{nodeType} (_ /\ setPopupOpen) nodeTypes = R.createElement el ...@@ -79,7 +79,7 @@ createNodeView d p@{nodeType} (_ /\ setPopupOpen) nodeTypes = R.createElement el
H.div {className: "form-group"} H.div {className: "form-group"}
[ H.input { type: "text" [ H.input { type: "text"
, placeholder: "Node name" , placeholder: "Node name"
, defaultValue: "Chose name" , defaultValue: "Write Name here"
, className: "form-control" , className: "form-control"
, onInput: mkEffectFn1 $ \e -> setNodeName , onInput: mkEffectFn1 $ \e -> setNodeName
$ const $ const
......
...@@ -348,6 +348,13 @@ panelAction :: (Action -> Aff Unit) ...@@ -348,6 +348,13 @@ panelAction :: (Action -> Aff Unit)
-> R.State (Maybe NodePopup) -> R.State (Maybe NodePopup)
-> R.Element -> R.Element
panelAction d {id,name,nodeType,action, session} p = case action of panelAction d {id,name,nodeType,action, session} p = case action of
(Just (Documentation NodeUser)) -> R.fragment [H.div {} [ H.p {} [ H.text "This account is personal"]
, H.p {} [ H.text "Its uses depends on the instances terms of uses."]
]
]
(Just (Documentation FolderPrivate)) -> R.fragment [H.div {} [H.text $ "This folder and its children are private only!"]]
(Just (Documentation FolderPublic)) -> R.fragment [H.div {} [H.text $ "Soon, you will be able to build public folders to share your work with the world!"]]
(Just (Documentation FolderShared)) -> R.fragment [H.div {} [H.text $ "Soon, you will be able to build teams folders to share your work"]]
(Just (Documentation x)) -> R.fragment [ H.div {} [H.text $ "More information on" <> show nodeType]] (Just (Documentation x)) -> R.fragment [ H.div {} [H.text $ "More information on" <> show nodeType]]
(Just SearchBox) -> R.fragment [ H.div {} [ H.text $ "Search and create a private corpus with the search query as corpus name." ] (Just SearchBox) -> R.fragment [ H.div {} [ H.text $ "Search and create a private corpus with the search query as corpus name." ]
, searchBar {session, databases:allDatabases} , searchBar {session, databases:allDatabases}
......
...@@ -127,6 +127,7 @@ data NodeType = NodeUser ...@@ -127,6 +127,7 @@ data NodeType = NodeUser
| Annuaire | Annuaire
| NodeContact | NodeContact
| Corpus | Corpus
| Team
| Url_Document | Url_Document
| Dashboard | Dashboard
| Error | Error
...@@ -161,6 +162,7 @@ instance showNodeType :: Show NodeType where ...@@ -161,6 +162,7 @@ instance showNodeType :: Show NodeType where
show Node = "Node" show Node = "Node"
show Nodes = "Nodes" show Nodes = "Nodes"
show Tree = "NodeTree" show Tree = "NodeTree"
show Team = "Team"
show NodeList = "NodeList" show NodeList = "NodeList"
show Texts = "NodeTexts" show Texts = "NodeTexts"
...@@ -183,6 +185,7 @@ readNodeType "Nodes" = Nodes ...@@ -183,6 +185,7 @@ readNodeType "Nodes" = Nodes
readNodeType "NodeCorpus" = Corpus readNodeType "NodeCorpus" = Corpus
readNodeType "NodeContact" = NodeContact readNodeType "NodeContact" = NodeContact
readNodeType "Tree" = Tree readNodeType "Tree" = Tree
readNodeType "Team" = Team
readNodeType "NodeList" = NodeList readNodeType "NodeList" = NodeList
readNodeType "NodeTexts" = Texts readNodeType "NodeTexts" = Texts
readNodeType _ = Error readNodeType _ = Error
...@@ -223,6 +226,7 @@ nodeTypePath NodeContact = "contact" ...@@ -223,6 +226,7 @@ nodeTypePath NodeContact = "contact"
nodeTypePath Tree = "tree" nodeTypePath Tree = "tree"
nodeTypePath NodeList = "lists" nodeTypePath NodeList = "lists"
nodeTypePath Texts = "texts" nodeTypePath Texts = "texts"
nodeTypePath Team = "team"
------------------------------------------------------------ ------------------------------------------------------------
type ListId = Int type ListId = Int
......
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