514 Commits

Author SHA1 Message Date
Micah Lee
87e8652c18 Fix stay_open regression bug. Before, it was closing automatically even when the setting wasn't set. Also, remove the --stay-open option from the GUI, since GUI settings are set in the settings dialog not cli args 2018-05-04 16:35:32 -07:00
Micah Lee
876e7145d0 Add a few receive mode web tests, to test the receive_allow_receiver_shutdown and receive_public_mode settings 2018-04-29 18:19:00 -07:00
Micah Lee
69b799fe80 Implemented test: test_share_mode_close_after_first_download 2018-04-29 18:00:10 -07:00
Micah Lee
7902a97271 Display the URL without the slug for receive_public_mode in the CLI 2018-04-29 16:44:45 -07:00
Micah Lee
71e2b8aab4 Make the "download page loaded" and "upload page loaded" messages displayed as systray notifications instead of in the status bar, and make it work for Receive Mode 2018-04-29 16:41:05 -07:00
Micah Lee
a51e75bf01 Add support for receive mode's "public mode", which doesn't use a slug. Still needs more testing 2018-04-29 16:33:48 -07:00
Micah Lee
7f320d3535 Display desktop notification to the user when the receiver closes the server, and finish up closing the server 2018-04-29 15:49:18 -07:00
Micah Lee
ae13492749 Make receive_allow_receiver_shutdown setting work 2018-04-29 15:34:11 -07:00
Micah Lee
e8bd9be2e2 Add two new receive mode settings: receive_allow_receiver_shutdown and receive_public_mode 2018-04-28 21:08:53 -07:00
Micah Lee
1cec6d48de Fix a race condition where the URL was sometimes getting copied to the clipboard before it was actually generated, causing a crash 2018-04-28 15:00:23 -07:00
Micah Lee
a09bfdb2cc Generalize the handling of Tor exceptions, more logging in Web 2018-04-28 13:59:36 -07:00
Micah Lee
7a47570e18 Fixed crash when starting recieve mode server 2018-04-27 23:19:46 -07:00
Micah Lee
6899dc4942 Make Web's the REQUEST_ constants static attributes 2018-04-26 11:00:59 -07:00
Micah Lee
68cd470baf Instead of creating a Web object and passing it into OnionShareGui, now each mode creates its own separate Web object, instantiated in its own way 2018-04-26 09:30:53 -07:00
Micah Lee
3b150f0cb4 Merge branch 'receiver-mode' into receiver-mode-gui 2018-04-24 17:22:06 -07:00
Micah Lee
86247b7456 In CLI recieve mode, tell the user where to look for uploaded files 2018-04-24 17:18:18 -07:00
Micah Lee
52fa4f3485 Update GPL copyright year 2018-04-24 10:07:59 -07:00
Micah Lee
dd5e5ec247 Remove the desktop notification setting -- everyone gets them now 2018-04-24 09:26:06 -07:00
Micah Lee
a930d7828d Fix a few bugs that I missed when merging in develop 2018-04-22 17:46:14 -07:00
Micah Lee
5068fe8eda Add new WSGI middleware just to attach the Web object to environ, and improve the UI of file upload progress 2018-03-21 18:27:42 -07:00
Micah Lee
4153c11b5d Remove the WSGI middleware, because I'm solving the problem in a different way 2018-03-21 17:51:42 -07:00
Micah Lee
08247c005f For receive mode, use a custom flask Request, and a custom TemporaryFile, in order to keep track of file upload progress 2018-03-21 17:34:11 -07:00
Micah Lee
e8bb691705 Add WSGI middleware in order to capture the progress of POST request uploads 2018-03-19 02:25:22 -07:00
Micah Lee
b6a3edd1db Fix bug with shutdown_slug 2018-03-14 08:33:25 -07:00
Micah Lee
0734de68ea Display a template after closing the server, and standardize the style of other simple templates 2018-03-14 08:30:14 -07:00
Micah Lee
5665b3c313 In receive mode, allow uploader to close the server when they are done 2018-03-14 08:16:09 -07:00
Micah Lee
1410b445fa Add receive mode warning, and print notification for each upload, in CLI mode 2018-03-14 07:35:04 -07:00
Micah Lee
15ff966986 Uploading files works in CLI 2018-03-14 04:03:50 -07:00
Micah Lee
aeaada0a5c Add flash messages to receive template, and begin implementing upload POST 2018-03-13 05:50:26 -07:00
Micah Lee
89544694cc Fixed bug in validating downloads dir related to moving settings into common 2018-03-13 03:59:52 -07:00
Micah Lee
14d7921bb9 Move settings into the Common object, so the settings are available to all objects (including Web, which is required for receive mode) 2018-03-13 03:28:47 -07:00
Micah Lee
37389f85ac Fix tests after refactoring Common 2018-03-13 02:22:26 -07:00
Micah Lee
c1ff40b5b3 Completely refactor common to make a Common class, and pass that class down into all parts of the program 2018-03-08 10:18:31 -08:00
Micah Lee
69a94c5852 Rename close_after_seconds class to ShutdownTimer 2018-03-08 05:50:23 -08:00
Micah Lee
d2a11e696e Move ZipWriter from common into web, because that's the only place it's used 2018-03-08 05:45:07 -08:00
Micah Lee
ccc2d10604 In CLI, validate downloads_dir when starting in receive mode 2018-03-06 07:40:57 -08:00
Micah Lee
162a50b217 Change default receive mode download directory to ~/OnionShare 2018-03-06 05:25:49 -08:00
Micah Lee
9c6049c1ca Show different message for receive mode than for send mode 2018-03-06 03:24:17 -08:00
Micah Lee
5d280ec68f Move (optional) javascript into file, and use CSP to ban inline js 2018-03-06 03:17:54 -08:00
Micah Lee
f331ff06ae Stop using inline css, and reorganize static folder 2018-03-06 03:03:24 -08:00
Micah Lee
0b26950d5b Create separate templates and static folder, and make the web app use both of these. Yay, now we have real static resources 2018-03-06 02:54:12 -08:00
Micah Lee
05a935e049 Make separate template for send and receive mode 2018-03-06 02:06:44 -08:00
Micah Lee
e1bbed7859 Make separate routes for send and receive modes 2018-03-06 01:50:43 -08:00
Micah Lee
dfe62ff707 Refactor OnionShareGui to use new Web class 2018-03-06 00:56:40 -08:00
Micah Lee
5b29101c34 Refactor web.py to move all the web logic into the Web class, and refactor onionshare (cli) to work with it -- but onionshare_gui is currently broken 2018-03-05 11:06:59 -08:00
Micah Lee
4ee3948908 Web needs to know about receive mode, not the OnionShare object 2018-03-05 08:48:04 -08:00
Micah Lee
10926f6cac Add downloads_dir to settings, make it default to ~/Downloads 2018-03-05 07:52:51 -08:00
Micah Lee
7aa8c7f995 Add command line flag for receive mode 2018-03-05 07:45:10 -08:00
Micah Lee
87c530e754 Merge branch 'cancel_share' of https://github.com/mig5/onionshare into mig5-cancel_share 2018-02-25 16:14:59 -08:00
Miguel Jacq
a5219c0a77 Add ability to cancel a share 2018-02-25 17:44:27 +11:00