snap-extras-0.1.7: A collection of useful helpers and utilities for Snap web applications.

Safe HaskellSafe-Infered

Snap.Extras.FlashNotice

Synopsis

Documentation

initFlashNotice :: HasHeist b => Lens b (Snaplet SessionManager) -> Initializer b v ()Source

Initialize the flash notice system. All you have to do now is to add some flash tags in your application template. See flashSplice for examples.

flashInfo :: Lens b (Snaplet SessionManager) -> Text -> Handler b b ()Source

Display an info message on next load of a page

flashWarning :: Lens b (Snaplet SessionManager) -> Text -> Handler b b ()Source

Display an warning message on next load of a page

flashSuccess :: Lens b (Snaplet SessionManager) -> Text -> Handler b b ()Source

Display a success message on next load of a page

flashError :: Lens b (Snaplet SessionManager) -> Text -> Handler b b ()Source

Display an error message on next load of a page

flashSplice :: Lens b (Snaplet SessionManager) -> SnapletSplice b vSource

A splice for rendering a given flash notice dirctive.

Ex: flash type='warning'/ Ex: flash type='success'/