diff options
Diffstat (limited to 'Assistant/Alert.hs')
-rw-r--r-- | Assistant/Alert.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Assistant/Alert.hs b/Assistant/Alert.hs index 8bdedaa3e..93eea6d7d 100644 --- a/Assistant/Alert.hs +++ b/Assistant/Alert.hs @@ -215,6 +215,26 @@ notFsckedAlert mr button = Alert , alertData = [] } +canUpgradeAlert :: AlertPriority -> AlertButton -> Alert +canUpgradeAlert priority button = Alert + { alertHeader = Just $ fromString $ concat + [ if priority >= High + then "An important upgrade of git-annex is available!" + else "An upgrade of git-annex is available." + ] + , alertIcon = Just UpgradeIcon + , alertPriority = priority + , alertButton = Just button + , alertClosable = True + , alertClass = Message + , alertMessageRender = renderData + , alertCounter = 0 + , alertBlockDisplay = True + , alertName = Just UpgradeAlert + , alertCombiner = Just $ dataCombiner $ \_old new -> new + , alertData = [] + } + brokenRepositoryAlert :: AlertButton -> Alert brokenRepositoryAlert = errorAlert "Serious problems have been detected with your repository. This needs your immediate attention!" |