add alerts to DaemonStatus
This commit is contained in:
parent
57203e3981
commit
5271d699d2
2 changed files with 82 additions and 23 deletions
25
Assistant/Alert.hs
Normal file
25
Assistant/Alert.hs
Normal file
|
@ -0,0 +1,25 @@
|
|||
{- git-annex assistant alerts
|
||||
-
|
||||
- Copyright 2012 Joey Hess <joey@kitenet.net>
|
||||
-
|
||||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE RankNTypes #-}
|
||||
|
||||
module Assistant.Alert where
|
||||
|
||||
import Yesod
|
||||
|
||||
type Widget = forall sub master. GWidget sub master ()
|
||||
|
||||
{- Different classes of alerts are displayed differently. -}
|
||||
data AlertClass = Activity | Warning | Error | Message
|
||||
|
||||
{- An alert can be a simple message, or a Yesod Widget -}
|
||||
data AlertMessage = StringAlert String | WidgetAlert Widget
|
||||
|
||||
data Alert = Alert
|
||||
{ alertClass :: AlertClass
|
||||
, alertMessage :: AlertMessage
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue