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
Allen Lee
purescript-gargantext
Commits
ec64201f
Unverified
Commit
ec64201f
authored
Sep 20, 2018
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide Brevet state
parent
df3a2470
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
31 deletions
+6
-31
Brevets.purs
src/Gargantext/Pages/Corpus/User/Brevets.purs
+4
-16
Types.purs
src/Gargantext/Pages/Corpus/User/Users/Types.purs
+2
-2
Lens.purs
src/Gargantext/Pages/Corpus/User/Users/Types/Lens.purs
+0
-9
States.purs
src/Gargantext/Pages/Corpus/User/Users/Types/States.purs
+0
-4
No files found.
src/Gargantext/Pages/Corpus/User/Brevets.purs
View file @
ec64201f
module Gargantext.Pages.Corpus.User.Brevets where
module Gargantext.Pages.Corpus.User.Brevets where
import Prelude
import Prelude
import Data.Void
import Thermite (Render, Spec, defaultPerformAction, simpleSpec)
import Thermite (PerformAction, Render, Spec, modifyState, simpleSpec)
brevetsSpec :: Spec {} {} Void
type State = String
brevetsSpec = simpleSpec defaultPerformAction render
initialState :: State
initialState = ""
type Action = Void
performAction :: PerformAction State {} Action
performAction action _ _ = absurd action
brevetsSpec :: Spec State {} Action
brevetsSpec = simpleSpec performAction render
where
where
render :: Render
State {} Action
render :: Render
{} {} Void
render dispatch _ state _ =
render dispatch _ state _ =
[]
[]
src/Gargantext/Pages/Corpus/User/Users/Types.purs
View file @
ec64201f
...
@@ -18,10 +18,10 @@ import Data.List (fromFoldable)
...
@@ -18,10 +18,10 @@ import Data.List (fromFoldable)
import Data.Tuple (Tuple(..))
import Data.Tuple (Tuple(..))
import Gargantext.Pages.Folder as PS
import Gargantext.Pages.Folder as PS
import Gargantext.Components.Tab (tabs)
import Gargantext.Components.Tab (tabs)
import Thermite (Spec, focus)
import Thermite (Spec, focus
, noState
)
brevetSpec :: Spec State {} Action
brevetSpec :: Spec State {} Action
brevetSpec =
focus _brevetslens _brevetsAction
B.brevetsSpec
brevetSpec =
noState
B.brevetsSpec
projectSpec :: Spec State {} Action
projectSpec :: Spec State {} Action
projectSpec = focus _projectslens _projectsAction PS.projets
projectSpec = focus _projectslens _projectsAction PS.projets
...
...
src/Gargantext/Pages/Corpus/User/Users/Types/Lens.purs
View file @
ec64201f
...
@@ -35,15 +35,6 @@ _pubAction = prism PublicationA \ action ->
...
@@ -35,15 +35,6 @@ _pubAction = prism PublicationA \ action ->
publicationSpec :: Spec State {} Action
publicationSpec :: Spec State {} Action
publicationSpec = focus _publens _pubAction P.publicationSpec
publicationSpec = focus _publens _pubAction P.publicationSpec
_brevetslens :: Lens' State B.State
_brevetslens = lens (\s -> s.brevets) (\s ss -> s {brevets = ss})
_brevetsAction :: Prism' Action B.Action
_brevetsAction = prism BrevetsA \ action ->
case action of
BrevetsA laction -> Right laction
_-> Left action
_projectslens :: Lens' State PS.State
_projectslens :: Lens' State PS.State
_projectslens = lens (\s -> s.projects) (\s ss -> s {projects = ss})
_projectslens = lens (\s -> s.projects) (\s ss -> s {projects = ss})
...
...
src/Gargantext/Pages/Corpus/User/Users/Types/States.purs
View file @
ec64201f
module Gargantext.Pages.Corpus.User.Users.Types.States where
module Gargantext.Pages.Corpus.User.Users.Types.States where
import Gargantext.Pages.Corpus.User.Brevets as B
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..))
import Gargantext.Pages.Corpus.User.Users.Types.Types (User)
import Gargantext.Pages.Corpus.User.Users.Types.Types (User)
import Gargantext.Pages.Folder as PS
import Gargantext.Pages.Folder as PS
...
@@ -10,7 +9,6 @@ import Gargantext.Components.Tab as Tab
...
@@ -10,7 +9,6 @@ import Gargantext.Components.Tab as Tab
data Action
data Action
= NoOp
= NoOp
| PublicationA P.Action
| PublicationA P.Action
| BrevetsA B.Action
| ProjectsA PS.Action
| ProjectsA PS.Action
| TabA Tab.Action
| TabA Tab.Action
| FetchUser Int
| FetchUser Int
...
@@ -18,7 +16,6 @@ data Action
...
@@ -18,7 +16,6 @@ data Action
type State =
type State =
{ activeTab :: Int
{ activeTab :: Int
, publications :: P.State
, publications :: P.State
, brevets :: B.State
, projects :: PS.State
, projects :: PS.State
, user :: Maybe User
, user :: Maybe User
}
}
...
@@ -27,7 +24,6 @@ initialState :: State
...
@@ -27,7 +24,6 @@ initialState :: State
initialState =
initialState =
{ activeTab : 0
{ activeTab : 0
, publications : P.initialState
, publications : P.initialState
, brevets : B.initialState
, projects : PS.initialState
, projects : PS.initialState
, user: Nothing
, user: Nothing
}
}
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