summaryrefslogtreecommitdiff
path: root/Assistant/WebApp/Configurators.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-05 19:55:06 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-05 19:55:06 -0400
commitaab3a01a7123854dd782597decf84b67d2bc2102 (patch)
treeef1fb775f6481747ce651cfc65443e16abb334f5 /Assistant/WebApp/Configurators.hs
parent46feae36b6ddcb361414cd76fc17e63a392f9257 (diff)
merge two repository screens into one
Diffstat (limited to 'Assistant/WebApp/Configurators.hs')
-rw-r--r--Assistant/WebApp/Configurators.hs19
1 files changed, 6 insertions, 13 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")