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
24d13487
Commit
24d13487
authored
Nov 09, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TABS] adding Trash Tab
parent
5ea13175
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
15 deletions
+34
-15
Actions.purs
src/Gargantext/Pages/Corpus/Tabs/Actions.purs
+11
-3
Authors.purs
src/Gargantext/Pages/Corpus/Tabs/Authors.purs
+1
-2
Sources.purs
src/Gargantext/Pages/Corpus/Tabs/Sources.purs
+1
-2
Specs.purs
src/Gargantext/Pages/Corpus/Tabs/Specs.purs
+14
-6
States.purs
src/Gargantext/Pages/Corpus/Tabs/States.purs
+6
-0
Terms.purs
src/Gargantext/Pages/Corpus/Tabs/Terms.purs
+1
-2
No files found.
src/Gargantext/Pages/Corpus/Tabs/Actions.purs
View file @
24d13487
...
@@ -5,9 +5,10 @@ import Data.Lens (Prism', prism)
...
@@ -5,9 +5,10 @@ import Data.Lens (Prism', prism)
import Data.Either (Either(..))
import Data.Either (Either(..))
import Gargantext.Pages.Corpus.Tabs.Documents as DV
import Gargantext.Pages.Corpus.Tabs.Documents as DV
import Gargantext.Pages.Corpus.Tabs.Sources as SV
import Gargantext.Pages.Corpus.Tabs.Sources as SV
import Gargantext.Pages.Corpus.Tabs.Authors as AV
import Gargantext.Pages.Corpus.Tabs.Authors as AV
import Gargantext.Pages.Corpus.Tabs.Terms as TV
import Gargantext.Pages.Corpus.Tabs.Terms as TV
import Gargantext.Pages.Corpus.Tabs.Trash as TT
import Gargantext.Components.Tab as Tab
import Gargantext.Components.Tab as Tab
data Action
data Action
...
@@ -15,6 +16,7 @@ data Action
...
@@ -15,6 +16,7 @@ data Action
| SourceviewA SV.Action
| SourceviewA SV.Action
| AuthorviewA AV.Action
| AuthorviewA AV.Action
| TermsviewA TV.Action
| TermsviewA TV.Action
| TrashviewA TT.Action
| TabViewA Tab.Action
| TabViewA Tab.Action
_docAction :: Prism' Action DV.Action
_docAction :: Prism' Action DV.Action
...
@@ -41,6 +43,12 @@ _termsAction = prism TermsviewA \ action ->
...
@@ -41,6 +43,12 @@ _termsAction = prism TermsviewA \ action ->
TermsviewA laction -> Right laction
TermsviewA laction -> Right laction
_-> Left action
_-> Left action
_trashAction :: Prism' Action TT.Action
_trashAction = prism TrashviewA \action ->
case action of
TrashviewA laction -> Right laction
_ -> Left action
_tabAction :: Prism' Action Tab.Action
_tabAction :: Prism' Action Tab.Action
_tabAction = prism TabViewA \ action ->
_tabAction = prism TabViewA \ action ->
case action of
case action of
...
...
src/Gargantext/Pages/Corpus/Tabs/Authors.purs
View file @
24d13487
...
@@ -16,5 +16,4 @@ authorSpec :: Spec State {} Action
...
@@ -16,5 +16,4 @@ authorSpec :: Spec State {} Action
authorSpec = simpleSpec defaultPerformAction render
authorSpec = simpleSpec defaultPerformAction render
where
where
render :: Render State {} Action
render :: Render State {} Action
render dispatch _ state _ =
render dispatch _ state _ = []
[ h3 [] [text "AuthorView"]]
src/Gargantext/Pages/Corpus/Tabs/Sources.purs
View file @
24d13487
...
@@ -16,5 +16,4 @@ sourceSpec :: Spec State {} Action
...
@@ -16,5 +16,4 @@ sourceSpec :: Spec State {} Action
sourceSpec = simpleSpec defaultPerformAction render
sourceSpec = simpleSpec defaultPerformAction render
where
where
render :: Render State {} Action
render :: Render State {} Action
render dispatch _ state _ =
render dispatch _ state _ = []
[ h3 [] [text "Source view"]]
src/Gargantext/Pages/Corpus/Tabs/Specs.purs
View file @
24d13487
...
@@ -6,14 +6,15 @@ import Data.List (fromFoldable)
...
@@ -6,14 +6,15 @@ import Data.List (fromFoldable)
import Data.Tuple (Tuple(..))
import Data.Tuple (Tuple(..))
import Gargantext.Pages.Corpus.Tabs.Types (Props)
import Gargantext.Pages.Corpus.Tabs.Types (Props)
import Gargantext.Pages.Corpus.Tabs.States (State(), _doclens, _sourcelens, _authorlens, _termslens, _tablens, initialState)
import Gargantext.Pages.Corpus.Tabs.States (State(), _doclens, _sourcelens, _authorlens, _termslens, _tablens, initialState
, _trashlens
)
import Gargantext.Pages.Corpus.Tabs.Actions (Action(), _docAction, _sourceAction, _authorAction, _termsAction, _tabAction)
import Gargantext.Pages.Corpus.Tabs.Actions (Action(), _docAction, _sourceAction, _authorAction, _termsAction, _tabAction
, _trashAction
)
import Gargantext.Pages.Corpus.Tabs.Documents as DV
import Gargantext.Pages.Corpus.Tabs.Documents as DV
import Gargantext.Pages.Corpus.Tabs.Sources as SV
import Gargantext.Pages.Corpus.Tabs.Sources as SV
import Gargantext.Pages.Corpus.Tabs.Authors as AV
import Gargantext.Pages.Corpus.Tabs.Authors as AV
import Gargantext.Pages.Corpus.Tabs.Terms as TV
import Gargantext.Pages.Corpus.Tabs.Terms as TV
import Gargantext.Components.Tab as Tab
import Gargantext.Pages.Corpus.Tabs.Trash as TT
import Gargantext.Components.Tab as Tab
import Thermite (Spec, focus, hideState, cmapProps)
import Thermite (Spec, focus, hideState, cmapProps)
...
@@ -26,6 +27,7 @@ statefulTabs =
...
@@ -26,6 +27,7 @@ statefulTabs =
, Tuple "Authors" authorPageSpec
, Tuple "Authors" authorPageSpec
, Tuple "Sources" sourcePageSpec
, Tuple "Sources" sourcePageSpec
, Tuple "Terms" termsPageSpec
, Tuple "Terms" termsPageSpec
, Tuple "Trash" trashPageSpec
]
]
docPageSpec :: Spec State Props Action
docPageSpec :: Spec State Props Action
...
@@ -42,3 +44,9 @@ sourcePageSpec = cmapProps (const {}) (focus _sourcelens _sourceAction SV.source
...
@@ -42,3 +44,9 @@ sourcePageSpec = cmapProps (const {}) (focus _sourcelens _sourceAction SV.source
termsPageSpec :: Spec State Props Action
termsPageSpec :: Spec State Props Action
termsPageSpec = cmapProps (const {}) (focus _termslens _termsAction TV.termsSpec)
termsPageSpec = cmapProps (const {}) (focus _termslens _termsAction TV.termsSpec)
<> docPageSpec
<> docPageSpec
trashPageSpec :: Spec State Props Action
trashPageSpec = cmapProps (const {}) (focus _trashlens _trashAction TT.spec)
<> docPageSpec
src/Gargantext/Pages/Corpus/Tabs/States.purs
View file @
24d13487
...
@@ -5,6 +5,7 @@ import Gargantext.Pages.Corpus.Tabs.Documents as D
...
@@ -5,6 +5,7 @@ import Gargantext.Pages.Corpus.Tabs.Documents as D
import Gargantext.Pages.Corpus.Tabs.Sources as S
import Gargantext.Pages.Corpus.Tabs.Sources as S
import Gargantext.Pages.Corpus.Tabs.Authors as A
import Gargantext.Pages.Corpus.Tabs.Authors as A
import Gargantext.Pages.Corpus.Tabs.Terms as T
import Gargantext.Pages.Corpus.Tabs.Terms as T
import Gargantext.Pages.Corpus.Tabs.Trash as TT
import Gargantext.Components.Tab as Tab
import Gargantext.Components.Tab as Tab
...
@@ -13,6 +14,7 @@ type State =
...
@@ -13,6 +14,7 @@ type State =
, authorsView :: A.State
, authorsView :: A.State
, sourcesView :: S.State
, sourcesView :: S.State
, termsView :: T.State
, termsView :: T.State
, trashView :: TT.State
, activeTab :: Int
, activeTab :: Int
}
}
...
@@ -22,6 +24,7 @@ initialState =
...
@@ -22,6 +24,7 @@ initialState =
, authorsView : A.initialState
, authorsView : A.initialState
, sourcesView : S.initialState
, sourcesView : S.initialState
, termsView : T.initialState
, termsView : T.initialState
, trashView : TT.initialState
, activeTab : 0
, activeTab : 0
}
}
...
@@ -37,5 +40,8 @@ _sourcelens = lens (\s -> s.sourcesView) (\s ss -> s {sourcesView = ss})
...
@@ -37,5 +40,8 @@ _sourcelens = lens (\s -> s.sourcesView) (\s ss -> s {sourcesView = ss})
_termslens :: Lens' State T.State
_termslens :: Lens' State T.State
_termslens = lens (\s -> s.termsView) (\s ss -> s {termsView = ss})
_termslens = lens (\s -> s.termsView) (\s ss -> s {termsView = ss})
_trashlens :: Lens' State TT.State
_trashlens = lens (\s -> s.trashView) (\s ss -> s {trashView = ss})
_tablens :: Lens' State Tab.State
_tablens :: Lens' State Tab.State
_tablens = lens (\s -> s.activeTab) (\s ss -> s {activeTab = ss})
_tablens = lens (\s -> s.activeTab) (\s ss -> s {activeTab = ss})
src/Gargantext/Pages/Corpus/Tabs/Terms.purs
View file @
24d13487
...
@@ -17,5 +17,4 @@ termsSpec :: Spec State {} Action
...
@@ -17,5 +17,4 @@ termsSpec :: Spec State {} Action
termsSpec = simpleSpec defaultPerformAction render
termsSpec = simpleSpec defaultPerformAction render
where
where
render :: Render State {} Action
render :: Render State {} Action
render dispatch _ state _ =
render dispatch _ state _ = []
[ h3 [] [text "Terms view"]]
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