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
b3bf8672
Commit
b3bf8672
authored
Apr 16, 2018
by
Mael NICOLAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first commit starting to create fake dashboard view
parent
55d5f541
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
8 deletions
+33
-8
Dashboard.purs
src/Dashboard.purs
+23
-0
Navigation.purs
src/Navigation.purs
+10
-8
No files found.
src/Dashboard.purs
0 → 100644
View file @
b3bf8672
module Dashboard where
import DOM (DOM)
import Data.Unit (Unit)
import Prelude (pure, unit, void)
import React.DOM (text)
import Thermite (PerformAction, Render, Spec, simpleSpec)
type State = Unit
data Action = None
initialState :: State
initialState = unit
performAction :: forall eff props. PerformAction (dom :: DOM | eff) State props Action
performAction _ _ _ = pure unit
render :: forall props. Render State props Action
render dispatch _ state _ = [text "Dashboard"]
layoutDashboard :: forall props eff. Spec (dom :: DOM | eff) State props Action
layoutDashboard = simpleSpec performAction render
src/Navigation.purs
View file @
b3bf8672
...
...
@@ -32,6 +32,7 @@ import Tabview as TV
import Thermite (PerformAction, Render, Spec, _render, cotransform, defaultRender, focus, modifyState, simpleSpec, withState)
import Unsafe.Coerce (unsafeCoerce)
import UserPage as UP
import Dashboard as Dsh
type E e = (dom :: DOM, ajax :: AJAX, console :: CONSOLE | e)
...
...
@@ -48,6 +49,7 @@ type AppState =
, tabview :: TV.State
, search :: String
, corpusAnalysis :: CA.State
, dashboard :: Dsh.State
}
initAppState :: AppState
...
...
@@ -64,6 +66,7 @@ initAppState =
, tabview : TV.initialState
, search : ""
, corpusAnalysis : CA.initialState
, dashboard : Dsh.initialState
}
data Action
...
...
@@ -214,7 +217,6 @@ _corpusAction = prism CorpusAnalysisA \action ->
CorpusAnalysisA caction -> Right caction
_-> Left action
pagesComponent :: forall props eff. AppState -> Spec (E eff) AppState props Action
pagesComponent s =
case s.currentRoute of
...
...
@@ -229,13 +231,13 @@ pagesComponent s =
| eff
) AppState props Action
selectSpec CorpusAnalysis = layout0 $ focus _corpusState _corpusAction CA.spec'
selectSpec Login
= focus _loginState _loginAction LN.renderSpec
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 UP.layoutUser
selectSpec (AnnotationDocumentView i)
= layout0 $ focus _annotationdocumentviewState _annotationdocumentviewAction D.docview
selectSpec Tabview
= layout0 $ focus _tabviewState _tabviewAction TV.tab1
selectSpec Login = focus _loginState _loginAction LN.renderSpec
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 UP.layoutUser
selectSpec (AnnotationDocumentView i) = layout0 $ focus _annotationdocumentviewState _annotationdocumentviewAction D.docview
selectSpec Tabview = layout0 $ focus _tabviewState _tabviewAction TV.tab1
-- To be removed
selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec
...
...
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