Commit 53f08d0c authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[cache] some cache work

parent b479e52c
......@@ -91,7 +91,7 @@ annuaireCpt = R.hooksComponentWithModule thisModule "annuaire" cpt
cpt {session, path, info: info@(AnnuaireInfo {name, date: date'}), frontends} _ = do
pagePath <- R.useState' $ initialPagePath (fst path)
cacheState <- R.useState' NT.CacheOn
cacheState <- R.useState' NT.CacheOff
pure $ R.fragment
[ T.tableHeaderLayout { afterCacheStateChange: \_ -> launchAff_ $ clearCache unit
......
......@@ -49,7 +49,7 @@ listsLayoutWithKeyCpt = R.hooksComponentWithModule thisModule "listsLayoutWithKe
cpt { nodeId, session } _ = do
let path = { nodeId, session }
cacheState <- R.useState' NT.CacheOn
cacheState <- R.useState' NT.CacheOff
useLoader path loadCorpusWithChild $
\corpusData@{ corpusId, corpusNode: NodePoly poly, defaultListId } ->
......
......@@ -56,7 +56,7 @@ textsLayoutWithKeyCpt :: R.Component KeyProps
textsLayoutWithKeyCpt = R.hooksComponentWithModule thisModule "textsLayoutWithKey" cpt
where
cpt { frontends, nodeId, session } _ = do
cacheState <- R.useState' NT.CacheOn
cacheState <- R.useState' NT.CacheOff
pure $ loader {session, nodeId} loadCorpusWithChild $
\corpusData@{ corpusId, corpusNode, defaultListId } -> do
......
......@@ -120,26 +120,26 @@ tableHeaderLayoutCpt = R.hooksComponentWithModule thisModule "tableHeaderLayout"
[ H.div {className: "jumbotron1", style: {padding: "12px 0px 20px 12px"}}
[ H.div {className: "col-md-8 content"}
[ H.p {}
[ H.i {className: "fa fa-globe"} []
[ H.span {className: "fa fa-globe"} []
, H.text $ " " <> desc
]
, H.p {}
[ H.i {className: "fa fa-search-plus"} []
[ H.span {className: "fa fa-search-plus"} []
, H.text $ " " <> query
]
, H.p { className: "cache-toggle"
, on: { click: cacheClick cacheState afterCacheStateChange } }
[ H.i {className: "fa " <> (cacheToggle cacheState)} []
[ H.span { className: "fa " <> (cacheToggle cacheState) } []
, H.text $ cacheText cacheState
]
]
, H.div {className: "col-md-4 content"}
[ H.p {}
[ H.i {className: "fa fa-calendar"} []
[ H.span {className: "fa fa-calendar"} []
, H.text $ " " <> date
]
, H.p {}
[ H.i {className: "fa fa-user"} []
[ H.span {className: "fa fa-user"} []
, H.text $ " " <> user
]
]
......
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