Add relative time to post cards; add Dispatch now button for manual testing

- View cards now show "2026-06-04 14:30 (in 2h)" next to the scheduled time
- New "Dispatch now" button runs dispatch-social.php immediately and shows
  output inline (useful for diagnosing why cron isn't sending posts)
- dispatch action added to /api/social

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Bashy 2026-06-04 20:49:56 +03:00
parent e52f90445b
commit 629f2515e9
3 changed files with 31 additions and 1 deletions

View file

@ -12,8 +12,13 @@ include ROOT . '/views/_header.php';
<button class="btn btn-sm btn-outline-secondary" id="socialRefreshBtn" title="Refresh">
<i class="bi bi-arrow-clockwise"></i>
</button>
<button class="btn btn-sm btn-outline-success" id="socialDispatchBtn" title="Run dispatcher now">
<i class="bi bi-send me-1"></i>Dispatch now
</button>
</div>
<pre id="socialDispatchOut" class="small bg-body-secondary border rounded p-2 mb-3 d-none" style="max-height:200px;overflow-y:auto;white-space:pre-wrap"></pre>
<div id="socialPage">
<div id="socialPostsGrid" class="row g-3">
<div class="col-12 text-center text-muted py-5 small">Loading…</div>