webapp: Proceed automatically on from "Configure jabber account" to pairing.

This commit is contained in:
Joey Hess 2013-03-04 16:03:24 -04:00
parent aa2bc92b73
commit 5274713305
4 changed files with 9 additions and 21 deletions

View file

@ -58,7 +58,7 @@ getStartXMPPPairR = ifM (isJust <$> runAnnex Nothing getXMPPCreds)
liftAssistant $ sendNetMessage QueryPresence liftAssistant $ sendNetMessage QueryPresence
pairPage $ pairPage $
$(widgetFile "configurators/pairing/xmpp/prompt") $(widgetFile "configurators/pairing/xmpp/prompt")
, redirect XMPPForPairingR -- go get XMPP configured, then come back , redirect XMPPR -- go get XMPP configured, then come back
) )
#else #else
getStartXMPPPairR = noXMPPPairing getStartXMPPPairR = noXMPPPairing

View file

@ -46,25 +46,9 @@ xmppNeeded = whenM (isNothing <$> runAnnex Nothing getXMPPCreds) $ do
xmppNeeded = return () xmppNeeded = return ()
#endif #endif
#ifdef WITH_XMPP
getXMPPR :: Handler RepHtml getXMPPR :: Handler RepHtml
#ifdef WITH_XMPP getXMPPR = xmppPage $ do
getXMPPR = getXMPPR' ConfigurationR
#else
getXMPPR = xmppPage $
$(widgetFile "configurators/xmpp/disabled")
#endif
getXMPPForPairingR :: Handler RepHtml
#ifdef WITH_XMPP
getXMPPForPairingR = getXMPPR' StartXMPPPairR
#else
getXMPPForPairingR = xmppPage $
$(widgetFile "configurators/xmpp/disabled")
#endif
#ifdef WITH_XMPP
getXMPPR' :: Route WebApp -> Handler RepHtml
getXMPPR' redirto = xmppPage $ do
((result, form), enctype) <- lift $ do ((result, form), enctype) <- lift $ do
oldcreds <- runAnnex Nothing getXMPPCreds oldcreds <- runAnnex Nothing getXMPPCreds
runFormGet $ renderBootstrap $ xmppAForm $ runFormGet $ renderBootstrap $ xmppAForm $
@ -78,7 +62,10 @@ getXMPPR' redirto = xmppPage $ do
storecreds creds = do storecreds creds = do
void $ runAnnex undefined $ setXMPPCreds creds void $ runAnnex undefined $ setXMPPCreds creds
liftAssistant notifyNetMessagerRestart liftAssistant notifyNetMessagerRestart
redirect redirto redirect StartXMPPPairR
#else
getXMPPR = xmppPage $
$(widgetFile "configurators/xmpp/disabled")
#endif #endif
{- Called by client to get a list of buddies. {- Called by client to get a list of buddies.

View file

@ -15,7 +15,6 @@
/config/repository RepositoriesR GET /config/repository RepositoriesR GET
/config/preferences PreferencesR GET /config/preferences PreferencesR GET
/config/xmpp XMPPR GET /config/xmpp XMPPR GET
/config/xmpp/for/pairing XMPPForPairingR GET
/config/repository/new/first FirstRepositoryR GET /config/repository/new/first FirstRepositoryR GET
/config/repository/new NewRepositoryR GET /config/repository/new NewRepositoryR GET

2
debian/changelog vendored
View file

@ -18,6 +18,8 @@ git-annex (4.20130228) UNRELEASED; urgency=low
* assistant: Fix bug in direct mode that could occur when a symlink is * assistant: Fix bug in direct mode that could occur when a symlink is
moved out of an archive directory, and resulted in the file not being moved out of an archive directory, and resulted in the file not being
set to direct mode when it was transferred. set to direct mode when it was transferred.
* webapp: Proceed automatically on from "Configure jabber account"
to pairing.
-- Joey Hess <joeyh@debian.org> Wed, 27 Feb 2013 23:20:40 -0400 -- Joey Hess <joeyh@debian.org> Wed, 27 Feb 2013 23:20:40 -0400