diff options
Diffstat (limited to 'Assistant/Alert.hs')
-rw-r--r-- | Assistant/Alert.hs | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/Assistant/Alert.hs b/Assistant/Alert.hs index 93eea6d7d..fef78c1f0 100644 --- a/Assistant/Alert.hs +++ b/Assistant/Alert.hs @@ -217,11 +217,10 @@ notFsckedAlert mr button = Alert canUpgradeAlert :: AlertPriority -> AlertButton -> Alert canUpgradeAlert priority button = Alert - { alertHeader = Just $ fromString $ concat - [ if priority >= High + { alertHeader = Just $ fromString $ + 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 @@ -230,11 +229,31 @@ canUpgradeAlert priority button = Alert , alertMessageRender = renderData , alertCounter = 0 , alertBlockDisplay = True - , alertName = Just UpgradeAlert + , alertName = Just CanUpgradeAlert + , alertCombiner = Just $ dataCombiner $ \_old new -> new + , alertData = [] + } + +upgradeReadyAlert :: AlertButton -> Alert +upgradeReadyAlert button = Alert + { alertHeader = Just $ fromString + "A new version of git-annex has been installed." + , alertIcon = Just UpgradeIcon + , alertPriority = High + , alertButton = Just button + , alertClosable = True + , alertClass = Message + , alertMessageRender = renderData + , alertCounter = 0 + , alertBlockDisplay = True + , alertName = Just UpgradeReadyAlert , alertCombiner = Just $ dataCombiner $ \_old new -> new , alertData = [] } +upgradingAlert :: Alert +upgradingAlert = activityAlert Nothing [fromString "Upgrading git-annex"] + brokenRepositoryAlert :: AlertButton -> Alert brokenRepositoryAlert = errorAlert "Serious problems have been detected with your repository. This needs your immediate attention!" |