add XMPP nudge alert, displayed after making a cloud repository

This commit is contained in:
Joey Hess 2012-10-27 12:25:29 -04:00
parent ab15e567f9
commit 531f1d1446
7 changed files with 36 additions and 2 deletions

View file

@ -34,6 +34,7 @@ data AlertName
| SanityCheckFixAlert
| WarningAlert String
| PairAlert String
| XMPPNeededAlert
deriving (Eq)
{- The first alert is the new alert, the second is an old alert.
@ -322,6 +323,21 @@ pairRequestAcknowledgedAlert repo button = baseActivityAlert
, alertButton = button
}
xmppNeededAlert :: AlertButton -> Alert
xmppNeededAlert button = Alert
{ alertHeader = Just "Keep your repositories in sync across the cloud, or share with friends."
, alertIcon = Just TheCloud
, alertPriority = High
, alertButton = Just button
, alertClosable = True
, alertClass = Message
, alertMessageRender = tenseWords
, alertBlockDisplay = True
, alertName = Just $ XMPPNeededAlert
, alertCombiner = Just $ dataCombiner $ \_old new -> new
, alertData = []
}
fileAlert :: TenseChunk -> FilePath -> Alert
fileAlert msg file = (activityAlert Nothing [f])
{ alertName = Just $ FileAlert msg