50 Commits

Author SHA1 Message Date
Saptak S
fe673e97be Adds noscript HTML 2020-07-04 19:25:38 +05:30
Saptak S
7b16e03b00 Merge branch 'develop' of github.com:micahflee/onionshare into chat 2020-07-04 13:42:20 +05:30
Miguel Jacq
91603c01fb Use a more efficient way of parsing the path to /img on the static URL in order to load ajax.gif via receive.js 2020-06-08 09:57:55 +10:00
Miguel Jacq
75da5a6675 #1123 Load the ajax.gif in receive.js via relative directory, now that static path is not... static 2020-06-08 09:57:30 +10:00
Saptak S
3a6de61e66 Show in UX that there's a disconnect 2020-06-07 15:56:05 +05:30
Miguel Jacq
d29e31849a #1121 upgrade to jQuery 3.5.1 2020-05-28 15:19:54 +10:00
Saptak S
9d00627df3 Update username via both socket and ajax
- socket takes care of modifying the username in the forked socket
session and sending a status message to chat window
- ajax request takes care of updating the flask session so that on
refresh or re-opening of the URL in same browser, the username remains
same
2020-05-11 12:51:46 +05:30
Saptak S
7935d07bb3 Keep save button disabled if changed username invalid
- Disabled till username not changed
- On change, if username is empty, then disabled
- On change, if username is changed back to previous, then disabled
- Else allow saving
2020-05-10 01:55:31 +05:30
Saptak S
52971ad371 Refactors logic for chat user list and scroll
- Refactors server side code to use instance variable instead of
background thread to generate a list of connected users
- Send this user list anytime any change is made to the list. It can
be: join, update username, disconnect
- In js, render the entire user list everytime it is received.
- Scroll to the bottom of the chat, everytime the current user
sends a message
- Else, if already at the bottom of the chat, scroll to the bottom
after appending incoming status or chat message. But if the user
is scrolled up in the chat window, then do not scroll to the bottom
- When refreshed or close tab is clicked, default browser warning is
shown.
- On receiving disconnect, the browser removes user from room.
- If refreshed, it is shown as if the user left and joined again.
2020-05-04 03:47:13 +05:30
Saptak S
0376a36822 Adds list of active users in the chat and allows username change
- allows users to update their username and save the new username
- runs a background thread for every user session which emits a
broadcast with the username so every user can build their list of
active users in the frontend via the socket information
- on updating username, stop the old thread and start a new thread
with the new username being emitted. The username is updated in
everyone's list along with a status message for the same.
2020-03-12 14:54:48 +05:30
Saptak S
425beadce7 Sanitize message before appending them to the HTML 2020-03-11 18:10:08 +05:30
Saptak S
bc3df3319a Create GUI for onionshare chat mode with the tab workflow 2020-03-09 17:44:00 +05:30
Saptak S
ec7a969dde Create web UI and socket code for the chat interface 2020-03-08 14:51:43 +05:30
Micah Lee
cccbe35276 Add breadcrumbs for website mode 2019-09-15 16:44:24 -07:00
Micah Lee
fdb94eba0c Only allow downloading of individual files if it is enabled in settings, and stop sharing automatically isn't 2019-09-01 20:36:30 -07:00
Micah Lee
15e8ec4321 Change link style for directory listing 2019-09-01 16:13:05 -07:00
Micah Lee
f979bbe97c Remove old noscript css styles 2019-05-30 17:55:58 -07:00
Micah Lee
e4b0f04504 Strip NoScript XSS warning, because the Tor Browser bug it addressed has been fixed 2019-05-29 19:27:21 -07:00
Micah Lee
403125f844 Update ReceiveMode to no longer rely on slugs 2019-05-21 10:18:40 -07:00
Illia Volochii
a66377904d Upgrade jQuery to 3.4.0 2019-04-19 18:20:58 +03:00
Miguel Jacq
2666bb2dae Use png rather than svg for warning image. Concatenate flash messages with commas to reduce page height. Allow warning message to be wider 2019-03-11 17:27:17 +11:00
Miguel Jacq
7e4efc39e5 remove unnecessary bit of css 2019-02-25 14:26:29 +11:00
Miguel Jacq
db6ba60973 Move the noscript warning to top of page and make it appear less of an error, per more recommendations (and with supplied svg) from @ninavizz 2019-02-24 10:22:44 +11:00
Miguel Jacq
18962ab41a Make progress, noscript warning, and flashes appear above the form, but beneath the logo 2019-02-23 13:16:06 +11:00
Micah Lee
2220281e80 Fix minor bugs: When making the ajax POST request, strip the trailing slash from window.location.pathname so the URL works in public mode; and add a newline before printing message when receiving file 2019-02-18 10:57:20 -08:00
Micah Lee
f887d543d1 Remove console.log() debug statements 2019-02-17 21:19:01 -08:00
Micah Lee
fb2ffdae8b On error, remove the upload div 2019-02-17 09:58:57 -08:00
Micah Lee
711377f0d5 Don't use jQuery for the ajax request, instead manually use an XMLHttpRequest in order to more easily support multiple upload divs 2019-02-17 09:51:19 -08:00
Micah Lee
5cdd5521e9 Update red and green colors to match the Qt GUI colors 2019-02-17 08:12:45 -08:00
Micah Lee
1b68adc6d0 Refactor file upload interface to use jQuery, and to have separate upload progress bars. The progess bars make clear when the data has been sent to the first Tor node, and when its waiting on the rest of the Tor network. It also allows the sender to cancel uploads 2019-02-15 18:52:28 -08:00
Micah Lee
002f91d108 Added jQuery, and jQuery license 2019-02-15 15:33:54 -08:00
Micah Lee
032d545030 Make uploading over ajax, and ajax flash messages, work 2019-02-15 14:52:00 -08:00
Micah Lee
bc9312da30 Display upload progress percent in submit button 2019-02-14 09:45:41 -08:00
Micah Lee
109276661b Update the noscript upload instructions on the receive mode upload page, and add separate page for instructions to disable NoScript XSS setting 2019-02-14 09:31:39 -08:00
Micah Lee
ed86769e65 Use a div that gets hidden, instead of a <noscript> tag, because the <noscript> tag doesn't when the security slider is on Safer 2019-02-13 17:40:33 -08:00
Micah Lee
d7476d8556 Starting to implement upload progress 2019-02-13 09:56:36 -08:00
Micah Lee
4b8e910cac Add noscript warning 2019-02-13 09:19:04 -08:00
Miguel Jacq
e4ad7bcd22 remove code that doesn't work anyway 2019-02-13 14:10:27 +11:00
Miguel Jacq
29884941ed fix missing bracket 2019-02-13 13:53:03 +11:00
Miguel Jacq
f4b701a594 Use Ajax to send files in receive mode to workaround browser bug with large files 2019-02-13 12:49:42 +11:00
Micah Lee
4bf69445a0 Make 404 error page look better, and remove the text that it's probably a typo, because in public mode that isn't necessarily true 2018-09-15 19:52:53 -07:00
Miguel Jacq
194478f346 Improve styling of flash() messages by using categories, and style the closed.html. Replace references to 'Uploading' with 'Sending' for consistency 2018-07-17 11:45:14 +10: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
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
aeaada0a5c Add flash messages to receive template, and begin implementing upload POST 2018-03-13 05:50:26 -07:00
Micah Lee
6cc350b4f6 Started designing HTML/CSS for receive mode 2018-03-07 10:12:10 -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