improved config

This commit is contained in:
Joey Hess 2012-08-03 20:40:34 -04:00
parent 1bd2be549f
commit e0c3958d9a
10 changed files with 103 additions and 105 deletions

View file

@ -22,11 +22,8 @@ import Data.Text (Text)
import qualified Data.Map as M
import Control.Concurrent
sideBarDisplay :: Maybe Widget -> Widget
sideBarDisplay onsidebar = do
{- If a widget was passed to include on the sidebar, display
- it above alerts. -}
let perpage = maybe noop id onsidebar
sideBarDisplay :: Widget
sideBarDisplay = do
let content = do
{- Any yesod message appears as the first alert. -}
maybe noop rendermessage =<< lift getMessage
@ -86,7 +83,7 @@ getSideBarR nid = do
- to avoid slowing down user actions like closing alerts. -}
liftIO $ threadDelay 100000
page <- widgetToPageContent $ sideBarDisplay Nothing
page <- widgetToPageContent sideBarDisplay
hamletToRepHtml $ [hamlet|^{pageBody page}|]
{- Called by the client to close an alert. -}