Commit graph

47 commits

Author SHA1 Message Date
Joey Hess
af4d919793
unified AuthToken type between webapp and tor 2016-11-22 14:18:34 -04:00
Joey Hess
afc5153157 update my email address and homepage url 2015-01-21 12:50:09 -04:00
Joey Hess
66b8b9c094 webapp: Use securemem for constant time auth token comparisons.
Debian stable does not have securemem, but neither does it have warp-tls,
so just disable use of securemem when not building with https support.
2014-03-12 21:41:20 -04:00
Joey Hess
ff4f008591 clean up build warnings with yesod 1.2, while still building with 1.1 2013-06-27 01:15:28 -04:00
Joey Hess
31753bad46 add liftH shim between yesod versions, to avoid needing zillions of ifdefs 2013-06-03 13:51:54 -04:00
Joey Hess
79fd677805 WIP yesod 1.2 2013-06-03 11:25:23 -04:00
Joey Hess
1d0b692198 webapp: Fix a race that sometimes caused alerts or other notifications to be missed if they occurred while a page was loading.
When a page is loaded, the javascript requests an notification url, and
does long polling on the url to be informed of changes. But if a change
occured before the notification url was requested, it would not be notified
of that change, and so the page display would not update.

I fixed this by *always* updating the page display after it gets
the notification url. This is extra work, but the overhead is not noticable
in the other overhead of loading a page.

(A nicer way would be to somehow record the version of a page initially
loaded, and then compare it with the current version when getting the
notification url, and only force an update if it's changed. But getting
the "version" of the different parts of the page that use long polling
is difficult.)
2013-03-27 14:56:20 -04:00
Joey Hess
4c0642a70d stop abusing UltDest here, just get Referer header by hand 2013-03-16 19:00:11 -04:00
Joey Hess
c94c99942b make liftAnnex and liftAssistant polymorphic, like liftIO 2013-03-16 00:19:56 -04:00
Joey Hess
9cf4701a8f no longer need webapp state storage! excellent 2013-03-15 01:01:25 -04:00
Joey Hess
0ef8d806ac gratuitous rename HomeR -> DashboardR 2013-03-12 22:18:36 -04:00
Joey Hess
907b0c0d78 better liftAnnex, avoid using runAnnex undefined 2013-03-04 16:36:38 -04:00
Joey Hess
09cbbaf537 move local repo list out of control menu 2013-01-03 16:34:57 -04:00
Joey Hess
909d726d1d update list of other repos when adding one
This way, once it switches to the new repo, the user can switch back to the
old one, and its menu will allow switching to the new again.

However, if there are multiple repos, the others don't yet learn about the
new repo.
2013-01-03 15:34:50 -04:00
Joey Hess
de2e287133 webapp: Add UI to stop assistant.
Would like to also have restart UI, but that's rather harder to do,
seems it'd need to start another copy of the webapp, and redirect the
browser to its new url, but running two assistants in the same repo at
the same time isn't good.
2013-01-03 15:24:21 -04:00
Joey Hess
3dfc9cadb0 simplify 2012-11-25 00:38:11 -04:00
Joey Hess
59733456ed refactor 2012-11-25 00:27:17 -04:00
Joey Hess
c9d58a6590 Fix build of assistant without yesod. 2012-11-13 15:36:34 -04:00
Joey Hess
8f08aa3f45 better handling of lifting from XMPP -> Assistant 2012-11-05 19:39:08 -04:00
Joey Hess
6a61829e2d add buddy list to pairing UI 2012-11-02 21:13:06 -04:00
Joey Hess
88d1907278 where indentation 2012-10-31 02:34:03 -04:00
Joey Hess
93ffd47d76 finished pushing Assistant monad into all relevant files
All temporary and old functions are removed.
2012-10-30 17:14:51 -04:00
Joey Hess
ea8df8fe9f cleanup daemonStatus accessors 2012-10-30 14:44:18 -04:00
Joey Hess
86cb3faf51 moved ThreadedMonad to Types 2012-10-29 19:07:10 -04:00
Joey Hess
67ce7929a5 Assistant monad, stage 3
All toplevel named threads are converted to the Assistant monad.

Some utility functions still need to be converted.
2012-10-29 14:07:12 -04:00
Joey Hess
4dbdc2b666 Assistant monad, stage 2.5
Converted several threads to run in the monad.

Added a lot of useful combinators for working with the monad.

Now the monad includes the name of the thread.

Some debugging messages are disabled pending converting other threads.
2012-10-29 02:21:04 -04:00
Joey Hess
4e765327ca Assistant monad, stage 1
This adds the Assistant monad, and an AssistantData structure.
So far, none of the assistant's threads run in the monad yet.
2012-10-29 00:15:43 -04:00
Joey Hess
51ef707a59 nub the autostart file
It's possible for the file to get duplicate lines in it, and if so, we want
to ignore the dups.
2012-10-14 15:19:34 -04:00
Joey Hess
8bc70a85c6 add tooltips 2012-09-27 12:55:00 -04:00
Joey Hess
cb3c9340f8 license the webapp under the AGPL 3+
This means that anyone serving up the webapp to users as a service
(ie, without providing any git-annex binary at all to the user) still needs
to provide a link to the source code for it, including any modifications
they may make.

This may make git-annex be covered by the AGPL as a whole when it is built
with the webapp. If in doubt, you should ask a lawyer.

When git-annex is built with the webapp disabled, no AGPLed code is used.
Even building in the assistant does not pull in AGPLed code.
2012-09-24 14:48:47 -04:00
Joey Hess
18bae020ed make other repositories list list all autostarted repos
And add a form to add another, unrelated repository
2012-09-18 17:50:07 -04:00
Joey Hess
1e41c0d85e update pair request alert when button is pressed 2012-09-09 01:02:44 -04:00
Joey Hess
e59b0a1c88 first pass at alert buttons
They work fine. But I had to go to a lot of trouble to get Yesod to render
routes in a pure function. It may instead make more sense to have each
alert have an assocated IO action, and a single route that runs the IO
action of a given alert id. I just wish I'd realized that before the past
several hours of struggling with something Yesod really doesn't want to
allow.
2012-09-08 19:57:15 -04:00
Joey Hess
837cd79e4f add ssh confirmation page
also broke out webapp types into a separate module
2012-09-02 00:49:25 -04:00
Joey Hess
b6b8f6da9c implement resuming of paused transfers
Currently waits for a new transfer slot to open up, which probably needs to
change..
2012-08-12 12:11:20 -04:00
Joey Hess
09449792fa factor out onclick javascript 2012-08-08 17:07:38 -04:00
Joey Hess
94fcd0cf59 add routes to pause/start/cancel transfers
This commit includes a paydown on technical debt incurred two years ago,
when I didn't know that it was bad to make custom Read and Show instances
for types. As the routes need Read and Show for Transfer, which includes a
Key, and deriving my own Read instance of key was not practical,
I had to finally clean that up.

So the compact Key read and show functions are now file2key and key2file,
and Read and Show are now derived instances.

Changed all code that used the old instances, compiler checked.
(There were a few places, particularly in Command.Unused, and the test
suite where the Show instance continue to be used for legitimate
comparisons; ie show key_x == show key_y (though really in a bloom filter))
2012-08-08 16:20:24 -04:00
Joey Hess
94e92a1b58 make alerts change tense when they finish 2012-08-06 15:00:46 -04:00
Joey Hess
3add2cd3ba wire up scan and transfer to newly added removable drive
remote setup still todo
2012-08-04 21:18:57 -04:00
Joey Hess
1f89712e6b add a navbar button that opens the repo in the desktop's native file browser
This should work on linux (xdg-open) and OSX (open). If the program
is not in $PATH, it falls back to opening a browser window/tab with file:///

The only tricky bit is the javascript code, that handles clicking on the
link. This is to avoid unnecessary page refreshes. Until I added the
return false at the end, the <a>'s normal click event also fired, so two
file browsers opened. I have not checked portability extensively.
2012-08-03 10:02:56 -04:00
Joey Hess
ecc168aba3 implemented firstrun repository creation and redirection to full webapp
Some of the trickiest code I've possibly ever written.
2012-08-01 16:10:26 -04:00
Joey Hess
4b5ffe8f9b implemented the addrepository form
shiny!
2012-07-31 17:57:08 -04:00
Joey Hess
c70496dc7f improve first run screen 2012-07-31 16:13:09 -04:00
Joey Hess
04794eafc0 webapp now starts up when run not in a git repo 2012-07-31 12:17:31 -04:00
Joey Hess
b9b0097876 tweak types so the webapp can run without a threadstate when outside an annex 2012-07-31 11:19:40 -04:00
Joey Hess
2c8bbdf307 made navbar work
also added an About page and a stub Config page.
2012-07-31 02:30:26 -04:00
Joey Hess
58dfa3fa5b split up webapp files 2012-07-31 01:11:32 -04:00