775 Commits

Author SHA1 Message Date
Micah Lee
f5919a242d Only import pwd in macOS, because it does not exist in Windows 2020-08-21 14:49:23 -04:00
Micah Lee
0d4d5b773c Split chat messages into username and message, and change UI for displaying messages 2020-08-19 19:40:00 -04:00
Micah Lee
b7ec7694c3 Merge branch 'chat' of https://github.com/SaptakS/onionshare into SaptakS-chat 2020-08-19 18:56:55 -04:00
Saptak S
fe673e97be Adds noscript HTML 2020-07-04 19:25:38 +05:30
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
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
22732b8c41 Merge branch 'develop' into chat 2020-05-02 02:49:49 +05:30
Micah Lee
a53b95867f Fix linux tor paths, make event handler properly quit thread 2020-04-06 19:49:49 -07:00
Micah Lee
fcccdc5403 Merge branch '910_flatpak' of github.com:micahflee/onionshare into 910_flatpak 2020-04-05 21:03:29 -07:00
Micah Lee
338562c011 Merge branch 'develop' into 1064_tabs 2020-03-22 11:23:24 -07:00
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
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
ab5d7d41ea Change colors 2020-03-08 12:38:25 +05:30
Sam
f6fb08f6b2 Added ascii-logo 2020-01-03 14:21:31 -05:00
Micah Lee
e7bd89c41d Refactor Onion to store all state for auto-start timer directly in the mode settings, and not in the Onion object itself 2019-12-08 12:51:30 -08:00
Micah Lee
48070409f7 Move private_key, hidservauth_string, and password from "persistent" mode settings to "onion" mode settings; and make it so the onion settings are always saved in each tab, even if the tab is not persistent, so if you stop and start a service in the same tab it has the same onion address and password 2019-12-08 10:13:56 -08:00
Miguel Jacq
29e60fcacf Ensure we always set the service id, so we can stop the right one (particularly when scheduling a share) 2019-11-29 18:40:45 +11:00
Miguel Jacq
df31e2fc58 Remove duplicate comment 2019-11-29 16:46:31 +11:00
Miguel Jacq
065e849051 Fix up autostart (scheduled shares) 2019-11-29 16:38:34 +11:00
Micah Lee
657d51de48 Make cleaning up the onion more reliably kill the tor subprocess, and make iit so testing tor settings in the settings dialog always uses a tmp tor data dir 2019-11-28 20:32:28 -08:00
Micah Lee
5cd2fc8ff7 Fix typos in comments 2019-11-28 19:30:48 -08:00
Micah Lee
327f74b96d If running from onionshare CLI, use a new temporary tor data dir, and if running onionshare-gui, always use the same tor data dir 2019-11-28 14:02:00 -08:00
Micah Lee
3c2c6e2327 Update tor paths to use paths relative to the binary, instead of absolute paths 2019-11-27 15:41:37 -08:00
Micah Lee
38b3b1a933 Make Common.get_resource_path find the resource path relative to the binary, instead of using an absolute path 2019-11-27 14:54:41 -08:00
Micah Lee
7dcc71c330 Start refactoring Onion to allow for managing a separate onion service for each tab 2019-11-10 17:55:07 -08:00
Micah Lee
817118572f When shutting down the web server, only use basic auth if there is a password -- this avoids warnings when running tests 2019-11-10 13:36:35 -08:00
Micah Lee
535ade0096 Add CLI tests in 2019-11-08 16:44:21 +08:00
Micah Lee
66aea71468 Start writing tabs tests 2019-11-03 00:47:55 -07:00
Micah Lee
3b3c805a34 Make it so passing in --persistent [filename] in the CLI, with no other args, will load that persistent mode settings file and start the server, without needing to do other validations like passing in a list of filenames 2019-11-02 23:32:44 -07:00
Micah Lee
accb5c4e07 When disabling persistence, or closing a persistent tab, delete the mode settings file for that tab 2019-11-02 23:06:26 -07:00
Micah Lee
960322a363 Starting to make persistent tabs persistent 2019-11-02 21:45:55 -07:00
Micah Lee
51cda4c52a Make ModeSettings be able to save and load 2019-11-02 21:00:23 -07:00
Micah Lee
4a804d7901 Add stub save function in ModeSettings 2019-11-02 19:12:06 -07:00
Micah Lee
e9e7ddc7a8 Stop worrying about common.gui.config in settings and update check 2019-11-02 17:13:06 -07:00
Micah Lee
1bc516f569 Remove mode settings from global settings object 2019-11-02 17:06:13 -07:00
Micah Lee
16268b5b3e Fix CLI tests, and also fix bug related to autostop_sharing that the tests found 2019-11-02 17:01:47 -07:00
Micah Lee
a6f7796ccf Refactor onionshare CLI to accept and use all mode settings 2019-11-02 15:37:21 -07:00
Micah Lee
f6f4665e30 Fix CLI to work with mode settings 2019-11-02 14:56:40 -07:00
Micah Lee
30df0c4bd8 Make the Web object load from mode settings instead of global settings 2019-11-02 14:35:51 -07:00
Micah Lee
61dc04a105 Make a new ModeSettings class in onionshare, and use this instead of tab_settings 2019-11-02 10:43:20 -07:00
Micah Lee
bd832051e0 Make a new onionshare_gui.GuiCommon object, and move css from onionshare.Common into it 2019-10-20 20:01:09 -07:00
Micah Lee
12d2bb700e Use .format to format file sizes again 2019-10-20 18:14:00 -07:00
Micah Lee
3085e4ee0f Fix syntax errors 2019-10-20 17:59:12 -07:00
Micah Lee
16bcbbf55d Replace .format with python 3.6 f-strings in onionshare module 2019-10-20 10:15:16 -07:00
Miguel Jacq
3fb232c1f3 Communicate a 405 error properly to the UI 2019-10-19 14:50:40 +11:00
Micah Lee
24fb942059 Merge branch 'static_bug' into develop 2019-10-13 09:55:51 -07:00
Micah Lee
8d50e4782e Initialize the flask app with a random static path, to avoid issue where /static doesn't work in website mode 2019-10-13 09:55:36 -07:00
Micah Lee
a299ec95ce Fix how Serbian (latin) is written 2019-10-13 09:39:17 -07:00
Micah Lee
2c323aaa40 Added new languages (Arabic, Dutch, Persian, Romanian, Serbian) and removed one (Finnish) 2019-10-12 21:50:33 -07:00