From 92daf0e06dd5e6d854739209a400c9e059dbba71 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 27 Oct 2012 12:25:29 -0400 Subject: add XMPP nudge alert, displayed after making a cloud repository --- Assistant/Alert.hs | 16 ++++++++++++++++ doc/assistant/xmppnudge.png | Bin 0 -> 6156 bytes 2 files changed, 16 insertions(+) create mode 100644 doc/assistant/xmppnudge.png 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 diff --git a/doc/assistant/xmppnudge.png b/doc/assistant/xmppnudge.png new file mode 100644 index 000000000..b3a0658cb Binary files /dev/null and b/doc/assistant/xmppnudge.png differ -- cgit v1.2.3