first pass at assistant knowing about export remotes

Split exportRemotes out from syncDataRemotes; the parts of the assistant
that upload keys and drop keys from remotes don't apply to exports,
because those operations are not supported.

Some parts of the assistant and webapp do operate on both
syncDataRemotes and exportRemotes. Particularly when downloading from
either of them. Added a downloadRemotes that combines both.

With this, the assistant should download from exports, but it won't yet
upload changes to them.

This commit was sponsored by Fernando Jimenez on Patreon.
This commit is contained in:
Joey Hess 2017-09-20 13:27:59 -04:00
parent 28eba8e9c6
commit 46d19648ee
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 40 additions and 26 deletions

View file

@ -72,7 +72,7 @@ deleteCurrentRepository :: Handler Html
deleteCurrentRepository = dangerPage $ do
reldir <- fromJust . relDir <$> liftH getYesod
havegitremotes <- haveremotes syncGitRemotes
havedataremotes <- haveremotes syncDataRemotes
havedataremotes <- haveremotes downloadRemotes
((result, form), enctype) <- liftH $
runFormPostNoToken $ renderBootstrap3 bootstrapFormLayout $
sanityVerifierAForm $ SanityVerifier magicphrase