summaryrefslogtreecommitdiff
path: root/Assistant
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-27 12:25:29 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-27 12:25:29 -0400
commit92daf0e06dd5e6d854739209a400c9e059dbba71 (patch)
tree683f08b60ed39c6fa8f1f96ba3b4fd0ba01477de /Assistant
parentcbbf4a858c522fbfe3b4de1547f09501df2e0e5a (diff)
add XMPP nudge alert, displayed after making a cloud repository
Diffstat (limited to 'Assistant')
-rw-r--r--Assistant/Alert.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Assistant/Alert.hs b/Assistant/Alert.hs
index d873d21c7..102863ea3 100644
--- a/Assistant/Alert.hs
+++ b/Assistant/Alert.hs
@@ -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