mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-05 09:25:37 -05:00
Make sure IndividualFileHistoryItem widgets display properly in receive mode too
This commit is contained in:
parent
3f7c4a4e25
commit
f089ae5847
@ -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))
|
||||
|
@ -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
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user