summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2019-09-08 09:45:53 -0700
committerMicah Lee <micah@micahflee.com>2019-09-08 09:45:53 -0700
commitf089ae5847164382a814623196b72638253715ac (patch)
tree28db8a1a48d3f801934a80afb525e84f3c92c89e
parent3f7c4a4e2503c26dabc37f656c9875b64c63a0a6 (diff)
downloadonionshare-f089ae5847164382a814623196b72638253715ac.tar.gz
onionshare-f089ae5847164382a814623196b72638253715ac.zip
Make sure IndividualFileHistoryItem widgets display properly in receive mode too
-rw-r--r--onionshare/web/receive_mode.py9
-rw-r--r--onionshare/web/web.py1
2 files changed, 9 insertions, 1 deletions
diff --git a/onionshare/web/receive_mode.py b/onionshare/web/receive_mode.py
index 5029232f..8604a889 100644
--- a/onionshare/web/receive_mode.py
+++ b/onionshare/web/receive_mode.py
@@ -21,6 +21,8 @@ class ReceiveModeWeb:
self.can_upload = True
self.uploads_in_progress = []
+ self.cur_history_id = 0
+
self.define_routes()
def define_routes(self):
@@ -29,6 +31,13 @@ class ReceiveModeWeb:
"""
@self.web.app.route("/")
def index():
+ history_id = self.cur_history_id
+ self.cur_history_id += 1
+ self.web.add_request(self.web.REQUEST_INDIVIDUAL_FILE_STARTED, '{}'.format(request.path), {
+ 'id': history_id,
+ 'status_code': 200
+ })
+
self.web.add_request(self.web.REQUEST_LOAD, request.path)
r = make_response(render_template('receive.html',
static_url_path=self.web.static_url_path))
diff --git a/onionshare/web/web.py b/onionshare/web/web.py
index 610c14c2..6cd30c93 100644
--- a/onionshare/web/web.py
+++ b/onionshare/web/web.py
@@ -209,7 +209,6 @@ class Web:
self.cur_history_id += 1
self.add_request(self.REQUEST_INDIVIDUAL_FILE_STARTED, '{}'.format(request.path), {
'id': history_id,
- 'method': request.method,
'status_code': 404
})