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
2e3c113c
Commit
2e3c113c
authored
Jun 15, 2018
by
Mael NICOLAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keep refactoring, put files in folders and things
parent
b53c931d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
30 deletions
+53
-30
Navigation.purs
src/Navigation.purs
+8
-8
UserPage.purs
src/UserPage.purs
+0
-1
Users.purs
src/Users.purs
+7
-0
Info.purs
src/Users/Info.purs
+2
-21
Types.purs
src/Users/Types.purs
+36
-0
No files found.
src/Navigation.purs
View file @
2e3c113c
...
...
@@ -33,7 +33,7 @@ import SearchForm as S
import Tabview as TV
import Thermite (PerformAction, Render, Spec, _render, cotransform, defaultPerformAction, defaultRender, focus, modifyState, simpleSpec, withState)
import Unsafe.Coerce (unsafeCoerce)
import Users
.Info as UI
import Users
as U
import GraphExplorer as GE
type E e = (dom :: DOM, ajax :: AJAX, console :: CONSOLE | e)
...
...
@@ -45,7 +45,7 @@ type AppState =
, addCorpusState :: AC.State
, docViewState :: DV.State
, searchState :: S.State
, userPage :: U
I
.State
, userPage :: U.State
, annotationdocumentView :: D.State
, ntreeView :: NT.State
, tabview :: TV.State
...
...
@@ -64,7 +64,7 @@ initAppState =
, addCorpusState : AC.initialState
, docViewState : DV.tdata
, searchState : S.initialState
, userPage : U
I
.initialState
, userPage : U.initialState
, annotationdocumentView : D.initialState
, ntreeView : NT.exampleTree
, tabview : TV.initialState
...
...
@@ -83,7 +83,7 @@ data Action
| AddCorpusA AC.Action
| DocViewA DV.Action
| SearchA S.Action
| UserPageA U
I
.Action
| UserPageA U.Action
| AnnotationDocumentViewA D.Action
| TreeViewA NT.Action
| TabViewA TV.Action
...
...
@@ -180,11 +180,11 @@ _searchAction = prism SearchA \action ->
_-> Left action
_userPageState :: Lens' AppState U
I
.State
_userPageState :: Lens' AppState U.State
_userPageState = lens (\s -> s.userPage) (\s ss -> s{userPage = ss})
_userPageAction :: Prism' Action U
I
.Action
_userPageAction :: Prism' Action U.Action
_userPageAction = prism UserPageA \action ->
case action of
UserPageA caction -> Right caction
...
...
@@ -264,7 +264,7 @@ pagesComponent s =
selectSpec Home = layout0 $ focus _landingState _landingAction (L.layoutLanding EN)
-- selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec DocView = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
selectSpec UserPage = layout0 $ focus _userPageState _userPageAction U
I
.layoutUser
selectSpec UserPage = layout0 $ focus _userPageState _userPageAction U.layoutUser
selectSpec (AnnotationDocumentView i) = layout0 $ focus _annotationdocumentviewState _annotationdocumentviewAction D.docview
selectSpec Tabview = layout0 $ focus _tabviewState _tabviewAction TV.tab1
-- To be removed
...
...
@@ -574,7 +574,7 @@ dispatchAction dispatcher _ SearchView = do
dispatchAction dispatcher _ UserPage = do
_ <- dispatcher $ SetRoute $ UserPage
_ <- dispatcher $ UserPageA $ U
I
.NoOp
_ <- dispatcher $ UserPageA $ U.NoOp
pure unit
dispatchAction dispatcher _ (AnnotationDocumentView i) = do
...
...
src/UserPage.purs
deleted
100644 → 0
View file @
b53c931d
module UserPage where
src/Users.purs
0 → 100644
View file @
2e3c113c
module Users
(module Users.Types,
module Users.Info)
where
import Users.Types
import Users.Info
src/Users/Info.purs
View file @
2e3c113c
module Users.Info
(layoutUser,
brevetSpec,
projectSpec,
facets,
module Users.Types.Types,
module Users.Types.Lens
(layoutUser
)
where
...
...
@@ -27,6 +22,7 @@ import React.DOM.Props (_data, _id, aria, className, href, role, scope, src)
import Tab (tabs)
import Thermite (PerformAction, Render, Spec, focus, modifyState, simpleSpec)
layoutUser :: forall props eff . Spec ( console :: CONSOLE
, ajax :: AJAX
, dom :: DOM
...
...
@@ -101,18 +97,3 @@ layoutUser = simpleSpec performAction render
]
]
]
brevetSpec :: forall eff props. Spec (dom :: DOM, console::CONSOLE, ajax :: AJAX | eff) State props Action
brevetSpec = focus _brevetslens _brevetsAction B.brevetsSpec
projectSpec :: forall eff props. Spec (dom :: DOM, console :: CONSOLE, ajax :: AJAX | eff) State props Action
projectSpec = focus _projectslens _projectsAction PS.projets
facets :: forall eff props. Spec ( dom :: DOM, console :: CONSOLE, ajax :: AJAX| eff) State props Action
facets = tabs _tablens _tabAction $ fromFoldable
[ Tuple "Publications(12)" publicationSpec
, Tuple "Brevets (2)" brevetSpec
, Tuple "Projets IMT (5)" projectSpec
]
src/Users/Types.purs
0 → 100644
View file @
2e3c113c
module Users.Types
(module Users.Types.Types,
module Users.Types.Lens,
brevetSpec,
projectSpec,
facets
)
where
import Users.Types.Lens
import Users.Types.Types
import Brevets as B
import Control.Monad.Aff.Console (CONSOLE)
import DOM (DOM)
import Data.List (fromFoldable)
import Data.Tuple (Tuple(..))
import Network.HTTP.Affjax (AJAX)
import Prelude (($))
import Projects as PS
import Tab (tabs)
import Thermite (Spec, focus)
brevetSpec :: forall eff props. Spec (dom :: DOM, console::CONSOLE, ajax :: AJAX | eff) State props Action
brevetSpec = focus _brevetslens _brevetsAction B.brevetsSpec
projectSpec :: forall eff props. Spec (dom :: DOM, console :: CONSOLE, ajax :: AJAX | eff) State props Action
projectSpec = focus _projectslens _projectsAction PS.projets
facets :: forall eff props. Spec ( dom :: DOM, console :: CONSOLE, ajax :: AJAX| eff) State props Action
facets = tabs _tablens _tabAction $ fromFoldable
[ Tuple "Publications(12)" publicationSpec
, Tuple "Brevets (2)" brevetSpec
, Tuple "Projets IMT (5)" projectSpec
]
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