reorg repolist
This commit is contained in:
parent
999487e721
commit
6c7ce8f193
6 changed files with 36 additions and 33 deletions
|
@ -10,6 +10,7 @@
|
|||
module Assistant.WebApp.Configurators where
|
||||
|
||||
import Assistant.WebApp.Common
|
||||
import Assistant.WebApp.RepoList
|
||||
import Assistant.WebApp.Configurators.Local
|
||||
#ifdef WITH_XMPP
|
||||
import Assistant.XMPP.Client
|
||||
|
@ -27,3 +28,34 @@ getConfigurationR = ifM (inFirstRun)
|
|||
#endif
|
||||
$(widgetFile "configurators/main")
|
||||
)
|
||||
|
||||
{- An intro message, list of repositories, and nudge to make more. -}
|
||||
introDisplay :: Text -> Widget
|
||||
introDisplay ident = do
|
||||
webapp <- lift getYesod
|
||||
repolist <- lift $ repoList $ RepoSelector
|
||||
{ onlyCloud = False
|
||||
, onlyConfigured = True
|
||||
, includeHere = False
|
||||
}
|
||||
let n = length repolist
|
||||
let numrepos = show n
|
||||
$(widgetFile "configurators/intro")
|
||||
lift $ modifyWebAppState $ \s -> s { showIntro = False }
|
||||
|
||||
{- Lists known repositories, followed by options to add more. -}
|
||||
getRepositoriesR :: Handler RepHtml
|
||||
getRepositoriesR = page "Repositories" (Just Repositories) $ do
|
||||
let repolist = repoListDisplay $ RepoSelector
|
||||
{ onlyCloud = False
|
||||
, onlyConfigured = False
|
||||
, includeHere = True
|
||||
}
|
||||
$(widgetFile "configurators/repositories")
|
||||
|
||||
|
||||
makeMiscRepositories :: Widget
|
||||
makeMiscRepositories = $(widgetFile "configurators/repositories/misc")
|
||||
|
||||
makeCloudRepositories :: Bool -> Widget
|
||||
makeCloudRepositories onlyTransfer = $(widgetFile "configurators/repositories/cloud")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue