diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-05 19:55:06 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-05 19:55:06 -0400 |
commit | aab3a01a7123854dd782597decf84b67d2bc2102 (patch) | |
tree | ef1fb775f6481747ce651cfc65443e16abb334f5 /Assistant | |
parent | 46feae36b6ddcb361414cd76fc17e63a392f9257 (diff) |
merge two repository screens into one
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/WebApp/Configurators.hs | 19 | ||||
-rw-r--r-- | Assistant/WebApp/routes | 3 |
2 files changed, 7 insertions, 15 deletions
diff --git a/Assistant/WebApp/Configurators.hs b/Assistant/WebApp/Configurators.hs index 66b8d386e..14da2ddbf 100644 --- a/Assistant/WebApp/Configurators.hs +++ b/Assistant/WebApp/Configurators.hs @@ -49,20 +49,13 @@ getConfigR = ifM (inFirstRun) $(widgetFile "configurators/main") ) -{- Lists different types of repositories that can be added. -} -getAddRepositoryR :: Handler RepHtml -getAddRepositoryR = bootstrap (Just Config) $ do +{- Lists known repositories, followed by options to add more. -} +getRepositoriesR :: Handler RepHtml +getRepositoriesR = bootstrap (Just Config) $ do sideBarDisplay - setTitle "Add repository" - $(widgetFile "configurators/addrepository") - -{- Lists known repositories. -} -getListRepositoriesR :: Handler RepHtml -getListRepositoriesR = bootstrap (Just Config) $ do - sideBarDisplay - setTitle "Repository list" + setTitle "Repositories" repolist <- lift repoList - $(widgetFile "configurators/listrepositories") + $(widgetFile "configurators/repositories") {- A numbered list of known repositories, including the current one. -} repoList :: Handler [(String, String)] @@ -217,7 +210,7 @@ getAddDriveR = bootstrap (Just Config) $ do FormSuccess (RemovableDrive { mountPoint = d }) -> lift $ do go $ T.unpack d setMessage $ toHtml $ T.unwords ["Added", d] - redirect ListRepositoriesR + redirect RepositoriesR _ -> do let authtoken = webAppFormAuthToken $(widgetFile "configurators/adddrive") diff --git a/Assistant/WebApp/routes b/Assistant/WebApp/routes index a53caf5ef..60f56cf14 100644 --- a/Assistant/WebApp/routes +++ b/Assistant/WebApp/routes @@ -4,10 +4,9 @@ /about AboutR GET /config ConfigR GET -/config/repository/add AddRepositoryR GET +/config/repository RepositoriesR GET /config/repository/add/drive AddDriveR GET /config/repository/first FirstRepositoryR GET -/config/repository/list ListRepositoriesR GET /transfers/#NotificationId TransfersR GET /sidebar/#NotificationId SideBarR GET |