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

@ -2,36 +2,33 @@
<a href="@{AddDriveR}">
<i .icon-plus-sign></i> Removable drive
<p>
Clone this repository to a USB drive, memory stick, or other #
removable media.
<p>
Add a USB drive, memory stick, or other removable media. #
For offline archiving, backups, or to #
<a href="http://en.wikipedia.org/wiki/Sneakernet">SneakerNet</a> #
between computers.
<h3>
<a href="@{StartXMPPPairSelfR}">
<i .icon-plus-sign></i> Share with your other devices
<p>
Keep files in sync between your devices running git-annex.
<h3>
<a href="@{StartXMPPPairFriendR}">
<i .icon-plus-sign></i> Share with a friend
<p>
Combine your repository with a friend's repository, and share your files.
<h3>
<a href="@{StartLocalPairR}">
<i .icon-plus-sign></i> Local computer
<p>
Pair with a computer to automatically keep files in sync #
Pair with a computer to keep files in sync quickly, #
over your local network.
<p>
For easy sharing with friends and devices in the same location.
<h3>
<a href="@{StartXMPPPairR}">
<i .icon-plus-sign></i> Share with a friend
<p>
Pair with a friend's computer, to combine your repositories and #
share files.
<p>
For easy sharing with friends and devices, over the internet.
<h3>
<a href="@{NewRepositoryR}">
<i .icon-plus-sign></i> Add a local repository
<i .icon-plus-sign></i> Add another repository
<p>
Make another repository on your computer.

View file

@ -9,8 +9,7 @@
$nothing
A pair request has been sent to all other devices that #
have been configured to use your jabber account. #
It will be answered automatically by any that see it; #
no action is required on your part.
It will be answered automatically by any devices that see it.
$else
Pair request accepted.
<h2>

View file

@ -5,7 +5,7 @@
Pairing with #{name} will combine your two git annex #
repositories into one, allowing you to share files.
<p>
<a .btn .btn-primary .btn-large href="@{FinishXMPPPairR pairkey}">
<a .btn .btn-primary .btn-large href="@{FinishXMPPPairFriendR pairkey}">
Accept pair request
<a .btn .btn-large href="@{DashboardR}">
No thanks

View file

@ -0,0 +1,12 @@
<div .span9 .hero-unit>
<h2>
Share with a friend
<p>
You can combine your repository with a friend's repository #
to share your files. Your repositories will automatically be kept in #
sync. Only do this if you want your friend to see all the files #
in this repository!
<p>
Here are the friends currently available via your Jabber account.
<p>
^{buddyListDisplay}

View file

@ -1,11 +0,0 @@
<div .span9 .hero-unit>
<h2>
Pairing with another computer
<p>
Pairing with a another computer combines both git-annex repositories #
into a single shared repository, with changes kept in sync.
<p>
You can pair with any of your friends using jabber, or with another #
device that shares your own jabber account.
<p>
^{buddyListDisplay}

View file

@ -0,0 +1,18 @@
<div .span9 .hero-unit>
<h2>
Sharing with your other devices
<p>
If you have multiple devices, all running git-annex, and using #
your Jabber account #{account}, you can configure them to share #
your files between themselves.
<p>
For example, you can have a computer at home, one at work, and a #
laptop, and their repositories will automatically be kept in sync.
<p>
Make sure your other devices are online and configured to use #
your Jabber account before continuing.
<p>
<a .btn .btn-primary .btn-large href="@{RunningXMPPPairSelfR}">
Start sharing with my other devices #
<a .btn .btn-large href="@{DashboardR}">
Cancel

View file

@ -0,0 +1,11 @@
<div .span9 .hero-unit>
<h2>
Unable to get in touch with any other devices.
<p>
Make sure your other devices are online and configured to use #
your Jabber account before continuing.
<p>
<a .btn .btn-primary .btn-large href="@{RunningXMPPPairSelfR}">
Start sharing with my other devices #
<a .btn .btn-large href="@{DashboardR}">
Cancel

View file

@ -7,17 +7,19 @@
$if isNothing myjid
Not connected to the jabber server. Check your network connection ...
$else
Nobody is currently available.
Searching...
$else
$forall (name, away, canpair, paired, buddyid) <- buddies
<tr>
<td>
<i .icon-user></i> #
$if away
<span .muted>
#{name}
$if isself buddyid
<i .icon-star></i> #
<span :away:.muted>
your other devices
$else
#{name}
<i .icon-user></i> #
<span :away:.muted>
#{name}
<td>
$if away
<span .muted>
@ -28,7 +30,11 @@
paired
$else
$if canpair
<a .btn .btn-primary .btn-small href="@{RunningXMPPPairR buddyid}">
Start pairing
$if isself buddyid
<a .btn .btn-primary .btn-small href="@{RunningXMPPPairSelfR}">
Share pairing
$else
<a .btn .btn-primary .btn-small href="@{RunningXMPPPairFriendR buddyid}">
Start pairing
$else
not using git-annex