webapp: Proceed automatically on from "Configure jabber account" to pairing.
This commit is contained in:
parent
aa2bc92b73
commit
5274713305
4 changed files with 9 additions and 21 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue