aula icon indicating copy to clipboard operation
aula copied to clipboard

User context should be part of the `HtmlT m`

Open andorp opened this issue 9 years ago • 2 comments

The actual user context in HtmlT m () is defined in the Lucid.I18N module. It should contain more information; e.g capabilities of the user.

andorp avatar Jul 18 '16 12:07 andorp

:+1:

fisx avatar Jul 18 '16 12:07 fisx

The MimeRender has to be modified for this

Current:

instance (ToLang a, ToHtml a) => MimeRender IHTML a where
    mimeRender _ v = runReader (renderBST $ toHtml v) (toLang v)

New:

instance (ToConfig a, ToLang a, ToHtml a) => MimeRender IHTML a where
    mimeRender _ v = runReader (renderBST $ toHtml v) (HtmlCtx (toLang v) (toCfg a)

We need to reconsider this approach in the future.

andorp avatar Jul 28 '16 16:07 andorp