show version in upgrade alert
This commit is contained in:
parent
6165284e39
commit
542ae4a855
2 changed files with 6 additions and 4 deletions
|
@ -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!"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue