diff --git a/src/components/PinnedPrayers.jsx b/src/components/PinnedPrayers.jsx index 4e08aa3..c4a6e13 100644 --- a/src/components/PinnedPrayers.jsx +++ b/src/components/PinnedPrayers.jsx @@ -5,29 +5,37 @@ import { localDateString } from '../utils/readingPlans.js'; export default function PinnedPrayers() { const { prayers, togglePrayed, openPrayer } = useApp(); - const list = pinned(prayers).slice(0, 5); + const all = pinned(prayers); + const list = all.slice(0, 5); + const total = all.length; if (!list.length) return null; const today = localDateString(); return ( -
-
- Praying for +
+
+

Praying for {total > list.length ? `${list.length} of ${total}` : total}

-
    +
      {list.map((p) => { const done = p.prayedOn.includes(today); + const days = p.prayedOn.length; return ( -
    • - - {p.forWhom && {p.forWhom}: } - {p.text} - {p.status && {STATUSES[p.status]}} - +
    • + title={done ? 'Prayed today (tap to undo)' : 'Mark as prayed today'} + className={`mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full border text-xs ${done ? 'border-[var(--r-accent)] bg-[var(--r-accent)] text-[var(--r-on)]' : 'border-[var(--r-line)] text-transparent hover:border-[var(--r-accent)] hover:text-[var(--r-accent)]'}`}>✓ +
      + {(p.forWhom || p.status) && ( +

      + {p.forWhom && {p.forWhom}} + {p.status && {STATUSES[p.status]}} +

      + )} +

      {p.text}

      + {p.status === 'partial' && p.answerNote &&

      {p.answerNote}

      } + {days > 0 &&

      Prayed {days} day{days === 1 ? '' : 's'}

      } +
    • ); })}