Commit cd469dce authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[router] add reloadMainPage box

This is to trigger reloading of main page.
parent 21383650
...@@ -55,8 +55,8 @@ removeTaskFromList ts (GT.AsyncTaskWithType { task: GT.AsyncTask { id: id' } }) ...@@ -55,8 +55,8 @@ removeTaskFromList ts (GT.AsyncTaskWithType { task: GT.AsyncTask { id: id' } })
A.filter (\(GT.AsyncTaskWithType { task: GT.AsyncTask { id: id'' } }) -> id' /= id'') ts A.filter (\(GT.AsyncTaskWithType { task: GT.AsyncTask { id: id'' } }) -> id' /= id'') ts
type ReductorProps = ( type ReductorProps = (
reloadForest :: T.Box T2.Reload reloadForest :: T2.ReloadS
, reloadRoot :: T.Box T2.Reload , reloadRoot :: T2.ReloadS
, storage :: Storage , storage :: Storage
) )
......
...@@ -20,8 +20,9 @@ type App = ...@@ -20,8 +20,9 @@ type App =
, forestOpen :: OpenNodes , forestOpen :: OpenNodes
, graphVersion :: T2.Reload , graphVersion :: T2.Reload
, handed :: Handed , handed :: Handed
, reloadForest :: Int , reloadForest :: T2.Reload
, reloadRoot :: Int , reloadMainPage :: T2.Reload
, reloadRoot :: T2.Reload
, route :: AppRoute , route :: AppRoute
, sessions :: Sessions , sessions :: Sessions
, showCorpus :: Boolean , showCorpus :: Boolean
...@@ -41,6 +42,7 @@ emptyApp = ...@@ -41,6 +42,7 @@ emptyApp =
, graphVersion : T2.newReload , graphVersion : T2.newReload
, handed : RightHanded , handed : RightHanded
, reloadForest : T2.newReload , reloadForest : T2.newReload
, reloadMainPage : T2.newReload
, reloadRoot : T2.newReload , reloadRoot : T2.newReload
, route : Home , route : Home
, sessions : Sessions.empty , sessions : Sessions.empty
...@@ -59,8 +61,9 @@ type Boxes = ...@@ -59,8 +61,9 @@ type Boxes =
, forestOpen :: T.Box OpenNodes , forestOpen :: T.Box OpenNodes
, graphVersion :: T2.ReloadS , graphVersion :: T2.ReloadS
, handed :: T.Box Handed , handed :: T.Box Handed
, reloadForest :: T.Box T2.Reload , reloadForest :: T2.ReloadS
, reloadRoot :: T.Box T2.Reload , reloadMainPage :: T2.ReloadS
, reloadRoot :: T2.ReloadS
, route :: T.Box AppRoute , route :: T.Box AppRoute
, sessions :: T.Box Sessions , sessions :: T.Box Sessions
, showCorpus :: T.Box Boolean , showCorpus :: T.Box Boolean
......
...@@ -34,14 +34,15 @@ here = R2.here "Gargantext.Components.Forest" ...@@ -34,14 +34,15 @@ here = R2.here "Gargantext.Components.Forest"
type Common = type Common =
( frontends :: Frontends ( frontends :: Frontends
, handed :: T.Box Handed , handed :: T.Box Handed
, reloadRoot :: T.Box T2.Reload , reloadMainPage :: T2.ReloadS
, reloadRoot :: T2.ReloadS
, route :: T.Box AppRoute , route :: T.Box AppRoute
) )
type Props = type Props =
( backend :: T.Box (Maybe Backend) ( backend :: T.Box (Maybe Backend)
, forestOpen :: T.Box OpenNodes , forestOpen :: T.Box OpenNodes
, reloadForest :: T.Box T2.Reload , reloadForest :: T2.ReloadS
, sessions :: T.Box Sessions , sessions :: T.Box Sessions
, showLogin :: T.Box Boolean , showLogin :: T.Box Boolean
, showTree :: T.Box Boolean , showTree :: T.Box Boolean
...@@ -64,6 +65,7 @@ forestCpt = here.component "forest" cpt where ...@@ -64,6 +65,7 @@ forestCpt = here.component "forest" cpt where
, frontends , frontends
, handed , handed
, reloadForest , reloadForest
, reloadMainPage
, reloadRoot , reloadRoot
, route , route
, sessions , sessions
...@@ -103,6 +105,7 @@ forestCpt = here.component "forest" cpt where ...@@ -103,6 +105,7 @@ forestCpt = here.component "forest" cpt where
, frontends , frontends
, handed: handed' , handed: handed'
, reload: reloadForest , reload: reloadForest
, reloadMainPage
, reloadRoot , reloadRoot
, root: treeId , root: treeId
, route , route
...@@ -160,7 +163,8 @@ forestLayoutMain = R.createElement forestLayoutMainCpt ...@@ -160,7 +163,8 @@ forestLayoutMain = R.createElement forestLayoutMainCpt
forestLayoutMainCpt :: R.Component Props forestLayoutMainCpt :: R.Component Props
forestLayoutMainCpt = here.component "forestLayoutMain" cpt where forestLayoutMainCpt = here.component "forestLayoutMain" cpt where
cpt props children = pure $ forestLayoutRaw props [ mainPage {} children ] cpt props@{ reloadMainPage } children =
pure $ forestLayoutRaw props [ mainPage { reloadMainPage } children ]
forestLayoutRaw :: R2.Component Props forestLayoutRaw :: R2.Component Props
forestLayoutRaw = R.createElement forestLayoutRawCpt forestLayoutRaw = R.createElement forestLayoutRawCpt
...@@ -171,6 +175,7 @@ forestLayoutRawCpt = here.component "forestLayoutRaw" cpt where ...@@ -171,6 +175,7 @@ forestLayoutRawCpt = here.component "forestLayoutRaw" cpt where
, forestOpen , forestOpen
, frontends , frontends
, reloadForest , reloadForest
, reloadMainPage
, reloadRoot , reloadRoot
, route , route
, sessions , sessions
...@@ -190,6 +195,7 @@ forestLayoutRawCpt = here.component "forestLayoutRaw" cpt where ...@@ -190,6 +195,7 @@ forestLayoutRawCpt = here.component "forestLayoutRaw" cpt where
, forestOpen , forestOpen
, handed , handed
, reloadForest , reloadForest
, reloadMainPage
, reloadRoot , reloadRoot
, route , route
, sessions , sessions
...@@ -197,15 +203,20 @@ forestLayoutRawCpt = here.component "forestLayoutRaw" cpt where ...@@ -197,15 +203,20 @@ forestLayoutRawCpt = here.component "forestLayoutRaw" cpt where
, showLogin , showLogin
, tasks } [] , tasks } []
mainPage :: R2.Component () type MainPage =
( reloadMainPage :: T2.ReloadS )
mainPage :: R2.Component MainPage
mainPage = R.createElement mainPageCpt mainPage = R.createElement mainPageCpt
-- mainPageCpt :: R.Memo () -- mainPageCpt :: R.Memo ()
-- mainPageCpt = R.memo (here.component "mainPage" cpt) where -- mainPageCpt = R.memo (here.component "mainPage" cpt) where
mainPageCpt :: R.Component () mainPageCpt :: R.Component MainPage
mainPageCpt = here.component "mainPage" cpt mainPageCpt = here.component "mainPage" cpt
where where
cpt _ children = do cpt { reloadMainPage } children = do
reloadMainPage' <- T.useLive T.unequal reloadMainPage
pure $ H.div { className: "col-md-10" } pure $ H.div { className: "col-md-10" }
[ H.div { id: "page-wrapper" } [ H.div { id: "page-wrapper" }
[ H.div { className: "container-fluid" } children ] [ H.div { className: "container-fluid" } children ]
......
...@@ -6,7 +6,6 @@ import Data.Array as A ...@@ -6,7 +6,6 @@ import Data.Array as A
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Set as Set import Data.Set as Set
import Data.Traversable (traverse_, traverse) import Data.Traversable (traverse_, traverse)
import Data.Tuple (snd)
import DOM.Simple.Console (log, log2) import DOM.Simple.Console (log, log2)
import Effect (Effect) import Effect (Effect)
import Effect.Aff (Aff) import Effect.Aff (Aff)
...@@ -47,7 +46,8 @@ here = R2.here "Gargantext.Components.Forest.Tree" ...@@ -47,7 +46,8 @@ here = R2.here "Gargantext.Components.Forest.Tree"
-- Shared by every component here + performAction + nodeSpan -- Shared by every component here + performAction + nodeSpan
type Universal = type Universal =
( reloadRoot :: T.Box T2.Reload ) ( reloadMainPage :: T2.ReloadS
, reloadRoot :: T2.ReloadS )
-- Shared by every component here + nodeSpan -- Shared by every component here + nodeSpan
type Global = type Global =
...@@ -60,7 +60,7 @@ type Global = ...@@ -60,7 +60,7 @@ type Global =
-- Shared by every component here -- Shared by every component here
type Common = ( type Common = (
forestOpen :: T.Box OpenNodes forestOpen :: T.Box OpenNodes
, reload :: T.Box T2.Reload , reload :: T2.ReloadS
| Global | Global
) )
...@@ -90,7 +90,7 @@ getNodeTree session nodeId = get session $ GR.NodeAPI GT.Tree (Just nodeId) "" ...@@ -90,7 +90,7 @@ getNodeTree session nodeId = get session $ GR.NodeAPI GT.Tree (Just nodeId) ""
getNodeTreeFirstLevel :: Session -> ID -> Aff FTree getNodeTreeFirstLevel :: Session -> ID -> Aff FTree
getNodeTreeFirstLevel session nodeId = get session $ GR.TreeFirstLevel (Just nodeId) "" getNodeTreeFirstLevel session nodeId = get session $ GR.TreeFirstLevel (Just nodeId) ""
type NodeProps = ( reloadTree :: T.Box T2.Reload, session :: Session | Common ) type NodeProps = ( reloadTree :: T2.ReloadS, session :: Session | Common )
type TreeProps = ( tree :: FTree | NodeProps ) type TreeProps = ( tree :: FTree | NodeProps )
...@@ -102,25 +102,18 @@ treeCpt = here.component "tree" cpt where ...@@ -102,25 +102,18 @@ treeCpt = here.component "tree" cpt where
cpt p@{ reload, session, tree: NTree (LNode { id, name, nodeType }) children } _ = do cpt p@{ reload, session, tree: NTree (LNode { id, name, nodeType }) children } _ = do
setPopoverRef <- R.useRef Nothing setPopoverRef <- R.useRef Nothing
folderOpen <- T2.useMemberBox nodeId p.forestOpen folderOpen <- T2.useMemberBox nodeId p.forestOpen
folderOpen' <- T.useLive T.unequal folderOpen pure $ H.ul { className: ulClass }
pure $ H.ul { className: ulClass <> " " <> handedClass } [ H.li { className: childrenClass children' }
[ H.li { className: childrenClass children }
[ nodeSpan (nsprops { folderOpen, name, id, nodeType, setPopoverRef, isLeaf }) [ nodeSpan (nsprops { folderOpen, name, id, nodeType, setPopoverRef, isLeaf })
(renderChildren folderOpen') [ renderChildren (Record.merge p { childProps: { children', folderOpen, render: tree } } ) [] ]
] ]
] ]
where where
isLeaf = A.null children isLeaf = A.null children
nodeId = mkNodeId session id nodeId = mkNodeId session id
ulClass = switchHanded "ml" "mr" p.handed <> "-auto tree" ulClass = switchHanded "ml left" "mr right" p.handed <> "-auto tree handed"
handedClass = switchHanded "left" "right" p.handed <> "handed"
children' = A.sortWith fTreeID pubChildren children' = A.sortWith fTreeID pubChildren
pubChildren = if isPublic nodeType then map (map pub) children else children pubChildren = if isPublic nodeType then map (map pub) children else children
renderChildren false = []
renderChildren true = map renderChild children' where
renderChild (NTree (LNode {id: cId}) _) = childLoader props [] where
props = Record.merge nodeProps { id: cId, render: tree }
nodeProps = RecordE.pick p :: Record NodeProps
nsprops extra = Record.merge common extra' where nsprops extra = Record.merge common extra' where
common = RecordE.pick p :: Record NSCommon common = RecordE.pick p :: Record NSCommon
extra' = Record.merge extra { dispatch, reload } where extra' = Record.merge extra { dispatch, reload } where
...@@ -131,10 +124,47 @@ treeCpt = here.component "tree" cpt where ...@@ -131,10 +124,47 @@ treeCpt = here.component "tree" cpt where
childrenClass [] = "no-children" childrenClass [] = "no-children"
childrenClass _ = "with-children" childrenClass _ = "with-children"
type ChildrenTreeProps =
( childProps :: { children' :: Array FTree
, folderOpen :: T.Box Boolean
, render :: R2.Leaf TreeProps }
| TreeProps )
renderChildren :: R2.Component ChildrenTreeProps
renderChildren = R.createElement renderChildrenCpt
renderChildrenCpt :: R.Component ChildrenTreeProps
renderChildrenCpt = here.component "renderChildren" cpt where
cpt p@{ childProps: { folderOpen } } _ = do
folderOpen' <- T.useLive T.unequal folderOpen
if folderOpen' then
pure $ renderTreeChildren p []
else
pure $ H.div {} []
renderTreeChildren :: R2.Component ChildrenTreeProps
renderTreeChildren = R.createElement renderTreeChildrenCpt
renderTreeChildrenCpt :: R.Component ChildrenTreeProps
renderTreeChildrenCpt = here.component "renderTreeChildren" cpt where
cpt p@{ childProps: { children'
, folderOpen
, render } } _ = do
pure $ R.fragment (map renderChild children')
where
nodeProps = RecordE.pick p :: Record NodeProps
renderChild (NTree (LNode {id: cId}) _) = childLoader props [] where
props = Record.merge nodeProps { id: cId, render }
--- The properties tree shares in common with performAction --- The properties tree shares in common with performAction
type PACommon = type PACommon =
( forestOpen :: T.Box OpenNodes ( forestOpen :: T.Box OpenNodes
, reloadTree :: T.Box T2.Reload , reloadTree :: T2.ReloadS
, session :: Session , session :: Session
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
, tree :: FTree , tree :: FTree
...@@ -155,7 +185,7 @@ childLoaderCpt :: R.Component ChildLoaderProps ...@@ -155,7 +185,7 @@ childLoaderCpt :: R.Component ChildLoaderProps
childLoaderCpt = here.component "childLoader" cpt where childLoaderCpt = here.component "childLoader" cpt where
cpt p@{ render } _ = do cpt p@{ render } _ = do
reload <- T.useBox T2.newReload reload <- T.useBox T2.newReload
let reloads = [ reload, p.reloadTree, p.reloadRoot ] let reloads = [ reload, p.reloadRoot, p.reloadTree ]
cache <- (A.cons p.id) <$> traverse (T.useLive T.unequal) reloads cache <- (A.cons p.id) <$> traverse (T.useLive T.unequal) reloads
useLoader cache fetch (paint reload) useLoader cache fetch (paint reload)
where where
......
...@@ -51,8 +51,9 @@ type NodeMainSpanProps = ...@@ -51,8 +51,9 @@ type NodeMainSpanProps =
, isLeaf :: IsLeaf , isLeaf :: IsLeaf
, name :: Name , name :: Name
, nodeType :: GT.NodeType , nodeType :: GT.NodeType
, reload :: T.Box T2.Reload , reload :: T2.ReloadS
, reloadRoot :: T.Box T2.Reload , reloadMainPage :: T2.ReloadS
, reloadRoot :: T2.ReloadS
, route :: T.Box Routes.AppRoute , route :: T.Box Routes.AppRoute
, setPopoverRef :: R.Ref (Maybe (Boolean -> Effect Unit)) , setPopoverRef :: R.Ref (Maybe (Boolean -> Effect Unit))
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
...@@ -84,7 +85,7 @@ nodeMainSpanCpt = here.component "nodeMainSpan" cpt ...@@ -84,7 +85,7 @@ nodeMainSpanCpt = here.component "nodeMainSpan" cpt
, isLeaf , isLeaf
, name , name
, nodeType , nodeType
, reload , reloadMainPage
, reloadRoot , reloadRoot
, route , route
, session , session
...@@ -153,7 +154,7 @@ nodeMainSpanCpt = here.component "nodeMainSpan" cpt ...@@ -153,7 +154,7 @@ nodeMainSpanCpt = here.component "nodeMainSpan" cpt
T2.reload reloadRoot T2.reload reloadRoot
else if GAT.asyncTaskTTriggersTreeReload t then do else if GAT.asyncTaskTTriggersTreeReload t then do
here.log2 "reloading tree for task" t here.log2 "reloading tree for task" t
T2.reload reload T2.reload reloadMainPage
else do else do
here.log2 "task doesn't trigger a reload" t here.log2 "task doesn't trigger a reload" t
pure unit pure unit
......
...@@ -43,7 +43,7 @@ here = R2.here "Gargantext.Components.GraphExplorer.Sidebar" ...@@ -43,7 +43,7 @@ here = R2.here "Gargantext.Components.GraphExplorer.Sidebar"
type Common = ( type Common = (
graphId :: NodeID graphId :: NodeID
, metaData :: GET.MetaData , metaData :: GET.MetaData
, reloadForest :: T.Box T2.Reload , reloadForest :: T2.ReloadS
, removedNodeIds :: T.Box SigmaxT.NodeIds , removedNodeIds :: T.Box SigmaxT.NodeIds
, selectedNodeIds :: T.Box SigmaxT.NodeIds , selectedNodeIds :: T.Box SigmaxT.NodeIds
, session :: Session , session :: Session
...@@ -313,7 +313,7 @@ type DeleteNodes = ...@@ -313,7 +313,7 @@ type DeleteNodes =
( graphId :: NodeID ( graphId :: NodeID
, metaData :: GET.MetaData , metaData :: GET.MetaData
, nodes :: Array (Record SigmaxT.Node) , nodes :: Array (Record SigmaxT.Node)
, reloadForest :: T.Box T2.Reload , reloadForest :: T2.ReloadS
, session :: Session , session :: Session
, termList :: TermList , termList :: TermList
) )
......
...@@ -259,8 +259,8 @@ tableContainerCpt { dispatch ...@@ -259,8 +259,8 @@ tableContainerCpt { dispatch
type CommonProps = ( type CommonProps = (
afterSync :: Unit -> Aff Unit afterSync :: Unit -> Aff Unit
, reloadForest :: T.Box T2.Reload , reloadForest :: T2.ReloadS
, reloadRoot :: T.Box T2.Reload , reloadRoot :: T2.ReloadS
, tabNgramType :: CTabNgramType , tabNgramType :: CTabNgramType
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
, withAutoUpdate :: Boolean , withAutoUpdate :: Boolean
......
...@@ -56,8 +56,8 @@ type TabsProps = ...@@ -56,8 +56,8 @@ type TabsProps =
, contactData :: ContactData , contactData :: ContactData
, frontends :: Frontends , frontends :: Frontends
, nodeId :: Int , nodeId :: Int
, reloadForest :: T.Box T2.Reload , reloadForest :: T2.ReloadS
, reloadRoot :: T.Box T2.Reload , reloadRoot :: T2.ReloadS
, session :: Session , session :: Session
, sidePanel :: T.Box (Maybe (Record TextsT.SidePanel)) , sidePanel :: T.Box (Maybe (Record TextsT.SidePanel))
, sidePanelState :: T.Box SidePanelState , sidePanelState :: T.Box SidePanelState
...@@ -133,8 +133,8 @@ ngramsViewCpt = here.component "ngramsView" cpt where ...@@ -133,8 +133,8 @@ ngramsViewCpt = here.component "ngramsView" cpt where
type NTCommon = type NTCommon =
( cacheState :: T.Box LTypes.CacheState ( cacheState :: T.Box LTypes.CacheState
, defaultListId :: Int , defaultListId :: Int
, reloadForest :: T.Box T2.Reload , reloadForest :: T2.ReloadS
, reloadRoot :: T.Box T2.Reload , reloadRoot :: T2.ReloadS
, session :: Session , session :: Session
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
) )
...@@ -154,8 +154,8 @@ listElement = H.li { className: "list-group-item justify-content-between" } ...@@ -154,8 +154,8 @@ listElement = H.li { className: "list-group-item justify-content-between" }
type LayoutNoSessionProps = type LayoutNoSessionProps =
( frontends :: Frontends ( frontends :: Frontends
, nodeId :: Int , nodeId :: Int
, reloadForest :: T.Box T2.Reload , reloadForest :: T2.ReloadS
, reloadRoot :: T.Box T2.Reload , reloadRoot :: T2.ReloadS
, sidePanel :: T.Box (Maybe (Record TT.SidePanel)) , sidePanel :: T.Box (Maybe (Record TT.SidePanel))
, sidePanelState :: T.Box SidePanelState , sidePanelState :: T.Box SidePanelState
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
......
...@@ -148,8 +148,8 @@ type BasicProps = ...@@ -148,8 +148,8 @@ type BasicProps =
) )
type ReloadProps = type ReloadProps =
( reloadForest :: T.Box T2.Reload ( reloadForest :: T2.ReloadS
, reloadRoot :: T.Box T2.Reload , reloadRoot :: T2.ReloadS
| BasicProps | BasicProps
) )
...@@ -228,7 +228,7 @@ contactLayoutWithKeyCpt = here.component "contactLayoutWithKey" cpt where ...@@ -228,7 +228,7 @@ contactLayoutWithKeyCpt = here.component "contactLayoutWithKey" cpt where
, reloadRoot , reloadRoot
, tasks } ] , tasks } ]
where where
onUpdateHyperdata :: T.Box T2.Reload -> HyperdataContact -> Effect Unit onUpdateHyperdata :: T2.ReloadS -> HyperdataContact -> Effect Unit
onUpdateHyperdata reload hd = onUpdateHyperdata reload hd =
launchAff_ $ launchAff_ $
saveContactHyperdata session nodeId hd *> liftEffect (T2.reload reload) saveContactHyperdata session nodeId hd *> liftEffect (T2.reload reload)
......
...@@ -53,8 +53,8 @@ type TabsProps = ( ...@@ -53,8 +53,8 @@ type TabsProps = (
, contactData :: ContactData' , contactData :: ContactData'
, frontends :: Frontends , frontends :: Frontends
, nodeId :: Int , nodeId :: Int
, reloadForest :: T.Box T2.Reload , reloadForest :: T2.ReloadS
, reloadRoot :: T.Box T2.Reload , reloadRoot :: T2.ReloadS
, session :: Session , session :: Session
, sidePanel :: T.Box (Maybe (Record TTypes.SidePanel)) , sidePanel :: T.Box (Maybe (Record TTypes.SidePanel))
, sidePanelState :: T.Box SidePanelState , sidePanelState :: T.Box SidePanelState
...@@ -134,8 +134,8 @@ type NgramsViewTabsProps = ( ...@@ -134,8 +134,8 @@ type NgramsViewTabsProps = (
, defaultListId :: Int , defaultListId :: Int
, mode :: Mode , mode :: Mode
, nodeId :: Int , nodeId :: Int
, reloadForest :: T.Box T2.Reload , reloadForest :: T2.ReloadS
, reloadRoot :: T.Box T2.Reload , reloadRoot :: T2.ReloadS
, session :: Session , session :: Session
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
) )
......
...@@ -40,8 +40,8 @@ listsWithSessionContextCpt = here.component "listsWithSessionContext" cpt where ...@@ -40,8 +40,8 @@ listsWithSessionContextCpt = here.component "listsWithSessionContext" cpt where
type CommonPropsNoSession = type CommonPropsNoSession =
( nodeId :: Int ( nodeId :: Int
, reloadForest :: T.Box T2.Reload , reloadForest :: T2.ReloadS
, reloadRoot :: T.Box T2.Reload , reloadRoot :: T2.ReloadS
, sessionUpdate :: Session -> Effect Unit , sessionUpdate :: Session -> Effect Unit
, sidePanel :: T.Box (Maybe (Record SidePanel)) , sidePanel :: T.Box (Maybe (Record SidePanel))
, sidePanelState :: T.Box GT.SidePanelState , sidePanelState :: T.Box GT.SidePanelState
......
...@@ -37,8 +37,8 @@ type Props = ( ...@@ -37,8 +37,8 @@ type Props = (
cacheState :: T.Box CacheState cacheState :: T.Box CacheState
, corpusData :: CorpusData , corpusData :: CorpusData
, corpusId :: Int , corpusId :: Int
, reloadForest :: T.Box T2.Reload , reloadForest :: T2.ReloadS
, reloadRoot :: T.Box T2.Reload , reloadRoot :: T2.ReloadS
, session :: Session , session :: Session
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
) )
......
...@@ -148,6 +148,7 @@ forestCpt = here.component "forest" cpt where ...@@ -148,6 +148,7 @@ forestCpt = here.component "forest" cpt where
, forestOpen , forestOpen
, handed , handed
, reloadForest , reloadForest
, reloadMainPage
, reloadRoot , reloadRoot
, route , route
, sessions , sessions
...@@ -162,6 +163,7 @@ forestCpt = here.component "forest" cpt where ...@@ -162,6 +163,7 @@ forestCpt = here.component "forest" cpt where
, frontends: defaultFrontends , frontends: defaultFrontends
, handed , handed
, reloadForest , reloadForest
, reloadMainPage
, reloadRoot , reloadRoot
, route , route
, sessions , sessions
......
...@@ -644,14 +644,6 @@ asyncTaskTypePath UpdateNgramsCharts = "ngrams/async/charts/update/" ...@@ -644,14 +644,6 @@ asyncTaskTypePath UpdateNgramsCharts = "ngrams/async/charts/update/"
asyncTaskTypePath UpdateNode = "update/" asyncTaskTypePath UpdateNode = "update/"
asyncTaskTypePath UploadFile = "async/file/add/" asyncTaskTypePath UploadFile = "async/file/add/"
asyncTaskTriggersAppReload :: AsyncTaskType -> Boolean
asyncTaskTriggersAppReload _ = true
asyncTaskTriggersTreeReload :: AsyncTaskType -> Boolean
asyncTaskTriggersTreeReload Form = true
asyncTaskTriggersTreeReload UploadFile = true
asyncTaskTriggersTreeReload _ = false
type AsyncTaskID = String type AsyncTaskID = String
......
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