← back to Pitch Guard
Add Delete draft button to the Pitch panel footer
e7305dda103a71d45d50201738fdc79e2e663d16 · 2026-05-19 09:22:09 -0700 · Steve
Files touched
Diff
commit e7305dda103a71d45d50201738fdc79e2e663d16
Author: Steve <steve@designerwallcoverings.com>
Date: Tue May 19 09:22:09 2026 -0700
Add Delete draft button to the Pitch panel footer
---
public/index.html | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/public/index.html b/public/index.html
index ddb34c6..58ee30f 100644
--- a/public/index.html
+++ b/public/index.html
@@ -469,7 +469,11 @@ async function deleteDraft(id){
const out = await r.json();
if(out.error) throw new Error(out.error);
DRAFTS = DRAFTS.filter(x=>x.id!==id);
- if(CURRENT===id) CURRENT=null;
+ if(CURRENT===id){
+ CURRENT=null;
+ const corr=$('#corr'); if(corr) corr.innerHTML='<div class="empty"><div class="big">✉</div>Pick a draft to see every thread<br>with that contact before you decide.</div>';
+ const pit=$('#pitch'); if(pit) pit.innerHTML='<div class="pitch-empty">No draft selected.<br>The followup waiting for this client will appear here.</div>';
+ }
renderDrafts();
toast('Draft moved to Trash');
}catch(e){ toast('Delete failed: '+e.message,1); }
@@ -569,11 +573,13 @@ async function loadPitch(d){
'</div>'+
'<div class="pitch-foot">'+
'<span id="sendState"></span><span class="spacer"></span>'+
+ '<button id="delBtn" class="btn-sm" style="color:var(--red);border-color:#d8b4ae" title="Move this draft to Trash">🗑 Delete draft</button>'+
'<button id="skipBtn" class="btn-sm">Skip</button>'+
'<button id="sendBtn" class="btn-go">Send followup</button>'+
'</div>'+
'</div>';
$('#skipBtn').onclick=()=>{ toast('Skipped — draft left untouched in Gmail'); };
+ $('#delBtn').onclick=()=>deleteDraft(d.id);
$('#sendBtn').onclick=()=>sendPitch(d);
const c = verdictOf(d.toEmail);
if(c) renderVerdict(c);
← fba50d0 Add recent-followup signal, draft delete (trash), and sort b
·
back to Pitch Guard
·
Fix recent-followup detection — broad regex for all followup 0bd7aef →