mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-10 19:58:52 -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.can_upload = True
|
||||||
self.uploads_in_progress = []
|
self.uploads_in_progress = []
|
||||||
|
|
||||||
|
self.cur_history_id = 0
|
||||||
|
|
||||||
self.define_routes()
|
self.define_routes()
|
||||||
|
|
||||||
def define_routes(self):
|
def define_routes(self):
|
||||||
@ -29,6 +31,13 @@ class ReceiveModeWeb:
|
|||||||
"""
|
"""
|
||||||
@self.web.app.route("/")
|
@self.web.app.route("/")
|
||||||
def index():
|
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)
|
self.web.add_request(self.web.REQUEST_LOAD, request.path)
|
||||||
r = make_response(render_template('receive.html',
|
r = make_response(render_template('receive.html',
|
||||||
static_url_path=self.web.static_url_path))
|
static_url_path=self.web.static_url_path))
|
||||||
|
@ -209,7 +209,6 @@ class Web:
|
|||||||
self.cur_history_id += 1
|
self.cur_history_id += 1
|
||||||
self.add_request(self.REQUEST_INDIVIDUAL_FILE_STARTED, '{}'.format(request.path), {
|
self.add_request(self.REQUEST_INDIVIDUAL_FILE_STARTED, '{}'.format(request.path), {
|
||||||
'id': history_id,
|
'id': history_id,
|
||||||
'method': request.method,
|
|
||||||
'status_code': 404
|
'status_code': 404
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user