diff options
author | Joey Hess <joey@kitenet.net> | 2012-09-08 23:32:08 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-09-08 23:32:08 -0400 |
commit | f62cc484826991bfdb5469b8cf0b7b6b7a617e43 (patch) | |
tree | 77292d1c296bdb33c490cbbe8eaffe5cdb97d6b7 | |
parent | 6e60b08060a79182a6ae0180dbb7aefbc6011299 (diff) |
reorg templates
-rw-r--r-- | Assistant/WebApp/Configurators/Local.hs | 8 | ||||
-rw-r--r-- | Assistant/WebApp/Configurators/Pairing.hs | 6 | ||||
-rw-r--r-- | Assistant/WebApp/Configurators/Ssh.hs | 6 | ||||
-rw-r--r-- | templates/configurators/firstrepository/form.hamlet (renamed from templates/configurators/localrepositoryform.hamlet) | 0 | ||||
-rw-r--r-- | templates/configurators/pairing/disabled.hamlet (renamed from templates/configurators/nopairing.hamlet) | 0 | ||||
-rw-r--r-- | templates/configurators/pairing/inprogress.hamlet (renamed from templates/configurators/inprogresspairing.hamlet) | 0 | ||||
-rw-r--r-- | templates/configurators/pairing/prompt.hamlet (renamed from templates/configurators/pairing.hamlet) | 0 | ||||
-rw-r--r-- | templates/configurators/ssh/add.hamlet (renamed from templates/configurators/addssh.hamlet) | 0 | ||||
-rw-r--r-- | templates/configurators/ssh/confirm.hamlet (renamed from templates/configurators/confirmssh.hamlet) | 0 | ||||
-rw-r--r-- | templates/configurators/ssh/error.hamlet (renamed from templates/configurators/makessherror.hamlet) | 0 |
10 files changed, 10 insertions, 10 deletions
diff --git a/Assistant/WebApp/Configurators/Local.hs b/Assistant/WebApp/Configurators/Local.hs index d68de5cd1..331130727 100644 --- a/Assistant/WebApp/Configurators/Local.hs +++ b/Assistant/WebApp/Configurators/Local.hs @@ -107,8 +107,8 @@ defaultRepositoryPath firstrun = do ) else return cwd -localRepositoryForm :: Form RepositoryPath -localRepositoryForm msg = do +firstRepositoryForm :: Form RepositoryPath +firstRepositoryForm msg = do path <- T.pack . addTrailingPathSeparator <$> (liftIO . defaultRepositoryPath =<< lift inFirstRun) (pathRes, pathView) <- mreq (repositoryPathField True) "" (Just path) @@ -118,7 +118,7 @@ localRepositoryForm msg = do FormSuccess _ -> (False, "") let form = do webAppFormAuthToken - $(widgetFile "configurators/localrepositoryform") + $(widgetFile "configurators/firstrepository/form") return (RepositoryPath <$> pathRes, form) {- Making the first repository, when starting the webapp for the first time. -} @@ -126,7 +126,7 @@ getFirstRepositoryR :: Handler RepHtml getFirstRepositoryR = bootstrap (Just Config) $ do sideBarDisplay setTitle "Getting started" - ((res, form), enctype) <- lift $ runFormGet localRepositoryForm + ((res, form), enctype) <- lift $ runFormGet firstRepositoryForm case res of FormSuccess (RepositoryPath p) -> lift $ startFullAssistant $ T.unpack p diff --git a/Assistant/WebApp/Configurators/Pairing.hs b/Assistant/WebApp/Configurators/Pairing.hs index ae94ddafb..54a791639 100644 --- a/Assistant/WebApp/Configurators/Pairing.hs +++ b/Assistant/WebApp/Configurators/Pairing.hs @@ -74,7 +74,7 @@ getInprogressPairR :: Text -> Handler RepHtml getInprogressPairR secret = bootstrap (Just Config) $ do sideBarDisplay setTitle "Pairing" - $(widgetFile "configurators/inprogresspairing") + $(widgetFile "configurators/pairing/inprogress") #else getInprogressPairR _ = noPairing #endif @@ -123,7 +123,7 @@ promptSecret msg cont = bootstrap (Just Config) $ do u <- T.pack <$> liftIO getUserName let sameusername = username == u let authtoken = webAppFormAuthToken - $(widgetFile "configurators/pairing") + $(widgetFile "configurators/pairing/prompt") {- This counts unicode characters as more than one character, - but that's ok; they *do* provide additional entropy. -} @@ -155,6 +155,6 @@ noPairing :: Handler RepHtml noPairing = bootstrap (Just Config) $ do sideBarDisplay setTitle "Pairing" - $(widgetFile "configurators/nopairing") + $(widgetFile "configurators/pairing/disabled") #endif diff --git a/Assistant/WebApp/Configurators/Ssh.hs b/Assistant/WebApp/Configurators/Ssh.hs index 357e049bb..92e22b8e4 100644 --- a/Assistant/WebApp/Configurators/Ssh.hs +++ b/Assistant/WebApp/Configurators/Ssh.hs @@ -112,7 +112,7 @@ getAddSshR = sshConfigurator $ do where showform form enctype status = do let authtoken = webAppFormAuthToken - $(widgetFile "configurators/addssh") + $(widgetFile "configurators/ssh/add") {- Test if we can ssh into the server. - @@ -225,7 +225,7 @@ sshSetup opts input a = do showSshErr :: String -> Handler RepHtml showSshErr msg = sshConfigurator $ - $(widgetFile "configurators/makessherror") + $(widgetFile "configurators/ssh/error") {- Does ssh have known_hosts data for a hostname? -} knownHost :: SshServer -> IO Bool @@ -240,7 +240,7 @@ knownHost (SshServer { hostname = Just h }) = do getConfirmSshR :: SshData -> Handler RepHtml getConfirmSshR sshdata = sshConfigurator $ do let authtoken = webAppFormAuthToken - $(widgetFile "configurators/confirmssh") + $(widgetFile "configurators/ssh/confirm") getMakeSshGitR :: SshData -> Handler RepHtml getMakeSshGitR = makeSsh False diff --git a/templates/configurators/localrepositoryform.hamlet b/templates/configurators/firstrepository/form.hamlet index 6c2405be6..6c2405be6 100644 --- a/templates/configurators/localrepositoryform.hamlet +++ b/templates/configurators/firstrepository/form.hamlet diff --git a/templates/configurators/nopairing.hamlet b/templates/configurators/pairing/disabled.hamlet index c946aacc4..c946aacc4 100644 --- a/templates/configurators/nopairing.hamlet +++ b/templates/configurators/pairing/disabled.hamlet diff --git a/templates/configurators/inprogresspairing.hamlet b/templates/configurators/pairing/inprogress.hamlet index 7b655b5a9..7b655b5a9 100644 --- a/templates/configurators/inprogresspairing.hamlet +++ b/templates/configurators/pairing/inprogress.hamlet diff --git a/templates/configurators/pairing.hamlet b/templates/configurators/pairing/prompt.hamlet index 82ca48b5a..82ca48b5a 100644 --- a/templates/configurators/pairing.hamlet +++ b/templates/configurators/pairing/prompt.hamlet diff --git a/templates/configurators/addssh.hamlet b/templates/configurators/ssh/add.hamlet index c2336a169..c2336a169 100644 --- a/templates/configurators/addssh.hamlet +++ b/templates/configurators/ssh/add.hamlet diff --git a/templates/configurators/confirmssh.hamlet b/templates/configurators/ssh/confirm.hamlet index f82335ceb..f82335ceb 100644 --- a/templates/configurators/confirmssh.hamlet +++ b/templates/configurators/ssh/confirm.hamlet diff --git a/templates/configurators/makessherror.hamlet b/templates/configurators/ssh/error.hamlet index 05d2de412..05d2de412 100644 --- a/templates/configurators/makessherror.hamlet +++ b/templates/configurators/ssh/error.hamlet |