remove workaround for old yesod bug
This commit is contained in:
parent
7665773593
commit
1f5611a1ca
4 changed files with 4 additions and 13 deletions
|
@ -196,8 +196,8 @@ postNewRepositoryR = page "Add another repository" (Just Configuration) $ do
|
||||||
mainrepo <- fromJust . relDir <$> liftH getYesod
|
mainrepo <- fromJust . relDir <$> liftH getYesod
|
||||||
$(widgetFile "configurators/newrepository/combine")
|
$(widgetFile "configurators/newrepository/combine")
|
||||||
|
|
||||||
getCombineRepositoryR :: FilePathAndUUID -> Handler Html
|
getCombineRepositoryR :: FilePath -> UUID -> Handler Html
|
||||||
getCombineRepositoryR (FilePathAndUUID newrepopath newrepouuid) = do
|
getCombineRepositoryR newrepopath newrepouuid = do
|
||||||
r <- combineRepos newrepopath remotename
|
r <- combineRepos newrepopath remotename
|
||||||
liftAssistant $ syncRemote r
|
liftAssistant $ syncRemote r
|
||||||
redirect $ EditRepositoryR newrepouuid
|
redirect $ EditRepositoryR newrepouuid
|
||||||
|
|
|
@ -163,15 +163,6 @@ data RemovableDrive = RemovableDrive
|
||||||
data RepoKey = RepoKey KeyId | NoRepoKey
|
data RepoKey = RepoKey KeyId | NoRepoKey
|
||||||
deriving (Read, Show, Eq, Ord)
|
deriving (Read, Show, Eq, Ord)
|
||||||
|
|
||||||
{- Only needed to work around old-yesod bug that emits a warning message
|
|
||||||
- when a route has two parameters. -}
|
|
||||||
data FilePathAndUUID = FilePathAndUUID FilePath UUID
|
|
||||||
deriving (Read, Show, Eq)
|
|
||||||
|
|
||||||
instance PathPiece FilePathAndUUID where
|
|
||||||
toPathPiece = pack . show
|
|
||||||
fromPathPiece = readish . unpack
|
|
||||||
|
|
||||||
instance PathPiece RemovableDrive where
|
instance PathPiece RemovableDrive where
|
||||||
toPathPiece = pack . show
|
toPathPiece = pack . show
|
||||||
fromPathPiece = readish . unpack
|
fromPathPiece = readish . unpack
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
/config/repository/new/androidcamera AndroidCameraRepositoryR GET
|
/config/repository/new/androidcamera AndroidCameraRepositoryR GET
|
||||||
/config/repository/switcher RepositorySwitcherR GET
|
/config/repository/switcher RepositorySwitcherR GET
|
||||||
/config/repository/switchto/#FilePath SwitchToRepositoryR GET
|
/config/repository/switchto/#FilePath SwitchToRepositoryR GET
|
||||||
/config/repository/combine/#FilePathAndUUID CombineRepositoryR GET
|
/config/repository/combine/#FilePath/#UUID CombineRepositoryR GET
|
||||||
/config/repository/edit/#UUID EditRepositoryR GET POST
|
/config/repository/edit/#UUID EditRepositoryR GET POST
|
||||||
/config/repository/edit/new/#UUID EditNewRepositoryR GET POST
|
/config/repository/edit/new/#UUID EditNewRepositoryR GET POST
|
||||||
/config/repository/edit/new/cloud/#UUID EditNewCloudRepositoryR GET POST
|
/config/repository/edit/new/cloud/#UUID EditNewCloudRepositoryR GET POST
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<br>
|
<br>
|
||||||
Do you want to combine it with your existing repository at #{mainrepo}?
|
Do you want to combine it with your existing repository at #{mainrepo}?
|
||||||
<p>
|
<p>
|
||||||
<a .btn href="@{CombineRepositoryR $ FilePathAndUUID newrepopath newrepouuid}">
|
<a .btn href="@{CombineRepositoryR newrepopath newrepouuid}">
|
||||||
<i .icon-resize-small></i> Combine the repositories #
|
<i .icon-resize-small></i> Combine the repositories #
|
||||||
The combined repositories will sync and share their files.
|
The combined repositories will sync and share their files.
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue