diff options
author | Joey Hess <joey@kitenet.net> | 2013-11-24 13:28:34 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-11-24 13:28:34 -0400 |
commit | 71819fdbfbf3a35081b5891a552e8da38e5b2769 (patch) | |
tree | 4b5b40bd26fa5f2f277d6df373a25ebbd9dd6e4c /Assistant | |
parent | 42b427f6fc711254ac9ff1f047568f3584a406f7 (diff) |
show version in upgrade alert
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/Alert.hs | 8 | ||||
-rw-r--r-- | Assistant/Threads/Upgrader.hs | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Assistant/Alert.hs b/Assistant/Alert.hs index a8d49cc5b..dc321f097 100644 --- a/Assistant/Alert.hs +++ b/Assistant/Alert.hs @@ -233,10 +233,12 @@ baseUpgradeAlert buttons message = Alert , alertData = [] } -canUpgradeAlert :: AlertPriority -> AlertButton -> Alert -canUpgradeAlert priority button = +canUpgradeAlert :: AlertPriority -> GitAnnexVersion -> AlertButton -> Alert +canUpgradeAlert priority version button = (baseUpgradeAlert [button] $ fromString msg) - { alertPriority = priority } + { alertPriority = priority + , alertData = [fromString $ " (version " ++ version ++ ")"] + } where msg = if priority >= High then "An important upgrade of git-annex is available!" diff --git a/Assistant/Threads/Upgrader.hs b/Assistant/Threads/Upgrader.hs index 95796be22..f0c47e844 100644 --- a/Assistant/Threads/Upgrader.hs +++ b/Assistant/Threads/Upgrader.hs @@ -81,7 +81,7 @@ canUpgrade urgency urlrenderer d = ifM autoUpgradeEnabled , do #ifdef WITH_WEBAPP button <- mkAlertButton True (T.pack "Upgrade") urlrenderer (ConfigStartUpgradeR d) - void $ addAlert (canUpgradeAlert urgency button) + void $ addAlert (canUpgradeAlert urgency (distributionVersion d) button) #else noop #endif |