on master help sign in
Default to relative baseurl in example app
commitfca78242a5d203677d8e43dea709a386e99bf605 authorGreg Hale <imalsogreg@gmail.com> dateSun 12 Jun 2016, 09:59 (10 years ago) parent1d2a901
1 file changed+4−4
src/Servant/Common/BaseUrl.hs+4−4
src/Servant/Common/BaseUrl.hs+4−4
@@ -60,12 +60,12 @@ showBaseUrl (BaseFullUrl urlscheme host port path) =
6060
6161baseUrlWidget :: forall t m .MonadWidget t m => m (Dynamic t BaseUrl)
6262baseUrlWidget = elClass "div" "base-url" $ do
63− urlWidget <- dropdown (0 :: Int) (constDyn $ 0 =: "BaseUrlFull" <> 1 =: "BasePath") def
63+ urlWidget <- dropdown (0 :: Int) (constDyn $ 0 =: "BasePath" <> 1 =: "BaseUrlFull") def
6464 bUrlWidget <- forDyn (value urlWidget) $ \i -> case i of
65− 0 -> fullUrlWidget
66− 1 -> pathWidget
65+ 0 -> pathWidget
66+ 1 -> fullUrlWidget
6767 _ -> error "Surprising value"
68− joinDyn <$> widgetHold fullUrlWidget (updated bUrlWidget)
68+ joinDyn <$> widgetHold pathWidget (updated bUrlWidget)
6969 where pathWidget :: m (Dynamic t BaseUrl)
7070 pathWidget = do
7171 text "Url base path"