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
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
/config/fsck ConfigFsckR GET POST
|
||||
/config/fsck/preferences ConfigFsckPreferencesR POST
|
||||
/config/upgrade/start/#GitAnnexDistribution ConfigStartUpgradeR GET
|
||||
/config/upgrade/finish/#Bool ConfigFinishUpgradeR GET
|
||||
/config/upgrade/finish ConfigFinishUpgradeR GET
|
||||
/config/upgrade/automatically ConfigEnableAutomaticUpgradeR GET
|
||||
|
||||
/config/addrepository AddRepositoryR GET
|
||||
/config/repository/new NewRepositoryR GET POST
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue