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
07ddb913
Commit
07ddb913
authored
Apr 28, 2021
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Folder view: home button
parent
514025ca
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
23 deletions
+34
-23
FolderView.purs
src/Gargantext/Components/FolderView.purs
+10
-0
Corpus.purs
src/Gargantext/Components/Nodes/Corpus.purs
+15
-14
Frame.purs
src/Gargantext/Components/Nodes/Frame.purs
+8
-8
Table.purs
src/Gargantext/Components/Table.purs
+1
-1
No files found.
src/Gargantext/Components/FolderView.purs
View file @
07ddb913
...
@@ -111,5 +111,15 @@ backButton =
...
@@ -111,5 +111,15 @@ backButton =
H.i { className: "fa fa-arrow-left"} []
H.i { className: "fa fa-arrow-left"} []
]
]
homeButton :: R.Element
homeButton =
H.a {
className: "btn btn-primary"
, href: appPath Home
} [
H.i { className: "fa fa-home"} []
]
loadFolders :: Record Props -> Aff FTree
loadFolders :: Record Props -> Aff FTree
loadFolders {nodeId, session} = get session $ TreeFirstLevel (Just nodeId) ""
loadFolders {nodeId, session} = get session $ TreeFirstLevel (Just nodeId) ""
src/Gargantext/Components/Nodes/Corpus.purs
View file @
07ddb913
module Gargantext.Components.Nodes.Corpus where
module Gargantext.Components.Nodes.Corpus where
import
Gargantext.Prelude (class Eq, class Show, Unit, bind, discard, pure, show, unit, ($), (+), (-), (<), (<$>), (<<<), (<>), (==), (>)
)
import
DOM.Simple.Console (log2
)
import Data.Argonaut (class DecodeJson, decodeJson, encodeJson)
import Data.Argonaut (class DecodeJson, decodeJson, encodeJson)
import Data.Argonaut.Parser (jsonParser)
import Data.Argonaut.Parser (jsonParser)
import Data.Array as A
import Data.Array as A
...
@@ -11,32 +11,28 @@ import Data.Generic.Rep.Show (genericShow)
...
@@ -11,32 +11,28 @@ import Data.Generic.Rep.Show (genericShow)
import Data.List as List
import Data.List as List
import Data.Maybe (Maybe(..), fromMaybe)
import Data.Maybe (Maybe(..), fromMaybe)
import Data.Tuple (Tuple(..))
import Data.Tuple (Tuple(..))
import DOM.Simple.Console (log2)
import Effect (Effect)
import Effect (Effect)
import Effect.Aff (Aff, launchAff_, throwError)
import Effect.Aff (Aff, launchAff_, throwError)
import Effect.Class (liftEffect)
import Effect.Class (liftEffect)
import Effect.Exception (error)
import Effect.Exception (error)
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
import Gargantext.Components.FolderView as FV
import Gargantext.Components.CodeEditor as CE
import Gargantext.Components.CodeEditor as CE
import Gargantext.Components.FolderView as FV
import Gargantext.Components.InputWithEnter (inputWithEnter)
import Gargantext.Components.InputWithEnter (inputWithEnter)
import Gargantext.Components.Node (NodePoly(..), HyperdataList)
import Gargantext.Components.Node (NodePoly(..), HyperdataList)
import Gargantext.Components.Nodes.Types
( FTField, FTFieldWithIndex, FTFieldsWithIndex, Field(..), FieldType(..), Hash, Index
, defaultField, defaultHaskell', defaultJSON', defaultMarkdown', defaultPython' )
import Gargantext.Components.Nodes.Corpus.Types (CorpusData, Hyperdata(..))
import Gargantext.Components.Nodes.Corpus.Types (CorpusData, Hyperdata(..))
import Gargantext.Components.Nodes.Types (FTField, FTFieldWithIndex, FTFieldsWithIndex, Field(..), FieldType(..), Hash, Index, defaultField, defaultHaskell', defaultJSON', defaultMarkdown', defaultPython')
import Gargantext.Data.Array as GDA
import Gargantext.Data.Array as GDA
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Prelude (class Eq, class Show, Unit, bind, discard, pure, show, unit, ($), (+), (-), (<), (<$>), (<<<), (<>), (==), (>))
import Gargantext.Routes (SessionRoute(Children, NodeAPI))
import Gargantext.Routes (SessionRoute(Children, NodeAPI))
import Gargantext.Sessions (Session, get, put, sessionId)
import Gargantext.Sessions (Session, get, put, sessionId)
import Gargantext.Types (AffTableResult, NodeType(..))
import Gargantext.Types (AffTableResult, NodeType(..))
import Gargantext.Utils.Crypto as Crypto
import Gargantext.Utils.Crypto as Crypto
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2
import Gargantext.Utils.Toestand as T2
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
here :: R2.Here
here :: R2.Here
here = R2.here "Gargantext.Components.Nodes.Corpus"
here = R2.here "Gargantext.Components.Nodes.Corpus"
...
@@ -67,9 +63,14 @@ corpusLayoutMainCpt = here.component "corpusLayoutMain" cpt
...
@@ -67,9 +63,14 @@ corpusLayoutMainCpt = here.component "corpusLayoutMain" cpt
cpt { nodeId, key, session } _ = do
cpt { nodeId, key, session } _ = do
viewType <- T.useBox Folders
viewType <- T.useBox Folders
pure $ H.div{} [
pure $ H.div {} [
H.div{} [viewTypeSelector {state: viewType} ]
H.div {} [
, H.div{} [corpusLayoutSelection {state: viewType, key, session, nodeId}]
H.div { className: "row" } [
H.div { className: "col-1" } [ viewTypeSelector {state: viewType} ]
, H.div { className: "col-1" } [ FV.homeButton ]
]
]
, H.div {} [corpusLayoutSelection {state: viewType, key, session, nodeId}]
]
]
type SelectionProps =
type SelectionProps =
...
...
src/Gargantext/Components/Nodes/Frame.purs
View file @
07ddb913
module Gargantext.Components.Nodes.Frame where
module Gargantext.Components.Nodes.Frame where
import Data.Argonaut as Argonaut
import Gargantext.Prelude
import Data.Argonaut (decodeJson, (.:))
import Data.Argonaut (decodeJson, (.:))
import Data.Argonaut as Argonaut
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq)
import Data.Generic.Rep.Eq (genericEq)
import Data.Generic.Rep.Show (genericShow)
import Data.Generic.Rep.Show (genericShow)
--import Gargantext.Utils.Argonaut (genericSumDecodeJson, genericSumEncodeJson, genericEnumDecodeJson, genericEnumEncodeJson)
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..))
import Effect.Aff (Aff)
import Effect.Aff (Aff)
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
import Gargantext.Components.Node (NodePoly(..))
import Gargantext.Components.FolderView as FV
import Gargantext.Components.FolderView as FV
import Gargantext.Components.Node (NodePoly(..))
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Prelude
import Gargantext.Routes (SessionRoute(NodeAPI))
import Gargantext.Routes (SessionRoute(NodeAPI))
import Gargantext.Sessions (Session, get, sessionId)
import Gargantext.Sessions (Session, get, sessionId)
import Gargantext.Types (NodeType(..))
import Gargantext.Types (NodeType(..))
import Gargantext.Utils.Argonaut (genericSumEncodeJson)
import Gargantext.Utils.Argonaut (genericSumEncodeJson)
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2
import Gargantext.Utils.Toestand as T2
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
here :: R2.Here
here :: R2.Here
here = R2.here "Gargantext.Components.Nodes.Frame"
here = R2.here "Gargantext.Components.Nodes.Frame"
...
@@ -107,6 +106,7 @@ frameLayoutViewCpt = here.component "frameLayoutView" cpt
...
@@ -107,6 +106,7 @@ frameLayoutViewCpt = here.component "frameLayoutView" cpt
, session } _ =
, session } _ =
pure $ H.div{} [
pure $ H.div{} [
FV.backButton
FV.backButton
, FV.homeButton
, H.div { className : "frame"
, H.div { className : "frame"
, rows: "100%,*" }
, rows: "100%,*" }
[ H.iframe { src: hframeUrl nodeType base frame_id
[ H.iframe { src: hframeUrl nodeType base frame_id
...
...
src/Gargantext/Components/Table.purs
View file @
07ddb913
...
@@ -64,7 +64,7 @@ tableHeaderLayoutCpt = here.component "tableHeaderLayout" cpt
...
@@ -64,7 +64,7 @@ tableHeaderLayoutCpt = here.component "tableHeaderLayout" cpt
cacheState' <- T.useLive T.unequal cacheState
cacheState' <- T.useLive T.unequal cacheState
pure $ R.fragment
pure $ R.fragment
[ R2.row [FV.backButton]
[ R2.row [FV.backButton
, FV.homeButton
]
,
,
R2.row
R2.row
[ H.div {className: "col-md-3"} [ H.h3 {} [H.text title] ]
[ H.div {className: "col-md-3"} [ H.h3 {} [H.text title] ]
...
...
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