Commit bec1b947 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[DOC] Show Text Size Limit

parent 0151ee55
...@@ -30,6 +30,15 @@ import Reactix as R ...@@ -30,6 +30,15 @@ import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Toestand as T import Toestand as T
-------------------------------------------------------------------------
textSizeLimit :: Int
textSizeLimit = 4500
-------------------------------------------------------------------------
type Props = type Props =
( loaded :: LoadedData ( loaded :: LoadedData
, path :: DocPath , path :: DocPath
...@@ -111,7 +120,7 @@ layoutCpt = here.component "layout" cpt where ...@@ -111,7 +120,7 @@ layoutCpt = here.component "layout" cpt where
-- see #423 -- see #423
useFirstEffect' do useFirstEffect' do
let len = maybe 0 (length) doc.abstract let len = maybe 0 (length) doc.abstract
if (len `greaterThan` 4500) if (len `greaterThan` textSizeLimit)
then then
T.write_ true forceAdditionMode T.write_ true forceAdditionMode
*> T.write_ AFT.AdditionMode mode *> T.write_ AFT.AdditionMode mode
...@@ -177,7 +186,7 @@ layoutCpt = here.component "layout" cpt where ...@@ -177,7 +186,7 @@ layoutCpt = here.component "layout" cpt where
B.wad B.wad
[ "color-warning", "font-size-100", "mx-2", "inline-block" ] [ "color-warning", "font-size-100", "mx-2", "inline-block" ]
[ [
H.text "limited term feature due to abstract length" H.text $ "limited term feature due to abstract length: (" <> show textSizeLimit <> ")"
] ]
, ,
R2.when withAutoUpdate $ R2.when withAutoUpdate $
......
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