Merge pull request #17 from VE-FORBRYDERNE/failsafe
Update client-side story name when saving
This commit is contained in:
commit
b89a988ee4
|
@ -2050,6 +2050,11 @@ def saveRequest(savpath):
|
|||
return e
|
||||
file.close()
|
||||
|
||||
filename = path.basename(savpath)
|
||||
if(filename.endswith('.json')):
|
||||
filename = filename[:-5]
|
||||
vars.laststory = filename
|
||||
emit('from_server', {'cmd': 'setstoryname', 'data': vars.laststory}, broadcast=True)
|
||||
print("{0}Story saved to {1}!{2}".format(colors.GREEN, path.basename(savpath), colors.END))
|
||||
|
||||
#==================================================================#
|
||||
|
|
|
@ -883,7 +883,7 @@ function downloadStory(format) {
|
|||
authorsnote: $("#anoteinput").val(),
|
||||
actions: actionlist_compiled,
|
||||
worldinfo: wilist_compiled,
|
||||
}, null, 4)]));
|
||||
}, null, 3)]));
|
||||
anchor.setAttribute('href', objectURL);
|
||||
anchor.setAttribute('download', filename_without_extension + ".json");
|
||||
anchor.click();
|
||||
|
|
Loading…
Reference in New Issue