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 = []
|
, alertData = []
|
||||||
}
|
}
|
||||||
|
|
||||||
canUpgradeAlert :: AlertPriority -> AlertButton -> Alert
|
canUpgradeAlert :: AlertPriority -> GitAnnexVersion -> AlertButton -> Alert
|
||||||
canUpgradeAlert priority button =
|
canUpgradeAlert priority version button =
|
||||||
(baseUpgradeAlert [button] $ fromString msg)
|
(baseUpgradeAlert [button] $ fromString msg)
|
||||||
{ alertPriority = priority }
|
{ alertPriority = priority
|
||||||
|
, alertData = [fromString $ " (version " ++ version ++ ")"]
|
||||||
|
}
|
||||||
where
|
where
|
||||||
msg = if priority >= High
|
msg = if priority >= High
|
||||||
then "An important upgrade of git-annex is available!"
|
then "An important upgrade of git-annex is available!"
|
||||||
|
|
|
@ -81,7 +81,7 @@ canUpgrade urgency urlrenderer d = ifM autoUpgradeEnabled
|
||||||
, do
|
, do
|
||||||
#ifdef WITH_WEBAPP
|
#ifdef WITH_WEBAPP
|
||||||
button <- mkAlertButton True (T.pack "Upgrade") urlrenderer (ConfigStartUpgradeR d)
|
button <- mkAlertButton True (T.pack "Upgrade") urlrenderer (ConfigStartUpgradeR d)
|
||||||
void $ addAlert (canUpgradeAlert urgency button)
|
void $ addAlert (canUpgradeAlert urgency (distributionVersion d) button)
|
||||||
#else
|
#else
|
||||||
noop
|
noop
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue