diff --git a/server/public/home.html b/server/public/home.html index a280d08..497e4e5 100644 --- a/server/public/home.html +++ b/server/public/home.html @@ -181,6 +181,8 @@ .chat-bottom{display:flex;justify-content:space-between;align-items:center;gap:.5rem;margin-top:.15rem;} .chat-prev{color:var(--muted);font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;} .chat-row.unread .chat-prev{color:var(--ink);font-weight:500;} + .prev-tick{display:inline-flex;vertical-align:middle;color:var(--muted);} .prev-tick.read{color:#2563eb;} .prev-tick svg{width:14px;height:14px;} + .draft-lbl{color:#dc2626;font-weight:600;} .chat-row.unread .chat-name{font-weight:700;} .badge{flex:0 0 auto;background:var(--brand);color:var(--blue);font-size:.7rem;font-weight:800;min-width:19px;height:19px;border-radius:99px;padding:0 .35rem;display:grid;place-items:center;} .no-results{padding:2rem 1rem;text-align:center;color:var(--muted);font-size:.85rem;} @@ -1058,11 +1060,17 @@ function rowHTML(it){ const active=selected&&selected.kind===it.kind&&selected.id===it.id; const cls=['chat-row']; if(active)cls.push('active'); if(it.unread>0)cls.push('unread'); const isG=it.kind==='group'; - const preview=it.last_body?((it.last_from_me?'You: ':'')+it.last_body):(isG?((it.members||0)+' members'):'No messages yet'); + const draft=getDraft(it.kind,it.id); + let inner; + if(draft && !active){ inner='Draft: '+pEsc(draft); } // unsent draft (#1) + else if(it.callActive){ inner=''+ic('phone',12)+' Ongoing call'; } + else if(it.last_from_me && it.last_status && it.last_body){ // my last message → tick (#3) + inner=''+ic(it.last_status==='sent'?'check':'checkCheck',13)+' '+pEsc(it.last_body); } + else { inner=pEsc(it.last_body?((it.last_from_me?'You: ':'')+it.last_body):(isG?((it.members||0)+' members'):'No messages yet')); } return '