webapp: Improved UI for pairing your own devices together using XMPP.

This commit is contained in:
Joey Hess 2013-03-15 15:05:02 -04:00
parent 48d9a3182f
commit 39e979fb65
13 changed files with 145 additions and 72 deletions

View file

@ -62,7 +62,7 @@ getXMPPR = xmppPage $ do
storecreds creds = do
void $ liftAnnex $ setXMPPCreds creds
liftAssistant notifyNetMessagerRestart
redirect StartXMPPPairR
redirectBack
#else
getXMPPR = xmppPage $
$(widgetFile "configurators/xmpp/disabled")
@ -84,6 +84,7 @@ buddyListDisplay = do
autoUpdate ident NotifierBuddyListR (10 :: Int) (10 :: Int)
#ifdef WITH_XMPP
myjid <- lift $ liftAssistant $ xmppClientID <$> getDaemonStatus
let isself (BuddyKey b) = Just b == myjid
buddies <- lift $ liftAssistant $ do
rs <- filter isXMPPRemote . syncGitRemotes <$> getDaemonStatus
let pairedwith = catMaybes $ map (parseJID . getXMPPClientID) rs