display alert for inotify/kqueue errors
This commit is contained in:
parent
ec23eeb9eb
commit
d11ded822c
3 changed files with 20 additions and 5 deletions
|
@ -27,7 +27,7 @@ data AlertPriority = Filler | Low | Medium | High | Pinned
|
|||
|
||||
{- An alert can have an name, which is used to combine it with other similar
|
||||
- alerts. -}
|
||||
data AlertName = FileAlert TenseChunk | DownloadFailedAlert | SanityCheckFixAlert
|
||||
data AlertName = FileAlert TenseChunk | SanityCheckFixAlert | WarningAlert String
|
||||
deriving (Eq)
|
||||
|
||||
{- The first alert is the new alert, the second is an old alert.
|
||||
|
@ -180,6 +180,20 @@ baseActivityAlert = Alert
|
|||
, alertName = Nothing
|
||||
}
|
||||
|
||||
warningAlert :: String -> String -> Alert
|
||||
warningAlert name msg = Alert
|
||||
{ alertClass = Warning
|
||||
, alertHeader = Just $ tenseWords ["warning"]
|
||||
, alertMessageRender = tenseWords
|
||||
, alertData = [UnTensed $ T.pack msg]
|
||||
, alertBlockDisplay = True
|
||||
, alertClosable = True
|
||||
, alertPriority = High
|
||||
, alertIcon = Just "exclamation-sign"
|
||||
, alertCombiner = Just $ dataCombiner (++)
|
||||
, alertName = Just $ WarningAlert name
|
||||
}
|
||||
|
||||
activityAlert :: Maybe TenseText -> [TenseChunk] -> Alert
|
||||
activityAlert header dat = baseActivityAlert
|
||||
{ alertHeader = header
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue