mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
made --stay-open work in GUI (#58)
This commit is contained in:
parent
c74e259fb4
commit
8fce3adeb5
@ -130,6 +130,7 @@ def main():
|
|||||||
webapp.onion_host = local_host
|
webapp.onion_host = local_host
|
||||||
webapp.qtapp = app
|
webapp.qtapp = app
|
||||||
webapp.clipboard = app.clipboard()
|
webapp.clipboard = app.clipboard()
|
||||||
|
webapp.stay_open = bool(stay_open)
|
||||||
|
|
||||||
# run the web app in a new thread
|
# run the web app in a new thread
|
||||||
webapp_port = onionshare.choose_port()
|
webapp_port = onionshare.choose_port()
|
||||||
|
@ -86,6 +86,10 @@ $(function(){
|
|||||||
$('#filehash .label').html(onionshare.strings['sha1_checksum']+':');
|
$('#filehash .label').html(onionshare.strings['sha1_checksum']+':');
|
||||||
$('#close-on-finish-wrapper label').html(onionshare.strings['close_on_finish']);
|
$('#close-on-finish-wrapper label').html(onionshare.strings['close_on_finish']);
|
||||||
$('#loading .calculating').html(onionshare.strings['calculating_sha1']);
|
$('#loading .calculating').html(onionshare.strings['calculating_sha1']);
|
||||||
|
|
||||||
|
if(onionshare.stay_open) {
|
||||||
|
$('#close-on-finish').removeAttr('checked');
|
||||||
|
}
|
||||||
|
|
||||||
// after getting the initial info, start the onionshare server
|
// after getting the initial info, start the onionshare server
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -7,6 +7,7 @@ filename = None
|
|||||||
onion_host = None
|
onion_host = None
|
||||||
qtapp = None
|
qtapp = None
|
||||||
clipboard = None
|
clipboard = None
|
||||||
|
stay_open = None
|
||||||
|
|
||||||
url = None
|
url = None
|
||||||
|
|
||||||
@ -35,12 +36,13 @@ def index():
|
|||||||
|
|
||||||
@app.route("/init_info")
|
@app.route("/init_info")
|
||||||
def init_info():
|
def init_info():
|
||||||
global onionshare, filename
|
global onionshare, filename, stay_open
|
||||||
basename = os.path.basename(filename)
|
basename = os.path.basename(filename)
|
||||||
|
|
||||||
return json.dumps({
|
return json.dumps({
|
||||||
'strings': onionshare.strings,
|
'strings': onionshare.strings,
|
||||||
'basename': basename
|
'basename': basename,
|
||||||
|
'stay_open': stay_open
|
||||||
})
|
})
|
||||||
|
|
||||||
@app.route("/start_onionshare")
|
@app.route("/start_onionshare")
|
||||||
|
Loading…
Reference in New Issue
Block a user