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
138
Issues
138
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
gargantext
purescript-gargantext
Commits
cd69d92a
Commit
cd69d92a
authored
Dec 11, 2024
by
Fabien Maniere
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
harmonize almost all tabs (node settings) and remove share url not used code
parent
14d9a18a
Changes
27
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
748 additions
and
683 deletions
+748
-683
bootstrap-darkster.css
dist/styles/bootstrap-darkster.css
+7
-2
bootstrap-default.css
dist/styles/bootstrap-default.css
+7
-2
bootstrap-greyson.css
dist/styles/bootstrap-greyson.css
+7
-2
bootstrap-herbie.css
dist/styles/bootstrap-herbie.css
+7
-2
bootstrap-monotony.css
dist/styles/bootstrap-monotony.css
+7
-2
IconButton.purs
src/Gargantext/Components/Bootstrap/Inline/IconButton.purs
+9
-1
Action.purs
src/Gargantext/Components/Forest/Tree/Node/Action.purs
+2
-2
Add.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Add.purs
+13
-7
Contact.purs
...argantext/Components/Forest/Tree/Node/Action/Contact.purs
+1
-1
Delete.purs
...Gargantext/Components/Forest/Tree/Node/Action/Delete.purs
+8
-2
Documentation.purs
...ext/Components/Forest/Tree/Node/Action/Documentation.purs
+22
-25
Download.purs
...rgantext/Components/Forest/Tree/Node/Action/Download.purs
+10
-0
Link.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Link.purs
+5
-1
ManageTeam.purs
...antext/Components/Forest/Tree/Node/Action/ManageTeam.purs
+36
-10
Merge.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Merge.purs
+5
-1
Move.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Move.purs
+5
-1
Search.purs
...Gargantext/Components/Forest/Tree/Node/Action/Search.purs
+11
-11
Share.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
+15
-3
Update.purs
...Gargantext/Components/Forest/Tree/Node/Action/Update.purs
+16
-1
Upload.purs
...Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
+353
-370
Types.purs
...text/Components/Forest/Tree/Node/Action/Upload/Types.purs
+3
-3
WriteNodesDocuments.purs
...mponents/Forest/Tree/Node/Action/WriteNodesDocuments.purs
+11
-9
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+147
-195
Settings.purs
src/Gargantext/Components/Forest/Tree/Node/Settings.purs
+16
-16
Tools.purs
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
+10
-4
Types.purs
src/Gargantext/Components/ListSelection/Types.purs
+9
-8
_styles.sass
src/sass/_legacy/_styles.sass
+6
-2
No files found.
dist/styles/bootstrap-darkster.css
View file @
cd69d92a
...
...
@@ -11053,10 +11053,10 @@ select.form-control {
display
:
flex
;
flex-direction
:
column
;
}
.node-popup-tooltip
.popup-container__header
.b-wad
.
fa-pencil
{
.node-popup-tooltip
.popup-container__header
.b-wad
.
box-wrapper-action-rename
.b-icon-button__inner
{
visibility
:
hidden
;
}
.node-popup-tooltip
.popup-container__header
.b-wad
:hover
.
fa-pencil
{
.node-popup-tooltip
.popup-container__header
.b-wad
:hover
.
box-wrapper-action-rename
.b-icon-button__inner
{
visibility
:
visible
;
}
.node-popup-tooltip
.popup-container__body
{
...
...
@@ -11105,6 +11105,11 @@ select.form-control {
.node-popup-tooltip
.popup-container
.toolbox-tab-content
{
padding
:
32px
;
}
.node-popup-tooltip
.text-sup
{
vertical-align
:
super
;
font-size
:
x-small
;
margin
:
0.33em
;
}
.table
tr
td
{
height
:
48px
;
...
...
dist/styles/bootstrap-default.css
View file @
cd69d92a
...
...
@@ -10859,10 +10859,10 @@ select.form-control {
display
:
flex
;
flex-direction
:
column
;
}
.node-popup-tooltip
.popup-container__header
.b-wad
.
fa-pencil
{
.node-popup-tooltip
.popup-container__header
.b-wad
.
box-wrapper-action-rename
.b-icon-button__inner
{
visibility
:
hidden
;
}
.node-popup-tooltip
.popup-container__header
.b-wad
:hover
.
fa-pencil
{
.node-popup-tooltip
.popup-container__header
.b-wad
:hover
.
box-wrapper-action-rename
.b-icon-button__inner
{
visibility
:
visible
;
}
.node-popup-tooltip
.popup-container__body
{
...
...
@@ -10911,6 +10911,11 @@ select.form-control {
.node-popup-tooltip
.popup-container
.toolbox-tab-content
{
padding
:
32px
;
}
.node-popup-tooltip
.text-sup
{
vertical-align
:
super
;
font-size
:
x-small
;
margin
:
0.33em
;
}
.table
tr
td
{
height
:
48px
;
...
...
dist/styles/bootstrap-greyson.css
View file @
cd69d92a
...
...
@@ -10704,10 +10704,10 @@ select.form-control {
display
:
flex
;
flex-direction
:
column
;
}
.node-popup-tooltip
.popup-container__header
.b-wad
.
fa-pencil
{
.node-popup-tooltip
.popup-container__header
.b-wad
.
box-wrapper-action-rename
.b-icon-button__inner
{
visibility
:
hidden
;
}
.node-popup-tooltip
.popup-container__header
.b-wad
:hover
.
fa-pencil
{
.node-popup-tooltip
.popup-container__header
.b-wad
:hover
.
box-wrapper-action-rename
.b-icon-button__inner
{
visibility
:
visible
;
}
.node-popup-tooltip
.popup-container__body
{
...
...
@@ -10756,6 +10756,11 @@ select.form-control {
.node-popup-tooltip
.popup-container
.toolbox-tab-content
{
padding
:
32px
;
}
.node-popup-tooltip
.text-sup
{
vertical-align
:
super
;
font-size
:
x-small
;
margin
:
0.33em
;
}
.table
tr
td
{
height
:
48px
;
...
...
dist/styles/bootstrap-herbie.css
View file @
cd69d92a
...
...
@@ -10929,10 +10929,10 @@ select.form-control {
display
:
flex
;
flex-direction
:
column
;
}
.node-popup-tooltip
.popup-container__header
.b-wad
.
fa-pencil
{
.node-popup-tooltip
.popup-container__header
.b-wad
.
box-wrapper-action-rename
.b-icon-button__inner
{
visibility
:
hidden
;
}
.node-popup-tooltip
.popup-container__header
.b-wad
:hover
.
fa-pencil
{
.node-popup-tooltip
.popup-container__header
.b-wad
:hover
.
box-wrapper-action-rename
.b-icon-button__inner
{
visibility
:
visible
;
}
.node-popup-tooltip
.popup-container__body
{
...
...
@@ -10981,6 +10981,11 @@ select.form-control {
.node-popup-tooltip
.popup-container
.toolbox-tab-content
{
padding
:
32px
;
}
.node-popup-tooltip
.text-sup
{
vertical-align
:
super
;
font-size
:
x-small
;
margin
:
0.33em
;
}
.table
tr
td
{
height
:
48px
;
...
...
dist/styles/bootstrap-monotony.css
View file @
cd69d92a
...
...
@@ -11002,10 +11002,10 @@ select.form-control {
display
:
flex
;
flex-direction
:
column
;
}
.node-popup-tooltip
.popup-container__header
.b-wad
.
fa-pencil
{
.node-popup-tooltip
.popup-container__header
.b-wad
.
box-wrapper-action-rename
.b-icon-button__inner
{
visibility
:
hidden
;
}
.node-popup-tooltip
.popup-container__header
.b-wad
:hover
.
fa-pencil
{
.node-popup-tooltip
.popup-container__header
.b-wad
:hover
.
box-wrapper-action-rename
.b-icon-button__inner
{
visibility
:
visible
;
}
.node-popup-tooltip
.popup-container__body
{
...
...
@@ -11054,6 +11054,11 @@ select.form-control {
.node-popup-tooltip
.popup-container
.toolbox-tab-content
{
padding
:
32px
;
}
.node-popup-tooltip
.text-sup
{
vertical-align
:
super
;
font-size
:
x-small
;
margin
:
0.33em
;
}
.table
tr
td
{
height
:
48px
;
...
...
src/Gargantext/Components/Bootstrap/Inline/IconButton.purs
View file @
cd69d92a
...
...
@@ -25,6 +25,7 @@ type Options =
, elevation :: Elevation
, variant :: Variant
, focusRing :: Boolean
, showLabel :: Boolean
)
options :: Record Options
...
...
@@ -36,6 +37,7 @@ options =
, elevation: Level0
, variant: Secondary
, focusRing: true
, showLabel: false
}
-- | Structural Component for a simple Glyphicon element with call-to-action
...
...
@@ -87,6 +89,8 @@ component = R.hooksComponent componentName cpt
[ bootstrapName
, bootstrapName <> "-" <> name
]
componentLabel = props.showLabel ? props.title $ ""
-- Behaviors
let
click = onClick status callback
...
...
@@ -103,7 +107,11 @@ component = R.hooksComponent componentName cpt
{ title: props.title
, className: contentClassName
}
[]
[
H.span { className: "font-family-theme text-small" } [
H.text $ " " <> componentLabel <> " "
]
]
]
]
...
...
src/Gargantext/Components/Forest/Tree/Node/Action.purs
View file @
cd69d92a
...
...
@@ -64,7 +64,7 @@ text (UpdateNode _) = "Update!"
text (ShareTeam _) = "Share with team!"
text (AddContact _) = "Add contact!"
text (SharePublic _) = "Publish!"
text (DoSearch _) = "
Launch search
!"
text (DoSearch _) = "
Search and create corpus
!"
text (UploadFile _ _ _ _ _ _ _) = "Upload File!"
text (UploadArbitraryFile _ _ _) = "Upload arbitrary file!"
text (UploadFrameCalc _ _) = "Upload frame calc"
...
...
@@ -74,6 +74,6 @@ text DownloadNode = "Download!"
text (MoveNode _) = "Move!"
text (MergeNode _) = "Merge!"
text (LinkNode _) = "Link!"
text (DocumentsFromWriteNodes _) = "
Documents from Write Nod
es!"
text (DocumentsFromWriteNodes _) = "
Generate documents from Not
es!"
text NoAction = "No Action"
-----------------------------------------------------------------------
src/Gargantext/Components/Forest/Tree/Node/Action/Add.purs
View file @
cd69d92a
...
...
@@ -9,6 +9,7 @@ import Data.String (Pattern(..), indexOf)
import Effect (Effect)
import Effect.Aff (Aff, launchAff_)
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..))
import Gargantext.Components.Forest.Tree.Node.Settings (SettingsBox(..), settingsBox)
import Gargantext.Components.Forest.Tree.Node.Tools as Tools
...
...
@@ -131,13 +132,18 @@ addNodeViewCpt = here.component "addNodeView" cpt
]
else []
pure $ Tools.panelWithSubmitButton
{ action
, dispatch
, mError: Nothing
}
(maybeChoose <> maybeEdit)
pure $
Tools.panelWithSubmitButton
{ action
, dispatch
, mError: Nothing
, iconName: "plus"
, textTitle: "Add a child node element"
}
[ H.div { className: "pt-2" }
(maybeChoose <> maybeEdit)
]
-- END Create Node
showConfig :: NodeType -> R.Element
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Contact.purs
View file @
cd69d92a
...
...
@@ -37,7 +37,7 @@ actionAddContactCpt = here.component "actionAddContact" cpt
where
cpt { dispatch, id } _ = do
pure $
Tools.panelNoFooter { mError: Nothing }
Tools.panelNoFooter { mError: Nothing
, iconName: "", textTitle: "Contact"
}
[ textInputBox
{ boxAction: AddContact
, dispatch
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Delete.purs
View file @
cd69d92a
...
...
@@ -58,7 +58,11 @@ actionDeleteUserCpt = here.component "actionDeleteUser" cpt
where
cpt _ _ = do
pure $
Tools.panelNoFooter { mError: Nothing }
Tools.panelNoFooter {
mError: Nothing
, iconName: ""
, textTitle: "Delete user"
}
[ H.div { style: { margin: "10px" } }
[ H.text $ "Yes, we are RGPD compliant."
<> " But you can not delete User Node yourself yet."
...
...
@@ -79,9 +83,11 @@ actionDeleteOtherCpt = here.component "actionDeleteOther" cpt
{ action: DeleteNode nodeType
, dispatch
, mError: Nothing
, iconName: "trash"
, textTitle: "Delete this node permanently"
}
( map (\t -> H.p {} [ H.text t ])
[ "Are you
r
sure you want to delete it ?"
[ "Are you sure you want to delete it ?"
, "If yes, click again below."
]
)
src/Gargantext/Components/Forest/Tree/Node/Action/Documentation.purs
View file @
cd69d92a
...
...
@@ -25,31 +25,28 @@ actionDocCpt = here.component "actionDoc" cpt
where
cpt { nodeType } _ = do
pure $
Tools.panelNoFooter { mError: Nothing }
([ H.div { }
[ H.h5 { className: "text-primary font-weight-normal" }
[ B.icon { name: "question-circle" }
, H.span { className: "px-1"} [ H.text "Documentation" ]
]
, H.div { className: "" }
[ H.dl { className: "row" }
[
-- node type name
H.dt { className: "text-bold col-3" } [ H.text "Node type name" ]
, H.dd { className: "col-9" }
[ H.span {className: GT.fldr nodeType true} []
, H.span {className: "mx-1"} [ H.text $ show nodeType ]
]
-- node description
, H.dt { className: "text-bold col-3" } [ H.text "Description" ]
, H.dd { className: "col-9" }
[ R.fragment (map (\info -> H.p {} [ H.text info ]) $ docOf nodeType) ]
]
]
]
-- <> (map (\info -> H.p {} [ H.text info ]) $ docOf nodeType)
])
Tools.panelNoFooter { mError: Nothing, iconName: "question-circle", textTitle: "Documentation" }
( [ H.div {}
[ H.div { className: "" }
[ H.dl { className: "row" }
[
-- node type name
H.dt { className: "text-bold col-3" } [ H.text "Node type name" ]
, H.dd { className: "col-9" }
[ H.span { className: GT.fldr nodeType true } []
, H.span { className: "mx-1" } [ H.text $ show nodeType ]
]
-- node description
, H.dt { className: "text-bold col-3" } [ H.text "Description" ]
, H.dd { className: "col-9" }
[ R.fragment (map (\info -> H.p {} [ H.text info ]) $ docOf nodeType) ]
]
]
]
-- <> (map (\info -> H.p {} [ H.text info ]) $ docOf nodeType)
]
)
-- | TODO add documentation of all NodeType
docOf :: NodeType -> Array String
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Download.purs
View file @
cd69d92a
...
...
@@ -51,6 +51,8 @@ actionDownloadCorpusCpt = here.component "actionDownloadCorpus" cpt
{ action: DownloadNode
, href
, mError: Nothing
, iconName: "download"
, textTitle: "Download the corpus"
}
[ H.div {} [ H.text "Download as JSON" ] ]
where
...
...
@@ -68,6 +70,8 @@ actionDownloadGraphCpt = here.component "actionDownloadGraph" cpt
{ action: DownloadNode
, href
, mError: Nothing
, iconName: "download"
, textTitle: "Download the graph (as a Gephi file)"
}
[ H.div {} [ H.text "Info about the Graph as GEXF format" ] ]
where
...
...
@@ -109,6 +113,8 @@ actionDownloadNodeListCpt = here.component "actionDownloadNodeList" cpt
{ action: DownloadNode
, href: href downloadFormat'
, mError: Nothing
, iconName: "download"
, textTitle: "Download the list of terms"
}
[ R2.select
{ className: "form-control"
...
...
@@ -164,6 +170,8 @@ actionDownloadNodeTextsCpt = here.component "actionDownloadNodeTexts" cpt
{ action: DownloadNode
, href: href downloadFormat'
, mError: Nothing
, iconName: "download"
, textTitle: "Download documents"
}
[ R2.select
{ className: "form-control"
...
...
@@ -217,6 +225,8 @@ actionDownloadPhyloCpt = here.component "actionDownloadPhylo" cpt
{ action: DownloadNode
, href: href downloadFormat'
, mError: Nothing
, iconName: "download"
, textTitle: "Download the phylomemy"
}
[ R2.select
{ className: "form-control"
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Link.purs
View file @
cd69d92a
...
...
@@ -80,7 +80,11 @@ linkNodeCpt' = here.component "__clone__" cpt
_ -> mempty
pure $
Tools.panel { mError: Nothing }
Tools.panel {
mError: Nothing
, iconName: "link"
, textTitle: "Link"
}
[ subTreeView
{ action
, dispatch
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/ManageTeam.purs
View file @
cd69d92a
...
...
@@ -3,7 +3,10 @@ module Gargantext.Components.Forest.Tree.Node.Action.ManageTeam where
import Data.Array (filter, null, (:))
import Data.Either (Either(..))
import Data.Maybe (Maybe(..))
import Effect (Effect)
import Effect.Aff (runAff_)
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Forest.Tree.Node.Settings (NodeAction(..), SettingsBox(..), glyphiconNodeAction, settingsBox)
import Gargantext.Components.Forest.Tree.Node.Tools as Tools
import Gargantext.Components.GraphQL.Endpoints (deleteTeamMembership, getTeam)
import Gargantext.Components.GraphQL.Team (Team, TeamMember)
...
...
@@ -17,6 +20,7 @@ import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
here :: R2.Here
here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.ManageTeam"
...
...
@@ -24,6 +28,7 @@ type ActionManageTeam =
( id :: ID
, nodeType :: NodeType
, session :: Session
, tabFocusHandler :: NodeAction -> Effect Unit
)
actionManageTeam :: R2.Component ActionManageTeam
...
...
@@ -32,7 +37,7 @@ actionManageTeam = R.createElement actionManageTeamCpt
actionManageTeamCpt :: R.Component ActionManageTeam
actionManageTeamCpt = R2.hereComponent here "actionManageTeam" hCpt
where
hCpt hp { id, session } _ = do
hCpt hp { id, session
, tabFocusHandler
} _ = do
useLoader
{ errorHandler: Nothing
, herePrefix: hp
...
...
@@ -42,6 +47,7 @@ actionManageTeamCpt = R2.hereComponent here "actionManageTeam" hCpt
{ team
, nodeId: id
, session
, tabFocusHandler
}
[]
}
...
...
@@ -50,6 +56,7 @@ type TeamProps =
( nodeId :: ID
, session :: Session
, team :: Team
, tabFocusHandler :: NodeAction -> Effect Unit
)
teamLayoutWrapper :: R2.Component TeamProps
...
...
@@ -58,11 +65,11 @@ teamLayoutWrapper = R.createElement teamLayoutWrapperCpt
teamLayoutWrapperCpt :: R.Component TeamProps
teamLayoutWrapperCpt = here.component "teamLayoutWrapper" cpt
where
cpt { nodeId, session, team: { team_owner_username, team_members } } _ = do
cpt { nodeId, session, team: { team_owner_username, team_members }
, tabFocusHandler
} _ = do
error <- T.useBox Nothing
team_members <- T.useBox team_members
pure $ teamLayoutRows { nodeId, session, team_members, error, team_owner_username }
pure $ teamLayoutRows { nodeId, session, team_members, error, team_owner_username
, tabFocusHandler
}
type TeamRowProps =
( error :: T.Box (Maybe String)
...
...
@@ -70,6 +77,7 @@ type TeamRowProps =
, session :: Session
, team_members :: T.Box (Array TeamMember)
, team_owner_username :: String
, tabFocusHandler :: NodeAction -> Effect Unit
)
teamLayoutRows :: R2.Leaf TeamRowProps
...
...
@@ -78,17 +86,35 @@ teamLayoutRows = R2.leaf teamLayoutRowsCpt
teamLayoutRowsCpt :: R.Component TeamRowProps
teamLayoutRowsCpt = here.component "teamLayoutRows" cpt
where
cpt { error, nodeId, session, team_members, team_owner_username } _ = do
cpt { error, nodeId, session, team_members, team_owner_username
, tabFocusHandler
} _ = do
team_members' <- T.useLive T.unequal team_members
error' <- T.useLive T.unequal error
let focusOnShareTab = \_ -> tabFocusHandler Share
pure $
if null team_members' then
H.div { style: { margin: "10px" } }
[ H.h4 {} [ H.text "Your team is empty, you can send some invitations." ] ]
else
Tools.panelNoFooter { mError: error' }
(makeLeader team_owner_username : (map makeTeam team_members'))
Tools.panelNoFooter {
mError: error'
, iconName: "users"
, textTitle: "Manage the team"
}
[
if null team_members' then
H.div { style: { margin: "10px" } }
[ H.p {}
[ H.text "Your team is empty, you can send some invitations ("
, B.iconButton
{ callback: focusOnShareTab
, title: "Invite a user"
-- , elevation: Level1
, name: "user-plus"
, showLabel: true
}
, H.text ")."
] ]
else
R.fragment
(makeLeader team_owner_username : (map makeTeam team_members'))
]
where
makeTeam :: TeamMember -> R.Element
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Merge.purs
View file @
cd69d92a
...
...
@@ -46,7 +46,11 @@ mergeNodeCpt = here.component "mergeNode" cpt
}
_ -> H.div {} []
pure $ Tools.panel { mError: Nothing }
pure $ Tools.panel {
mError: Nothing
, iconName: "random"
, textTitle: "Merge this list of terms with an other one"
}
[ subTreeView
{ action
, dispatch
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Move.purs
View file @
cd69d92a
...
...
@@ -72,7 +72,11 @@ moveNodeCpt' = here.component "__clone__" cpt
_ -> H.div {} []
pure $
Tools.panel { mError: Nothing }
Tools.panel {
mError: Nothing
, iconName: "arrows"
, textTitle: "Move this node"
}
[ subTreeView
{ action
, dispatch
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Search.purs
View file @
cd69d92a
...
...
@@ -62,19 +62,19 @@ actionSearchWithLangsCpt = here.component "actionSearchWithLangs" cpt
cpt { dispatch, id, langs, session } _ = do
{ errors } <- Store.use
search <- T.useBox $ defaultSearch { node_id = id }
pure $ H.div { className: "card-body toolbox-tab-content p
-5
" }
pure $ H.div { className: "card-body toolbox-tab-content p
x-5 py-4
" }
[ H.p { className: "action-search mx-2" }
[ H.text $ "Search and create a private "
<> "corpus with the search query as corpus name."
]
[ H.text $ "Search and create a private "
<> "corpus with the search query as corpus name."
]
, searchBar
{ errors
, langs
, onSearch: searchOn dispatch
, search
, session
}
[]
{ errors
, langs
, onSearch: searchOn dispatch
, search
, session
}
[]
]
where
searchOn
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
View file @
cd69d92a
...
...
@@ -101,7 +101,11 @@ shareNodeInnerCpt = here.component "shareNodeInner" cpt
text' /\ text <- R2.useBox' ""
mError' /\ mError <- R2.useBox' Nothing
pure $ Tools.panel { mError: mError' }
pure $ Tools.panel {
mError: mError'
, iconName: "user-plus"
, textTitle: "Invite user(s) to the team"
}
[ inputWithAutocomplete
{ autoFocus: true
, autocompleteSearch
...
...
@@ -160,7 +164,11 @@ publishNodeCpt = here.component "publishNode" cpt
}
_ -> H.div {} []
pure $ Tools.panel { mError: Nothing }
pure $ Tools.panel {
mError: Nothing
, iconName: ""
, textTitle: "Publish the node"
}
[ subTreeView
{ action
, dispatch
...
...
@@ -204,7 +212,11 @@ shareURLInnercpt :: R.Component (url :: String)
shareURLInnercpt = here.component "shareURLInner" cpt
where
cpt { url } _ = do
pure $ Tools.panel { mError: Nothing } [ H.div {} [ H.text url ] ]
pure $ Tools.panelNoFooter {
mError: Nothing
, iconName: "share-alt"
, textTitle: "Share the node (URL)"
} [ H.div {} [ H.text url ] ]
loadUrl :: { session :: Session, id :: NodeID, nodeType :: NodeType } -> AffRESTError String
loadUrl { session, id, nodeType } = get session $ GR.ShareURL id nodeType
src/Gargantext/Components/Forest/Tree/Node/Action/Update.purs
View file @
cd69d92a
...
...
@@ -10,6 +10,7 @@ import Data.Maybe (Maybe(..))
import Effect (Effect)
import Effect.Aff (Aff, launchAff_)
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (ComponentStatus(..))
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..))
import Gargantext.Components.Forest.Tree.Node.Tools as Tools
...
...
@@ -71,6 +72,8 @@ updateDashboardCpt = here.component "updateDashboard" cpt
{ action: UpdateNode $ UpdateNodeParamsBoard { methodBoard: methodBoard' }
, dispatch
, mError: Nothing
, iconName: ""
, textTitle: "Update the dashboard"
}
[ -- H.text "Update with"
Tools.formChoiceSafe
...
...
@@ -127,6 +130,8 @@ updateGraphCpt = here.component "updateGraph" cpt
{ action
, dispatch: callback
, mError: Nothing
, iconName: "reload-with-settings"
, textTitle: "Update the graph"
}
[ H.text "Show subjects with Order1 or concepts with Order2 ?"
, Tools.formChoiceSafe
...
...
@@ -282,8 +287,14 @@ updateCorpusCpt = here.component "updateTexts" cpt
}
, dispatch
, mError: Nothing
, iconName: "reload-with-settings"
, textTitle: "Update the corpus"
}
[ H.p {} [ H.text "Update both term and document indexing." ]
[ H.h5 { className: "text-primary font-weight-normal" }
[ B.icon { name: "reload-with-settings" }
, H.span { className: "px-1" } [ H.text "Update/resync both terms and document indexing" ]
]
-- H.p {} [ H.text "Update both term and document indexing." ]
, H.p {}
[ H.text "Term update mode"
, Tools.formChoiceSafe
...
...
@@ -312,6 +323,8 @@ updateNodeListCpt = here.component "updateNodeList" cpt
{ action: UpdateNode $ UpdateNodeParamsList { methodList: methodList' }
, dispatch
, mError: Nothing
, iconName: "reload-with-settings"
, textTitle: "Update terms"
}
[ -- H.text "Update with"
Tools.formChoiceSafe
...
...
@@ -338,6 +351,8 @@ updateTextsCpt = here.component "updateTexts" cpt
{ action: UpdateNode $ UpdateNodeParamsTexts { methodTexts: Both }
, dispatch
, mError: Nothing
, iconName: "reload-with-settings"
, textTitle: "Update documents (contexts)"
}
[] -- H.text "Update with"
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
View file @
cd69d92a
This diff is collapsed.
Click to expand it.
src/Gargantext/Components/Forest/Tree/Node/Action/Upload/Types.purs
View file @
cd69d92a
...
...
@@ -16,13 +16,13 @@ import Web.File.FileReader.Aff (readAsArrayBuffer, readAsText)
data FileType = TSV | TSV_HAL | Istex | WOS | PresseRIS | Arbitrary | JSON | Iramuteq
derive instance Generic FileType _
instance Eq FileType where
instance Eq FileType where
eq = genericEq
instance Ord FileType where
instance Ord FileType where
compare = genericCompare
instance Show FileType where
instance Show FileType where
show = genericShow
instance Read FileType where
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/WriteNodesDocuments.purs
View file @
cd69d92a
...
...
@@ -79,12 +79,12 @@ actionWriteNodesDocumentsWithLangsCpt = here.component "actionWriteNodesDocument
}
, dispatch
, mError: Nothing
, iconName: "file-text-o"
, textTitle: "Import a corpus from your Notes"
}
[ H.div
{ className: "col-12 flex-space-around" }
[ H.h4 {}
[ H.text "Will traverse all Write Nodes and insert them as documents into current corpus." ]
]
[ H.p
{ className: "form-group" }
[ H.text "Will traverse all the notes positioned under this NodeCorpus and inserts them as documents, making up your corpus." ]
,
-- lang
H.div
...
...
@@ -92,7 +92,7 @@ actionWriteNodesDocumentsWithLangsCpt = here.component "actionWriteNodesDocument
[ H.div
{ className: "form-group__label" }
[ B.label_ $
"
File lang
"
"
Please select the language of your current Notes:
"
]
, H.div
{ className: "form-group__field" }
...
...
@@ -111,7 +111,7 @@ actionWriteNodesDocumentsWithLangsCpt = here.component "actionWriteNodesDocument
[ H.div
{ className: "form-group__label" }
[ B.label_ $
"P
aragraph size (sentences)
"
"P
lease set the document size you require:
"
]
, H.div
{ className: "form-group__field" }
...
...
@@ -119,16 +119,18 @@ actionWriteNodesDocumentsWithLangsCpt = here.component "actionWriteNodesDocument
{ callback: flip T.write_ paragraphBox
, value: paragraphs'
}
, H.div { className: "small alert-light" }
[ H.text "Suggested: between 7 and 9 sentences per document" ]
]
]
,
--selection
H.div
{ className: "form-group" }
{ className: "form-group
m-0
" }
[ H.div
{ className: "form-group__label" }
[ B.label_ $
"
List selection
"
"
Please choose the list of terms to use:
"
]
, H.div
{ className: "form-group__field" }
...
...
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
cd69d92a
This diff is collapsed.
Click to expand it.
src/Gargantext/Components/Forest/Tree/Node/Settings.purs
View file @
cd69d92a
...
...
@@ -60,26 +60,26 @@ instance Eq NodeAction where
eq _ _ = false
instance Show NodeAction where
show (Add _) = "Add
Child
" -- foldl (\a b -> a <> show b) "Add " xs
show (Add _) = "Add
a child node
" -- foldl (\a b -> a <> show b) "Add " xs
show AddingContact = "AddingContact"
show CloseNodePopover = "CloseNodePopover"
show Config = "Config"
show Delete = "Delete"
show Delete = "Delete
this node
"
show (Documentation x) = "Documentation of " <> show x
show Download = "Download"
show (Link _) = "Link to " -- <> show x
show ManageTeam = "Team"
show (Merge _) = "Merge with subtree" -- <> show t
show (Move _) = "Move
with subtree params
" -- <> show t
show (Move _) = "Move
node within the tree
" -- <> show t
show (Publish _) = "Publish" -- <> show x
show Reconstruct = "Reconstruct"
show Refresh = "Refresh"
show ReloadWithSettings = "Reload (with settings)"
show SearchBox = "Search
Box
"
show ShareURL = "Share
URL
"
show Share = "
Share
"
show SearchBox = "Search
(APIs) and create a corpus
"
show ShareURL = "Share
the node (URL)
"
show Share = "
Invite user(s) to the team
"
show Upload = "Upload"
show WriteNodesDocuments = "
WriteNodesDocument
s"
show WriteNodesDocuments = "
Import a corpus from your Note
s"
glyphiconNodeAction :: NodeAction -> String
glyphiconNodeAction (Add _) = "plus"
...
...
@@ -92,7 +92,7 @@ glyphiconNodeAction Download = "download"
glyphiconNodeAction (Link _) = "arrows-h"
glyphiconNodeAction ManageTeam = "users"
glyphiconNodeAction (Merge _) = "random"
glyphiconNodeAction (Move _) = "
share-square-o
"
glyphiconNodeAction (Move _) = "
arrows
"
glyphiconNodeAction (Publish _) = fldr FolderPublic true
glyphiconNodeAction Reconstruct = "cogs"
glyphiconNodeAction Refresh = "refresh"
...
...
@@ -101,7 +101,7 @@ glyphiconNodeAction SearchBox = "search"
glyphiconNodeAction ShareURL = "share-alt"
glyphiconNodeAction Share = "user-plus"
glyphiconNodeAction Upload = "upload"
glyphiconNodeAction WriteNodesDocuments = "
bars
"
glyphiconNodeAction WriteNodesDocuments = "
file-text-o
"
glyphiconNodeAction _ = ""
------------------------------------------------------------------------
...
...
@@ -164,24 +164,24 @@ settingsBoxLens Calc =
]
settingsBoxLens Corpus =
_buttons .~
[ ReloadWithSettings
, Add
[ Graph
, Notes
, Calc
[ Add
[ Notes
, Graph
, NodeTexts
, NodeList
-- , Dashboard
, Phylo
-- , NodeFrameNotebook
, Calc
]
, Move moveParameters
, Upload
, SearchBox
, ShareURL
, WriteNodesDocuments
-- , ReloadWithSettings -- TODO
, Move moveParameters
-- , Download
, Link (linkParams Annuaire)
--
, Link (linkParams Annuaire)
, Delete
]
settingsBoxLens Dashboard =
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
View file @
cd69d92a
...
...
@@ -31,7 +31,9 @@ fragmentPT :: String -> R.Element
fragmentPT text = H.div { style: { margin: "10px" } } [ H.text text ]
type PanelProps =
(mError :: Maybe String)
( mError :: Maybe String
, iconName :: String
, textTitle :: String )
-- | Last element of panel's children goes to footer, all others go to body
panel :: R2.Component PanelProps
...
...
@@ -40,7 +42,7 @@ panel = R.createElement panelCpt
panelCpt :: R.Component PanelProps
panelCpt = here.component "panel" cpt
where
cpt { mError } children = do
cpt { mError
, iconName, textTitle
} children = do
let
errorCpt =
R2.fromMaybe mError $
...
...
@@ -52,11 +54,15 @@ panelCpt = here.component "panel" cpt
]
pure $ R.fragment
[ H.div { className: "card-body toolbox-tab-content p
-5
" }
[ H.div { className: "card-body toolbox-tab-content p
x-5 py-4
" }
[ H.div { className: "card-text" }
[ R2.row
-- TODO add type for text or form here [ H.form {className: "form-horizontal"} bodies ]
[ R2.col 12 bodies ]
[ H.h5 { className: "col text-primary font-weight-normal mb-2" }
[ B.icon { name: iconName }
, H.span { className: "px-1" } [ H.text textTitle ]
]
, R2.col 12 bodies ]
, errorCpt
]
]
...
...
src/Gargantext/Components/ListSelection/Types.purs
View file @
cd69d92a
...
...
@@ -17,23 +17,24 @@ data Selection
derive instance Generic Selection _
instance Show Selection where
show MyListsFirst
= "My lists first"
show MyListsFirst = "My lists first"
-- show OtherListsFirst = "Other lists first"
show NoList
= "No list (the analysis will not generate any terms)"
show NoList = "No list (the analysis will not generate any terms)"
show (SelectedLists _) = "Selected lists"
instance Eq Selection where
eq = genericEq
instance Read Selection where
read "My lists first"
= Just MyListsFirst
read "My lists first" = Just MyListsFirst
-- read "Other lists first" = Just OtherListsFirst
read "Selected lists" = Just $ SelectedLists []
read "NoList" = Just NoList
read _ = Nothing
read "Selected lists" = Just $ SelectedLists []
read "NoList" = Just NoList
read _ = Nothing
instance JSON.WriteForeign Selection where
writeImpl MyListsFirst
= JSON.writeImpl { "type": "MyListsFirst" }
writeImpl NoList
= JSON.writeImpl { "type": "NoList", "makeList": true }
writeImpl MyListsFirst = JSON.writeImpl { "type": "MyListsFirst" }
writeImpl NoList = JSON.writeImpl { "type": "NoList", "makeList": true }
-- writeImpl OtherListsFirst = JSON.writeImpl { "type": "OtherListsFirst" }
writeImpl (SelectedLists ids) = JSON.writeImpl { "type": "SelectedLists", value: ids }
...
...
src/sass/_legacy/_styles.sass
View file @
cd69d92a
...
...
@@ -355,11 +355,11 @@ select.form-control
&
__header
.b-wad
.
fa-pencil
.
box-wrapper-action-rename
.b-icon-button__inner
visibility
:
hidden
&
:hover
.
fa-pencil
.
box-wrapper-action-rename
.b-icon-button__inner
visibility
:
visible
...
...
@@ -416,3 +416,7 @@ select.form-control
padding
:
space-x
(
4
)
.text-sup
vertical-align
:
super
font-size
:
x-small
margin
:
.33em
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