Files
shopify-ai-backup/chat/public/admin-plans.html
southseact-3d 25d23d8dd1 Add comprehensive feature request admin functionality
- Update data model to include status, adminReply, and updatedAt fields
- Hide user emails from public API responses for privacy
- Add admin-only endpoints: list, reply, update status, delete
- Create admin-feature-requests.html with full management UI
- Add status badges and admin replies to public feature requests page
- Add Feature Requests link to all admin page sidebars

Admin capabilities:
- View all feature requests with author emails (admin only)
- Reply to feature requests with admin responses visible to public
- Update status: pending, planned, in-progress, completed, declined
- Delete feature requests
- Filter and sort by status, votes, date
2026-02-10 13:27:36 +00:00

100 lines
4.3 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Admin Panel Plans</title>
<link rel="stylesheet" href="/styles.css" />
<!-- PostHog Analytics -->
<script src="/posthog.js"></script>
</head>
<body data-page="plans">
<div class="sidebar-overlay"></div>
<div class="app-shell">
<aside class="sidebar">
<div class="brand">
<div class="brand-mark">A</div>
<div>
<div class="brand-title">Admin</div>
<div class="brand-sub">Site management</div>
</div>
<button id="close-sidebar" class="ghost" style="margin-left: auto; display: none;">&times;</button>
</div>
<div class="sidebar-section">
<div class="section-heading">Navigation</div>
<a class="ghost" href="/admin/build">Build models</a>
<a class="ghost" href="/admin/plan">Plan models</a>
<a class="ghost" href="/admin/plans">Plans</a>
<a class="ghost" href="/admin/accounts">Accounts</a>
<a class="ghost" href="/admin/affiliates">Affiliates</a>
<a class="ghost" href="/admin/withdrawals">Withdrawals</a>
<a class="ghost" href="/admin/tracking">Tracking</a>
<a class="ghost" href="/admin/resources">Resources</a>
<a class="ghost" href="/admin/external-testing">External Testing</a>
<a class="ghost" href="/admin/contact-messages">Contact Messages</a>
<a class="ghost" href="/admin/feature-requests">Feature Requests</a>
<a class="ghost" href="/admin/login">Login</a>
</div>
</aside>
<main class="main">
<div class="admin-shell">
<div class="topbar" style="margin-bottom: 12px;">
<button id="menu-toggle">
<span></span><span></span><span></span>
</button>
<div>
<div class="pill">Admin</div>
<div class="title" style="margin-top: 6px;">Plan Token Limits</div>
<div class="crumb">View and edit token allocations per plan and tier.</div>
</div>
<div class="admin-actions">
<button id="admin-refresh" class="ghost">Refresh</button>
<button id="admin-logout" class="primary">Logout</button>
</div>
</div>
<div class="admin-card">
<header>
<h3>Plan token allocations</h3>
<div class="pill">Tokens</div>
</header>
<p class="muted" style="margin-top:0;">Edit total tokens available per plan and per tier. Changes take effect immediately for new token calculations.</p>
<div id="plan-tokens-table" class="admin-list"></div>
<div class="admin-actions" style="margin-top:12px;">
<button id="save-plan-tokens" class="primary">Save changes</button>
<div class="status-line" id="plan-tokens-status"></div>
</div>
</div>
<div class="admin-card" style="margin-top: 16px;">
<header>
<h3>Token usage rates (overage)</h3>
<div class="pill">Per 1M tokens</div>
</header>
<p class="muted" style="margin-top:0;">Set the exact rate charged per 1,000,000 overage tokens. Rates are in minor units (cents/pence).</p>
<div class="admin-list">
<div class="admin-row">
<div style="min-width: 140px;"><strong>USD</strong></div>
<input id="token-rate-usd" type="number" min="0" step="1" placeholder="250" style="max-width: 200px;" />
</div>
<div class="admin-row">
<div style="min-width: 140px;"><strong>GBP</strong></div>
<input id="token-rate-gbp" type="number" min="0" step="1" placeholder="200" style="max-width: 200px;" />
</div>
<div class="admin-row">
<div style="min-width: 140px;"><strong>EUR</strong></div>
<input id="token-rate-eur" type="number" min="0" step="1" placeholder="250" style="max-width: 200px;" />
</div>
</div>
<div class="admin-actions" style="margin-top:12px;">
<button id="save-token-rates" class="primary">Save rates</button>
<div class="status-line" id="token-rates-status"></div>
</div>
</div>
</div>
</main>
</div>
<script src="/admin.js"></script>
</body>
</html>