assistant restart on upgrade

This commit is contained in:
Joey Hess 2013-11-22 23:12:06 -04:00
parent ad653e49cf
commit b9cdb55e0c
9 changed files with 127 additions and 25 deletions

View file

@ -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!"