From 74906ed13f85f0b7b9215d82390e7ccb28551642 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Sep 2012 16:47:44 -0400 Subject: UI for enabling special remotes Now other repositories can configure special remotes, and when their configuration has propigated out, they'll appear in the webapp's list of repositories, with a link to enable them. Added support for enabling rsync special remotes, and directory special remotes that are on removable drives. However, encrypted directory special remotes are not supported yet. The removable drive configuator doesn't support them yet anyway. --- Assistant/WebApp/Configurators/Local.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Assistant/WebApp/Configurators/Local.hs') diff --git a/Assistant/WebApp/Configurators/Local.hs b/Assistant/WebApp/Configurators/Local.hs index dd546881b..e77986674 100644 --- a/Assistant/WebApp/Configurators/Local.hs +++ b/Assistant/WebApp/Configurators/Local.hs @@ -27,6 +27,7 @@ import Utility.Mounts import Utility.DiskFree import Utility.DataUnits import Utility.Network +import Remote (prettyListUUIDs) import Yesod import Data.Text (Text) @@ -194,6 +195,14 @@ getAddDriveR = bootstrap (Just Config) $ do void $ makeGitRemote hostname hostlocation addRemote $ makeGitRemote name dir +getEnableDirectoryR :: UUID -> Handler RepHtml +getEnableDirectoryR uuid = bootstrap (Just Config) $ do + sideBarDisplay + setTitle "Enable a repository" + description <- lift $ runAnnex "" $ + T.pack . concat <$> prettyListUUIDs [uuid] + $(widgetFile "configurators/enabledirectory") + {- Start syncing a newly added remote, using a background thread. -} syncRemote :: Remote -> Handler () syncRemote remote = do -- cgit v1.2.3