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
pairPage $
$(widgetFile "configurators/pairing/xmpp/prompt")
, redirect XMPPForPairingR -- go get XMPP configured, then come back
, redirect XMPPR -- go get XMPP configured, then come back
)
#else
getStartXMPPPairR = noXMPPPairing

View file

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

View file

@ -15,7 +15,6 @@
/config/repository RepositoriesR GET
/config/preferences PreferencesR GET
/config/xmpp XMPPR GET
/config/xmpp/for/pairing XMPPForPairingR GET
/config/repository/new/first FirstRepositoryR 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
moved out of an archive directory, and resulted in the file not being
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