hook up syncing toggles
Although I observe that these toggles don't always prevent syncing. When a transfer scan is active, it will still queue items from the disabled remote. Also, transfers from a disabled remote show up as from "unknown", which is not ideal.
This commit is contained in:
parent
06831e7754
commit
3f06c883f2
4 changed files with 51 additions and 33 deletions
|
@ -13,6 +13,7 @@ import Assistant.Common
|
|||
import Assistant.WebApp
|
||||
import Assistant.WebApp.Types
|
||||
import Assistant.WebApp.SideBar
|
||||
import Assistant.WebApp.Utility
|
||||
import Assistant.WebApp.Configurators.Local
|
||||
import Assistant.DaemonStatus
|
||||
import Utility.Yesod
|
||||
|
@ -129,13 +130,14 @@ repoList onlyconfigured includehere
|
|||
<*> pure (map snd l')
|
||||
counter = map show ([1..] :: [Int])
|
||||
|
||||
|
||||
getEnableSyncR :: UUID -> Handler ()
|
||||
getEnableSyncR uuid = do
|
||||
error "TODO"
|
||||
redirect RepositoriesR
|
||||
getEnableSyncR = flipSync True
|
||||
|
||||
getDisableSyncR :: UUID -> Handler ()
|
||||
getDisableSyncR uuid = do
|
||||
error "TODO"
|
||||
getDisableSyncR = flipSync False
|
||||
|
||||
flipSync :: Bool -> UUID -> Handler ()
|
||||
flipSync enable uuid = do
|
||||
mremote <- runAnnex undefined $ snd <$> Remote.repoFromUUID uuid
|
||||
changeSyncable mremote enable
|
||||
redirect RepositoriesR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue