Commit 6c570965 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[Clean] removing deprecated DocView.

parent 3eee8b32
...@@ -36,10 +36,6 @@ dispatchAction dispatcher _ AddCorpus = do ...@@ -36,10 +36,6 @@ dispatchAction dispatcher _ AddCorpus = do
dispatcher $ SetRoute AddCorpus dispatcher $ SetRoute AddCorpus
dispatcher $ AddCorpusA AC.LoadDatabaseDetails dispatcher $ AddCorpusA AC.LoadDatabaseDetails
dispatchAction dispatcher _ (DocView n) = do
dispatcher $ SetRoute (DocView n)
dispatcher $ DocViewA $ D.LoadData n
dispatchAction dispatcher _ (Corpus n) = do dispatchAction dispatcher _ (Corpus n) = do
dispatcher $ SetRoute $ Corpus n dispatcher $ SetRoute $ Corpus n
dispatcher $ CorpusAction $ Corpus.Load n dispatcher $ CorpusAction $ Corpus.Load n
......
...@@ -35,7 +35,6 @@ data Action ...@@ -35,7 +35,6 @@ data Action
| SearchA S.Action | SearchA S.Action
| Search String | Search String
| AddCorpusA AC.Action | AddCorpusA AC.Action
| DocViewA DV.Action
| GraphExplorerA GE.Action | GraphExplorerA GE.Action
| DocumentViewA D.Action | DocumentViewA D.Action
| AnnuaireAction Annuaire.Action | AnnuaireAction Annuaire.Action
...@@ -79,27 +78,12 @@ performAction Initialize _ state = void do ...@@ -79,27 +78,12 @@ performAction Initialize _ state = void do
Right d -> do Right d -> do
_ <- modifyState $ _ { initialized = true, ntreeState = d} _ <- modifyState $ _ { initialized = true, ntreeState = d}
pure unit pure unit
-- page <- lift $ DV.loadPage
-- case page of
-- Left err -> do
-- pure unit
-- Right docs -> void do
-- modifyState $ _ { initialized = true
-- , ntreeState = d
-- -- if length d > 0
-- -- then Tree.exampleTree
-- -- --then fnTransform $ unsafePartial $ fromJust $ head d
-- -- else Tree.initialState
--
-- , docViewState = docs
-- }
_ -> do _ -> do
pure unit pure unit
performAction (LoginA _) _ _ = pure unit performAction (LoginA _) _ _ = pure unit
performAction (AddCorpusA _) _ _ = pure unit performAction (AddCorpusA _) _ _ = pure unit
performAction (CorpusAction _) _ _ = pure unit performAction (CorpusAction _) _ _ = pure unit
performAction (DocViewA _) _ _ = pure unit
performAction (SearchA _) _ _ = pure unit performAction (SearchA _) _ _ = pure unit
performAction (UserPageA _) _ _ = pure unit performAction (UserPageA _) _ _ = pure unit
performAction (DocumentViewA _) _ _ = pure unit performAction (DocumentViewA _) _ _ = pure unit
...@@ -127,12 +111,6 @@ _corpusAction = prism CorpusAction \action -> ...@@ -127,12 +111,6 @@ _corpusAction = prism CorpusAction \action ->
CorpusAction caction -> Right caction CorpusAction caction -> Right caction
_-> Left action _-> Left action
_docViewAction :: Prism' Action DV.Action
_docViewAction = prism DocViewA \action ->
case action of
DocViewA caction -> Right caction
_-> Left action
_searchAction :: Prism' Action S.Action _searchAction :: Prism' Action S.Action
_searchAction = prism SearchA \action -> _searchAction = prism SearchA \action ->
case action of case action of
......
...@@ -25,10 +25,10 @@ import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV ...@@ -25,10 +25,10 @@ import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
import Gargantext.Pages.Corpus.Doc.Facets.Graph as GE import Gargantext.Pages.Corpus.Doc.Facets.Graph as GE
import Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsTable as NG import Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsTable as NG
import Gargantext.Pages.Home as L import Gargantext.Pages.Home as L
import Gargantext.Pages.Layout.Actions (Action(..), _corpusAction, _addCorpusAction, _docAnnotationViewAction, _docViewAction, _graphExplorerAction, _loginAction, _searchAction, _treeAction, _userPageAction, performAction, _annuaireAction) import Gargantext.Pages.Layout.Actions (Action(..), _corpusAction, _addCorpusAction, _docAnnotationViewAction, _graphExplorerAction, _loginAction, _searchAction, _treeAction, _userPageAction, performAction, _annuaireAction)
import Gargantext.Pages.Layout.Specs.AddCorpus as AC import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.Search as S import Gargantext.Pages.Layout.Specs.Search as S
import Gargantext.Pages.Layout.States (AppState, _corpusState, _addCorpusState, _docAnnotationViewState, _docViewState, _graphExplorerState, _loginState, _searchState, _treeState, _userPageState, _annuaireState) import Gargantext.Pages.Layout.States (AppState, _corpusState, _addCorpusState, _docAnnotationViewState, _graphExplorerState, _loginState, _searchState, _treeState, _userPageState, _annuaireState)
import Gargantext.Router (Routes(..)) import Gargantext.Router (Routes(..))
layoutSpec :: Spec AppState {} Action layoutSpec :: Spec AppState {} Action
...@@ -68,7 +68,6 @@ pagesComponent s = case s.currentRoute of ...@@ -68,7 +68,6 @@ pagesComponent s = case s.currentRoute of
selectSpec (UserPage i) = layout0 $ focus _userPageState _userPageAction U.layoutUser selectSpec (UserPage i) = layout0 $ focus _userPageState _userPageAction U.layoutUser
-- To be removed -- To be removed
selectSpec NGramsTable = layout0 $ noState NG.ngramsTableSpec selectSpec NGramsTable = layout0 $ noState NG.ngramsTableSpec
selectSpec (DocView i) = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
-- selectSpec _ = simpleSpec defaultPerformAction defaultRender -- selectSpec _ = simpleSpec defaultPerformAction defaultRender
......
...@@ -19,7 +19,6 @@ data Routes ...@@ -19,7 +19,6 @@ data Routes
| Folder Int | Folder Int
| Corpus Int | Corpus Int
| AddCorpus | AddCorpus
| DocView Int
| Document Int | Document Int
| PGraphExplorer | PGraphExplorer
| NGramsTable | NGramsTable
...@@ -34,7 +33,6 @@ routing = ...@@ -34,7 +33,6 @@ routing =
<|> AddCorpus <$ route "addCorpus" <|> AddCorpus <$ route "addCorpus"
<|> Folder <$> (route "folder" *> int) <|> Folder <$> (route "folder" *> int)
<|> Corpus <$> (route "corpus" *> int) <|> Corpus <$> (route "corpus" *> int)
<|> DocView <$> (route "docView" *> int)
<|> NGramsTable <$ route "ngrams" <|> NGramsTable <$ route "ngrams"
<|> Document <$> (route "document" *> int) <|> Document <$> (route "document" *> int)
<|> Dashboard <$ route "dashboard" <|> Dashboard <$ route "dashboard"
...@@ -56,7 +54,6 @@ instance showRoutes :: Show Routes where ...@@ -56,7 +54,6 @@ instance showRoutes :: Show Routes where
show (UserPage i) = "User" <> show i show (UserPage i) = "User" <> show i
show (Document i)= "Document" show (Document i)= "Document"
show (Corpus i) = "Corpus" <> show i show (Corpus i) = "Corpus" <> show i
show (DocView i) = "DocView"
show NGramsTable = "NGramsTable" show NGramsTable = "NGramsTable"
show (Annuaire i) = "Annuaire" <> show i show (Annuaire i) = "Annuaire" <> show i
show (Folder i) = "Folder" <> show i show (Folder i) = "Folder" <> show i
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment