Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
0bf8fdc8
Commit
0bf8fdc8
authored
Jun 06, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DESIGN] icons bootstrap -> fork awesome
parent
88290311
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
19 deletions
+22
-19
Tree.purs
src/Gargantext/Components/Forest/Tree.purs
+2
-2
Node.purs
src/Gargantext/Components/Forest/Tree/Node.purs
+4
-3
Rename.purs
...Gargantext/Components/Forest/Tree/Node/Action/Rename.purs
+12
-10
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+2
-2
Login.purs
src/Gargantext/Components/Login.purs
+1
-1
Utils.purs
src/Gargantext/Utils.purs
+1
-1
No files found.
src/Gargantext/Components/Forest/Tree.purs
View file @
0bf8fdc8
...
...
@@ -20,7 +20,7 @@ import Gargantext.Components.Forest.Tree.Node.Action (Action(..),deleteNode)
import Gargantext.Components.Forest.Tree.Node.Action.CopyFrom (loadNode)
import Gargantext.Components.Forest.Tree.Node.Action.Add (AddNodeValue(..), addNode)
import Gargantext.Components.Forest.Tree.Node.Action.Upload (uploadFile)
import Gargantext.Components.Forest.Tree.Node.Action.Rename (RenameValue(..), rename
Node
)
import Gargantext.Components.Forest.Tree.Node.Action.Rename (RenameValue(..), rename)
import Gargantext.Components.Forest.Tree.Node.Box (nodeMainSpan, Tasks, tasksStruct)
import Gargantext.Components.Forest.Tree.Node.FTree (FTree, LNode(..), NTree(..), Tree)
import Gargantext.Ends (Frontends)
...
...
@@ -205,7 +205,7 @@ performAction { reload: (_ /\ setReload)
performAction p@{ reload: (_ /\ setReload)
, session
, tree: (NTree (LNode {id}) _) } (RenameNode name) = do
void $ rename
Node
session id $ RenameValue {text:name}
void $ rename session id $ RenameValue {text:name}
performAction p RefreshTree
performAction p@{ openNodes: (_ /\ setOpenNodes)
...
...
src/Gargantext/Components/Forest/Tree/Node.purs
View file @
0bf8fdc8
...
...
@@ -61,16 +61,17 @@ instance showNodeAction :: Show NodeAction where
glyphiconNodeAction :: NodeAction -> String
glyphiconNodeAction (Documentation _) = "question-
sign
"
glyphiconNodeAction (Documentation _) = "question-
circle
"
glyphiconNodeAction Delete = "trash"
glyphiconNodeAction (Add _) = "plus"
glyphiconNodeAction SearchBox = "search"
glyphiconNodeAction Upload = "upload"
glyphiconNodeAction (Link _) = "
transfer
"
glyphiconNodeAction (Link _) = "
arrows-h
"
glyphiconNodeAction Download = "download"
glyphiconNodeAction CopyFromCorpus = "random"
glyphiconNodeAction Refresh = "refresh"
glyphiconNodeAction Config = "wrench"
glyphiconNodeAction Share = "user-plus"
glyphiconNodeAction _ = ""
...
...
@@ -110,6 +111,7 @@ settingsBox Team = SettingsBox {
, Folder
, Annuaire
]
, Share
, Delete]
}
...
...
@@ -155,7 +157,6 @@ settingsBox Corpus =
]
, Upload
, Download
--, Share
--, Move
--, Clone
, Link Annuaire
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Rename.purs
View file @
0bf8fdc8
...
...
@@ -17,10 +17,15 @@ import Gargantext.Utils.Reactix as R2
import Gargantext.Sessions (Session, get, put, post, delete)
renameNode :: Session -> ID -> RenameValue -> Aff (Array ID)
renameNode session renameNodeId =
------------------------------------------------------------------------
rename :: Session -> ID -> RenameValue -> Aff (Array ID)
rename session renameNodeId =
put session $ GR.NodeAPI GT.Node (Just renameNodeId) "rename"
renameAction :: String -> Action
renameAction newName = RenameNode newName
------------------------------------------------------------------------
newtype RenameValue = RenameValue
{ text :: String }
...
...
@@ -29,7 +34,7 @@ instance encodeJsonRenameValue :: EncodeJson RenameValue where
= "r_name" := text
~> jsonEmptyObject
------------------------------------------------------------------------
-- | START Rename Box
type TextInputBoxProps =
( id :: ID
...
...
@@ -37,14 +42,11 @@ type TextInputBoxProps =
, text :: String
, isOpen :: R.State Boolean
, boxName :: String
,
text
Action :: String -> Action
,
box
Action :: String -> Action
)
renameAction :: String -> Action
renameAction newName = RenameNode newName
textInputBox :: Record TextInputBoxProps -> R.Element
textInputBox p@{ boxName,
text
Action, dispatch, isOpen: (true /\ setIsOpen) } = R.createElement el p []
textInputBox p@{ boxName,
box
Action, dispatch, isOpen: (true /\ setIsOpen) } = R.createElement el p []
where
el = R.hooksComponent (boxName <> "Box") cpt
cpt {id, text} _ = do
...
...
@@ -71,7 +73,7 @@ textInputBox p@{ boxName, textAction, dispatch, isOpen: (true /\ setIsOpen) } =
, type: "button"
, onClick: mkEffectFn1 $ \_ -> do
setIsOpen $ const false
launchAff $ dispatch (
text
Action newName )
launchAff $ dispatch (
box
Action newName )
, title: "Submit"
} []
cancelBtn =
...
...
@@ -85,5 +87,5 @@ textInputBox p@{ boxName, isOpen: (false /\ _) } = R.createElement el p []
el = R.hooksComponent (boxName <> "Box") cpt
cpt {text} _ = pure $ H.div {} []
-- END Rename Box
--
|
END Rename Box
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
0bf8fdc8
...
...
@@ -443,13 +443,13 @@ nodePopupCpt = R.hooksComponent "G.C.F.T.N.B.nodePopupView" cpt
H.div {className: "panel-heading"}
[ R2.row
[ H.div {className: "col-md-8"}
[ textInputBox {
text
Action: renameAction, boxName: "Rename", dispatch, id, text:name, isOpen } ]
[ textInputBox {
box
Action: renameAction, boxName: "Rename", dispatch, id, text:name, isOpen } ]
, H.div {className: "flex-end"}
[ if edit then editIcon isOpen else H.div {} []
, H.div {className: "col-md-1"}
[ H.a { "type" : "button"
, className: glyphicon "
remove-circl
e"
, className: glyphicon "
window-clos
e"
, on: { click: \e -> p.onPopoverClose $ R2.unsafeEventTarget e }
, title : "Close"} []
]
...
...
src/Gargantext/Components/Login.purs
View file @
0bf8fdc8
...
...
@@ -63,7 +63,7 @@ modalCpt = R.hooksComponent "G.C.Login.modal" cpt where
[ H.h2 {className: "text-primary center m-a-2"}
[
-- H.i {className: "material-icons md-36"} [ H.text "control_point" ]
H.span {className: "icon-text"} [ H.text "Gargan
t
ext" ] ] ]
H.span {className: "icon-text"} [ H.text "Gargan
T
ext" ] ] ]
closing = H.button { "type": "button", className: "close"
, "data": { dismiss: "modal" } }
...
...
src/Gargantext/Utils.purs
View file @
0bf8fdc8
...
...
@@ -53,7 +53,7 @@ _unit :: forall s. Lens' s Unit
_unit = lens (\_ -> unit) (\s _ -> s)
glyphicon :: String -> String
glyphicon t = "btn glyphitem
glyphicon glyphicon
-" <> t
glyphicon t = "btn glyphitem
fa fa
-" <> t
glyphiconActive :: String -> Boolean -> String
glyphiconActive icon b = glyphicon icon <> if b then " active" else ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment