summaryrefslogtreecommitdiff
path: root/Assistant/Alert.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Alert.hs')
-rw-r--r--Assistant/Alert.hs16
1 files changed, 12 insertions, 4 deletions
diff --git a/Assistant/Alert.hs b/Assistant/Alert.hs
index 666098c6f..a2f5db4e3 100644
--- a/Assistant/Alert.hs
+++ b/Assistant/Alert.hs
@@ -32,7 +32,7 @@ data AlertName
= FileAlert TenseChunk
| SanityCheckFixAlert
| WarningAlert String
- | PairRequestAlert String
+ | PairRequestReceivedAlert String
deriving (Eq)
{- The first alert is the new alert, the second is an old alert.
@@ -148,6 +148,7 @@ makeAlertFiller success alert
{ alertClass = if c == Activity then c' else c
, alertPriority = Filler
, alertClosable = True
+ , alertButton = Nothing
, alertIcon = Just $ if success then SuccessIcon else ErrorIcon
}
where
@@ -285,8 +286,15 @@ sanityCheckFixAlert msg = Alert
alerthead = "The daily sanity check found and fixed a problem:"
alertfoot = "If these problems persist, consider filing a bug report."
-pairRequestAlert :: String -> String -> AlertButton -> Alert
-pairRequestAlert repo msg button = Alert
+pairRequestAlert :: AlertButton -> Alert
+pairRequestAlert button = baseActivityAlert
+ { alertData = [ UnTensed "Pairing request in progress" ]
+ , alertPriority = High
+ , alertButton = Just button
+ }
+
+pairRequestReceivedAlert :: String -> String -> AlertButton -> Alert
+pairRequestReceivedAlert repo msg button = Alert
{ alertClass = Message
, alertHeader = Nothing
, alertMessageRender = tenseWords
@@ -295,7 +303,7 @@ pairRequestAlert repo msg button = Alert
, alertPriority = High
, alertClosable = True
, alertIcon = Just InfoIcon
- , alertName = Just $ PairRequestAlert repo
+ , alertName = Just $ PairRequestReceivedAlert repo
, alertCombiner = Just $ dataCombiner $ const id
, alertButton = Just button
}