HackmanCMS/views/social.php
Bashy 629f2515e9 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>
2026-06-04 20:49:56 +03:00

49 lines
2.4 KiB
PHP

<?php
$page_title = 'Social';
$nav_active = 'social';
include ROOT . '/views/_header.php';
?>
<div class="d-flex align-items-center mb-4 gap-2">
<h2 class="h4 mb-0"><i class="bi bi-calendar-week me-2"></i>Social Scheduler</h2>
<div class="ms-auto btn-group btn-group-sm">
<button class="btn btn-outline-secondary active" id="socialFilterPending">Pending</button>
<button class="btn btn-outline-secondary" id="socialFilterAll">All</button>
</div>
<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>
</div>
</div>
<!-- Global floating emoji picker -->
<div id="socialEmojiPanel" class="social-emoji-panel card shadow d-none">
<div class="card-body p-2 social-emoji-grid">
<div class="social-emoji-cat">Smileys</div>
<div>😀 😂 🥰 😍 🤩 😎 😭 😤 🤔 😴 🥳 🤗 😅 🫡 😇 🙃 😘 😣 😝 🥺 👀</div>
<div class="social-emoji-cat mt-1">Gestures</div>
<div>👍 👎 👏 🙌 🤝 ✌️ 👌 🤞 🫶 💪 🎉 🔥 ✨ ⭐ 💯 🙏 👋 🤷‍♀️</div>
<div class="social-emoji-cat mt-1">Hearts</div>
<div>❤️ 🧡 💛 💚 💙 💜 🖤 🤍 💔 💕 💞 💓 💗 💖 🫀 ♥️</div>
<div class="social-emoji-cat mt-1">Nature</div>
<div>🌟 🌈 🌸 🌺 🌻 🌙 ☀️ 🌊 🌿 🍀 🦋 🌍 🌱 🎄 🌴 🌵</div>
<div class="social-emoji-cat mt-1">Objects</div>
<div>💻 📱 📸 🎵 🎮 🎨 📚 🏆 🔑 💡 🔔 📢 🎯 📊 🚀 🎁</div>
<div class="social-emoji-cat mt-1">Symbols</div>
<div>✅ ❌ ⚡ 🔗 💬 📌 🔍 💰 ⏰ 📅 🗓️ ➡️ ⬆️ 🔄 💤 ❓</div>
</div>
</div>
<!-- Shared hidden file input for image uploads -->
<input type="file" id="socialImageInput" accept="image/jpeg,image/png,image/gif,image/webp" class="d-none">
<?php include ROOT . '/views/_footer.php'; ?>