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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
603253c7
Commit
603253c7
authored
Mar 20, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://gitlab.iscpif.fr:20022/gargantext/purescript-gargantext
parents
4c1429cd
3b021b7f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
AnnotationDocumentView.purs
src/AnnotationDocumentView.purs
+1
-1
Navigation.purs
src/Navigation.purs
+14
-14
PageRouter.purs
src/PageRouter.purs
+3
-3
No files found.
src/DocumentView.purs
→
src/
Annotation
DocumentView.purs
View file @
603253c7
module DocumentView where
module
Annotation
DocumentView where
import Prelude hiding (div)
import React (ReactElement)
...
...
src/Navigation.purs
View file @
603253c7
...
...
@@ -23,7 +23,7 @@ import React.DOM.Props as RP
import SearchForm as S
import Thermite (PerformAction, Render, Spec, _render, defaultRender, focus, modifyState, simpleSpec, withState)
import UserPage as UP
import DocumentView as D
import
Annotation
DocumentView as D
type E e = (dom :: DOM, ajax :: AJAX, console :: CONSOLE | e)
...
...
@@ -35,7 +35,7 @@ type AppState =
, docViewState :: DV.State
, searchState :: S.State
, userPage :: UP.State
, documentView :: D.State
,
annotation
documentView :: D.State
}
initAppState :: AppState
...
...
@@ -47,7 +47,7 @@ initAppState =
, docViewState : DV.tdata
, searchState : S.initialState
, userPage : UP.initialState
, documentView : D.initialState
,
annotation
documentView : D.initialState
}
data Action
...
...
@@ -59,7 +59,7 @@ data Action
| DocViewA DV.Action
| SearchA S.Action
| UserPageA UP.Action
| DocumentViewA D.Action
|
Annotation
DocumentViewA D.Action
performAction :: forall eff props. PerformAction ( dom :: DOM
...
...
@@ -139,14 +139,14 @@ _userPageAction = prism UserPageA \action ->
_-> Left action
_documentviewState :: Lens' AppState D.State
_
documentviewState = lens (\s -> s.documentView) (\s ss -> s{
documentView = ss})
_
annotation
documentviewState :: Lens' AppState D.State
_
annotationdocumentviewState = lens (\s -> s.annotationdocumentView) (\s ss -> s{annotation
documentView = ss})
_documentviewAction :: Prism' Action D.Action
_
documentviewAction = prism
DocumentViewA \action ->
_
annotation
documentviewAction :: Prism' Action D.Action
_
annotationdocumentviewAction = prism Annotation
DocumentViewA \action ->
case action of
DocumentViewA caction -> Right caction
Annotation
DocumentViewA caction -> Right caction
_-> Left action
...
...
@@ -169,7 +169,7 @@ pagesComponent s =
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec DocView = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
selectSpec UserPage = layout0 $ focus _userPageState _userPageAction UP.layoutUser
selectSpec (
DocumentView i) = layout0 $ focus _documentviewState _
documentviewAction D.docview
selectSpec (
AnnotationDocumentView i) = layout0 $ focus _annotationdocumentviewState _annotation
documentviewAction D.docview
-- To be removed
selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec
...
...
@@ -438,7 +438,7 @@ dispatchAction dispatcher _ UserPage = do
_ <- dispatcher $ UserPageA $ UP.NoOp
pure unit
dispatchAction dispatcher _ (DocumentView i) = do
_ <- dispatcher $ SetRoute $ DocumentView i
_ <- dispatcher $
UserPageA $ UP
.NoOp
dispatchAction dispatcher _ (
Annotation
DocumentView i) = do
_ <- dispatcher $ SetRoute $
Annotation
DocumentView i
_ <- dispatcher $
AnnotationDocumentViewA $ D
.NoOp
pure unit
src/PageRouter.purs
View file @
603253c7
...
...
@@ -22,7 +22,7 @@ data Routes
| DocView
| SearchView
| UserPage
| DocumentView Int
|
Annotation
DocumentView Int
instance showRoutes :: Show Routes where
...
...
@@ -32,7 +32,7 @@ instance showRoutes :: Show Routes where
show DocView = "DocView"
show SearchView = "SearchView"
show UserPage = "UserPage"
show (DocumentView i) = "DocumentView"
show (
Annotation
DocumentView i) = "DocumentView"
int :: Match Int
int = floor <$> num
...
...
@@ -48,7 +48,7 @@ routing =
<|> addcorpusRoute
<|> home
where
documentView = DocumentView <$> (route "documentView" *> int)
documentView =
Annotation
DocumentView <$> (route "documentView" *> int)
userPageRoute = UserPage <$ route "userPage"
searchRoute = SearchView <$ route "search"
docviewRoute = DocView <$ route "docView"
...
...
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