better UI flow through upgrade process
Move button to enable automatic upgrades to an alert displayed after successful upgrade. Unclutters the UI and makes psychological sense.
This commit is contained in:
parent
6abaf19c41
commit
d24f7f94fe
6 changed files with 63 additions and 40 deletions
|
@ -35,13 +35,16 @@ getConfigStartUpgradeR d = page "Upgrade git-annex" (Just Configuration) $ do
|
|||
- the others will show the upgradingAlert, and keep running until
|
||||
- this process is terminated.
|
||||
-}
|
||||
getConfigFinishUpgradeR :: Bool -> Handler Html
|
||||
getConfigFinishUpgradeR enableautoupgrade = do
|
||||
when enableautoupgrade $ liftAnnex $
|
||||
setConfig (annexConfig "autoupgrade")
|
||||
(fromAutoUpgrade AutoUpgrade)
|
||||
getConfigFinishUpgradeR :: Handler Html
|
||||
getConfigFinishUpgradeR = do
|
||||
liftAssistant prepUpgrade
|
||||
liftIO postUpgrade `after` startnewprocess
|
||||
where
|
||||
startnewprocess = switchToAssistant
|
||||
=<< liftAnnex (repoLocation <$> Annex.gitRepo)
|
||||
|
||||
getConfigEnableAutomaticUpgradeR :: Handler Html
|
||||
getConfigEnableAutomaticUpgradeR = do
|
||||
liftAnnex $ setConfig (annexConfig "autoupgrade")
|
||||
(fromAutoUpgrade AutoUpgrade)
|
||||
redirect DashboardR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue