damus.io

damus.io website
git clone git://jb55.com/damus.io
Log | Files | Refs | README

commit ccc08fa1bc614bb9e7737d0086d60e37e4d66da8
parent fb543919a73e0a40e5f14a7d48d2b377857a2edd
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 11 Nov 2022 16:40:28 -0800

fix post deletion

Diffstat:
Mweb/damus.js | 13+------------
Mweb/styles.css | 2++
2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/web/damus.js b/web/damus.js @@ -777,17 +777,6 @@ function render_replying_to(model, ev) { ` } -function render_delete_post(model, ev) { - if (model.pubkey !== ev.pubkey) - return "" - - return ` - <span onclick="delete_post_confirm('${ev.id}')" class="clickable" style="float: right"> - ✕ - </span> - ` -} - function delete_post_confirm(evid) { if (!confirm("Are you sure you want to delete this post?")) return @@ -1242,7 +1231,7 @@ function reply_to(evid) { function render_action_bar(ev, can_delete) { let delete_html = "" if (can_delete) - delete_html = `<button class="icon" title="Delete" onclick="like('${ev.id}')"><i class="fa fa-fw fa-trash"></i></a>` + delete_html = `<button class="icon" title="Delete" onclick="delete_post_confirm('${ev.id}')"><i class="fa fa-fw fa-trash"></i></a>` const groups = get_reactions(DSTATE, ev.id) const like = "❤️" diff --git a/web/styles.css b/web/styles.css @@ -216,6 +216,7 @@ details.cw summary { color: #444; cursor: pointer; margin-bottom: 10px; + outline: none; } /* Thread Expansion */ @@ -315,3 +316,4 @@ input[type="text"].cw { .clickable { cursor: pointer; } +