fix this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/5171921#context
parent
5fc27db8d4
commit
502fb2bb64
|
@ -324,6 +324,12 @@ function post_comment(fullname, hide){
|
||||||
remove_dialog();
|
remove_dialog();
|
||||||
if (fullname.startsWith('c_'))
|
if (fullname.startsWith('c_'))
|
||||||
restore_reply_buttons(fullname)
|
restore_reply_buttons(fullname)
|
||||||
|
|
||||||
|
if (fullname.startsWith('p_')) {
|
||||||
|
const viewbtn = document.getElementById('viewbtn')
|
||||||
|
if (viewbtn)
|
||||||
|
viewbtn.dataset.ids = viewbtn.dataset.ids.slice(0, -1) + `, ${data['id']}]`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showToast(false, getMessageFromJsonData(false, data));
|
showToast(false, getMessageFromJsonData(false, data));
|
||||||
|
|
|
@ -426,7 +426,7 @@ def comment(v):
|
||||||
gevent.spawn(postprocess_comment, c.body, c.body_html, c.id)
|
gevent.spawn(postprocess_comment, c.body, c.body_html, c.id)
|
||||||
|
|
||||||
if v.client: return c.json
|
if v.client: return c.json
|
||||||
return {"comment": render_template("comments.html", v=v, comments=[c])}
|
return {"id": c.id, "comment": render_template("comments.html", v=v, comments=[c])}
|
||||||
|
|
||||||
@app.post("/delete/comment/<int:cid>")
|
@app.post("/delete/comment/<int:cid>")
|
||||||
@limiter.limit('1/second', scope=rpath)
|
@limiter.limit('1/second', scope=rpath)
|
||||||
|
|
Loading…
Reference in New Issue