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 Prelude hiding (div)
import React (ReactElement)
import React (ReactElement)
...
...
src/Navigation.purs
View file @
603253c7
...
@@ -23,7 +23,7 @@ import React.DOM.Props as RP
...
@@ -23,7 +23,7 @@ import React.DOM.Props as RP
import SearchForm as S
import SearchForm as S
import Thermite (PerformAction, Render, Spec, _render, defaultRender, focus, modifyState, simpleSpec, withState)
import Thermite (PerformAction, Render, Spec, _render, defaultRender, focus, modifyState, simpleSpec, withState)
import UserPage as UP
import UserPage as UP
import DocumentView as D
import
Annotation
DocumentView as D
type E e = (dom :: DOM, ajax :: AJAX, console :: CONSOLE | e)
type E e = (dom :: DOM, ajax :: AJAX, console :: CONSOLE | e)
...
@@ -35,7 +35,7 @@ type AppState =
...
@@ -35,7 +35,7 @@ type AppState =
, docViewState :: DV.State
, docViewState :: DV.State
, searchState :: S.State
, searchState :: S.State
, userPage :: UP.State
, userPage :: UP.State
, documentView :: D.State
,
annotation
documentView :: D.State
}
}
initAppState :: AppState
initAppState :: AppState
...
@@ -47,7 +47,7 @@ initAppState =
...
@@ -47,7 +47,7 @@ initAppState =
, docViewState : DV.tdata
, docViewState : DV.tdata
, searchState : S.initialState
, searchState : S.initialState
, userPage : UP.initialState
, userPage : UP.initialState
, documentView : D.initialState
,
annotation
documentView : D.initialState
}
}
data Action
data Action
...
@@ -59,7 +59,7 @@ data Action
...
@@ -59,7 +59,7 @@ data Action
| DocViewA DV.Action
| DocViewA DV.Action
| SearchA S.Action
| SearchA S.Action
| UserPageA UP.Action
| UserPageA UP.Action
| DocumentViewA D.Action
|
Annotation
DocumentViewA D.Action
performAction :: forall eff props. PerformAction ( dom :: DOM
performAction :: forall eff props. PerformAction ( dom :: DOM
...
@@ -139,14 +139,14 @@ _userPageAction = prism UserPageA \action ->
...
@@ -139,14 +139,14 @@ _userPageAction = prism UserPageA \action ->
_-> Left action
_-> Left action
_documentviewState :: Lens' AppState D.State
_
annotation
documentviewState :: Lens' AppState D.State
_
documentviewState = lens (\s -> s.documentView) (\s ss -> s{
documentView = ss})
_
annotationdocumentviewState = lens (\s -> s.annotationdocumentView) (\s ss -> s{annotation
documentView = ss})
_documentviewAction :: Prism' Action D.Action
_
annotation
documentviewAction :: Prism' Action D.Action
_
documentviewAction = prism
DocumentViewA \action ->
_
annotationdocumentviewAction = prism Annotation
DocumentViewA \action ->
case action of
case action of
DocumentViewA caction -> Right caction
Annotation
DocumentViewA caction -> Right caction
_-> Left action
_-> Left action
...
@@ -169,7 +169,7 @@ pagesComponent s =
...
@@ -169,7 +169,7 @@ pagesComponent s =
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec DocView = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
selectSpec DocView = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
selectSpec UserPage = layout0 $ focus _userPageState _userPageAction UP.layoutUser
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
-- To be removed
selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec
selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec
...
@@ -438,7 +438,7 @@ dispatchAction dispatcher _ UserPage = do
...
@@ -438,7 +438,7 @@ dispatchAction dispatcher _ UserPage = do
_ <- dispatcher $ UserPageA $ UP.NoOp
_ <- dispatcher $ UserPageA $ UP.NoOp
pure unit
pure unit
dispatchAction dispatcher _ (DocumentView i) = do
dispatchAction dispatcher _ (
Annotation
DocumentView i) = do
_ <- dispatcher $ SetRoute $ DocumentView i
_ <- dispatcher $ SetRoute $
Annotation
DocumentView i
_ <- dispatcher $
UserPageA $ UP
.NoOp
_ <- dispatcher $
AnnotationDocumentViewA $ D
.NoOp
pure unit
pure unit
src/PageRouter.purs
View file @
603253c7
...
@@ -22,7 +22,7 @@ data Routes
...
@@ -22,7 +22,7 @@ data Routes
| DocView
| DocView
| SearchView
| SearchView
| UserPage
| UserPage
| DocumentView Int
|
Annotation
DocumentView Int
instance showRoutes :: Show Routes where
instance showRoutes :: Show Routes where
...
@@ -32,7 +32,7 @@ instance showRoutes :: Show Routes where
...
@@ -32,7 +32,7 @@ instance showRoutes :: Show Routes where
show DocView = "DocView"
show DocView = "DocView"
show SearchView = "SearchView"
show SearchView = "SearchView"
show UserPage = "UserPage"
show UserPage = "UserPage"
show (DocumentView i) = "DocumentView"
show (
Annotation
DocumentView i) = "DocumentView"
int :: Match Int
int :: Match Int
int = floor <$> num
int = floor <$> num
...
@@ -48,7 +48,7 @@ routing =
...
@@ -48,7 +48,7 @@ routing =
<|> addcorpusRoute
<|> addcorpusRoute
<|> home
<|> home
where
where
documentView = DocumentView <$> (route "documentView" *> int)
documentView =
Annotation
DocumentView <$> (route "documentView" *> int)
userPageRoute = UserPage <$ route "userPage"
userPageRoute = UserPage <$ route "userPage"
searchRoute = SearchView <$ route "search"
searchRoute = SearchView <$ route "search"
docviewRoute = DocView <$ route "docView"
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