summaryrefslogtreecommitdiff
path: root/Assistant/Alert.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Alert.hs')
-rw-r--r--Assistant/Alert.hs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Assistant/Alert.hs b/Assistant/Alert.hs
index 3455d0563..4e6dab033 100644
--- a/Assistant/Alert.hs
+++ b/Assistant/Alert.hs
@@ -79,6 +79,22 @@ warningAlert name msg = Alert
, alertButton = Nothing
}
+errorAlert :: String -> AlertButton -> Alert
+errorAlert msg button = Alert
+ { alertClass = Error
+ , alertHeader = Just $ tenseWords ["error"]
+ , alertMessageRender = renderData
+ , alertData = [UnTensed $ T.pack msg]
+ , alertCounter = 0
+ , alertBlockDisplay = True
+ , alertClosable = True
+ , alertPriority = Pinned
+ , alertIcon = Just ErrorIcon
+ , alertCombiner = Nothing
+ , alertName = Nothing
+ , alertButton = Just button
+ }
+
activityAlert :: Maybe TenseText -> [TenseChunk] -> Alert
activityAlert header dat = baseActivityAlert
{ alertHeader = header
@@ -158,6 +174,9 @@ fsckAlert button n = baseActivityAlert
, alertButton = Just button
}
+brokenRepositoryAlert :: AlertButton -> Alert
+brokenRepositoryAlert = errorAlert "Your repository needs repairs."
+
pairingAlert :: AlertButton -> Alert
pairingAlert button = baseActivityAlert
{ alertData = [ UnTensed "Pairing in progress" ]