git-annex/Assistant/WebApp/Configurators.hs

45 lines
1.4 KiB
Haskell
Raw Normal View History

2012-07-31 05:11:32 +00:00
{- git-annex assistant webapp configurators
-
- Copyright 2012 Joey Hess <id@joeyh.name>
2012-07-31 05:11:32 +00:00
-
- Licensed under the GNU AGPL version 3 or higher.
2012-07-31 05:11:32 +00:00
-}
{-# LANGUAGE QuasiQuotes, TemplateHaskell, OverloadedStrings #-}
2012-07-31 05:11:32 +00:00
module Assistant.WebApp.Configurators where
2012-11-25 04:26:46 +00:00
import Assistant.WebApp.Common
2013-03-15 02:10:51 +00:00
import Assistant.WebApp.RepoList
2012-07-31 05:11:32 +00:00
{- The main configuration screen. -}
getConfigurationR :: Handler Html
2013-10-02 05:06:59 +00:00
getConfigurationR = ifM inFirstRun
( redirect FirstRepositoryR
, page "Configuration" (Just Configuration) $ do
$(widgetFile "configurators/main")
)
2013-03-15 02:10:51 +00:00
getAddRepositoryR :: Handler Html
getAddRepositoryR = page "Add Repository" (Just Configuration) $ do
let repolist = repoListDisplay mainRepoSelector
2013-03-15 16:47:41 +00:00
$(widgetFile "configurators/addrepository")
2013-03-15 02:10:51 +00:00
makeMiscRepositories :: Widget
2013-03-15 16:47:41 +00:00
makeMiscRepositories = $(widgetFile "configurators/addrepository/misc")
2013-03-15 02:10:51 +00:00
makeCloudRepositories :: Widget
makeCloudRepositories = $(widgetFile "configurators/addrepository/cloud")
makeWormholePairing :: Widget
makeWormholePairing = $(widgetFile "configurators/addrepository/wormholepairing")
makeSshRepository :: Widget
makeSshRepository = $(widgetFile "configurators/addrepository/ssh")
makeConnectionRepositories :: Widget
makeConnectionRepositories = $(widgetFile "configurators/addrepository/connection")
makeArchiveRepositories :: Widget
makeArchiveRepositories = $(widgetFile "configurators/addrepository/archive")