Spaces:
Runtime error
Runtime error
Create premium.html
Browse files- premium.html +131 -0
premium.html
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
+
<title>FriendlyBot — Premium</title>
|
| 7 |
+
<link rel="icon" href="/logo.png" />
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet" />
|
| 9 |
+
<style>
|
| 10 |
+
:root {
|
| 11 |
+
--bg: #0a0a1a; --surface: #12122a; --border: rgba(255,255,255,0.08);
|
| 12 |
+
--text: #fff; --text-dim: rgba(255,255,255,0.6); --gold: #FFD700;
|
| 13 |
+
--accent: #5865F2; --radius: 16px;
|
| 14 |
+
}
|
| 15 |
+
* { box-sizing: border-box; margin:0; padding:0; }
|
| 16 |
+
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; padding: 40px 20px; }
|
| 17 |
+
header { max-width: 1000px; margin: 0 auto 40px; display: flex; justify-content: space-between; align-items: center; }
|
| 18 |
+
h1 { font-size: 28px; font-weight: 700; }
|
| 19 |
+
.btn {
|
| 20 |
+
display: inline-block; padding: 10px 20px; background: var(--accent);
|
| 21 |
+
color: #fff; text-decoration: none; border-radius: 8px; font-weight: 600; font-size: 14px;
|
| 22 |
+
}
|
| 23 |
+
.container { max-width: 1000px; margin: 0 auto; }
|
| 24 |
+
.hero {
|
| 25 |
+
background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
|
| 26 |
+
color: #000; padding: 40px; border-radius: var(--radius); margin-bottom: 30px; text-align: center;
|
| 27 |
+
}
|
| 28 |
+
.hero h2 { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
|
| 29 |
+
.hero p { font-size: 16px; opacity: 0.8; }
|
| 30 |
+
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-bottom: 30px; }
|
| 31 |
+
.card {
|
| 32 |
+
background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
|
| 33 |
+
padding: 24px; transition: all 0.25s;
|
| 34 |
+
}
|
| 35 |
+
.card:hover { border-color: var(--gold); transform: translateY(-3px); }
|
| 36 |
+
.card .icon { font-size: 32px; margin-bottom: 12px; }
|
| 37 |
+
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
|
| 38 |
+
.card p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }
|
| 39 |
+
.status {
|
| 40 |
+
background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
|
| 41 |
+
padding: 24px; margin-bottom: 30px; display: flex; align-items: center; gap: 16px;
|
| 42 |
+
}
|
| 43 |
+
.status .badge {
|
| 44 |
+
padding: 8px 20px; border-radius: 100px; font-weight: 700; font-size: 14px;
|
| 45 |
+
}
|
| 46 |
+
.badge.active { background: rgba(255,215,0,0.2); color: var(--gold); border: 1px solid var(--gold); }
|
| 47 |
+
.badge.inactive { background: rgba(255,255,255,0.05); color: var(--text-dim); border: 1px solid var(--border); }
|
| 48 |
+
table { width: 100%; border-collapse: collapse; }
|
| 49 |
+
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); }
|
| 50 |
+
th { color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
|
| 51 |
+
@media (max-width: 700px) { .features { grid-template-columns: 1fr; } }
|
| 52 |
+
</style>
|
| 53 |
+
</head>
|
| 54 |
+
<body>
|
| 55 |
+
<header>
|
| 56 |
+
<h1>⭐ Premium</h1>
|
| 57 |
+
<a href="/" class="btn">Back to Dashboard</a>
|
| 58 |
+
</header>
|
| 59 |
+
<div class="container">
|
| 60 |
+
<div class="hero">
|
| 61 |
+
<h2>⭐ FriendlyBot Premium</h2>
|
| 62 |
+
<p>Unlock exclusive features by winning a league match. Premium is granted automatically when you record a win with <code>!win</code>.</p>
|
| 63 |
+
</div>
|
| 64 |
+
<div class="status" id="status">
|
| 65 |
+
<div class="badge inactive" id="premium-badge">Checking...</div>
|
| 66 |
+
<span id="premium-text">Loading your premium status...</span>
|
| 67 |
+
</div>
|
| 68 |
+
<div class="features">
|
| 69 |
+
<div class="card">
|
| 70 |
+
<div class="icon">📊</div>
|
| 71 |
+
<h3>Advanced Stats & Analytics</h3>
|
| 72 |
+
<p>Track goals, assists, clean sheets, and weekly leaderboards for every player.</p>
|
| 73 |
+
</div>
|
| 74 |
+
<div class="card">
|
| 75 |
+
<div class="icon">📅</div>
|
| 76 |
+
<h3>Match Scheduling & Reminders</h3>
|
| 77 |
+
<p>Auto-post scheduled matches with DM reminders 60 minutes before kickoff.</p>
|
| 78 |
+
</div>
|
| 79 |
+
<div class="card">
|
| 80 |
+
<div class="icon">🎴</div>
|
| 81 |
+
<h3>Player Profile Cards</h3>
|
| 82 |
+
<p>Advanced <code>profileimage</code> with extra stats and custom backgrounds.</p>
|
| 83 |
+
</div>
|
| 84 |
+
<div class="card">
|
| 85 |
+
<div class="icon">🔧</div>
|
| 86 |
+
<h3>Custom Command Aliases</h3>
|
| 87 |
+
<p>Rename bot commands to fit your server (e.g. <code>!ff</code> for <code>!friendly</code>).</p>
|
| 88 |
+
</div>
|
| 89 |
+
</div>
|
| 90 |
+
<div class="card" style="padding:24px">
|
| 91 |
+
<h3>🏆 Premium Users</h3>
|
| 92 |
+
<table>
|
| 93 |
+
<thead><tr><th>User ID</th><th>Granted</th><th>Reason</th></tr></thead>
|
| 94 |
+
<tbody id="premium-list"><tr><td colspan="3">Loading...</td></tr></tbody>
|
| 95 |
+
</table>
|
| 96 |
+
</div>
|
| 97 |
+
</div>
|
| 98 |
+
<script>
|
| 99 |
+
async function load() {
|
| 100 |
+
const statusEl = document.getElementById('premium-badge');
|
| 101 |
+
const textEl = document.getElementById('premium-text');
|
| 102 |
+
const listEl = document.getElementById('premium-list');
|
| 103 |
+
try {
|
| 104 |
+
const r = await fetch('/api/premium');
|
| 105 |
+
const data = await r.json();
|
| 106 |
+
if (data.premium) {
|
| 107 |
+
statusEl.className = 'badge active';
|
| 108 |
+
statusEl.textContent = '⭐ ACTIVE';
|
| 109 |
+
textEl.textContent = 'You have Premium access! Enjoy all features.';
|
| 110 |
+
} else {
|
| 111 |
+
statusEl.className = 'badge inactive';
|
| 112 |
+
statusEl.textContent = '— LOCKED';
|
| 113 |
+
textEl.textContent = 'Win a league match with !win to unlock Premium.';
|
| 114 |
+
}
|
| 115 |
+
if (data.list && data.list.length > 0) {
|
| 116 |
+
listEl.innerHTML = data.list.map(u => {
|
| 117 |
+
const date = new Date(u.grantedAt).toLocaleDateString();
|
| 118 |
+
return `<tr><td>${u.userId}</td><td>${date}</td><td>${u.reason || 'manual'}</td></tr>`;
|
| 119 |
+
}).join('');
|
| 120 |
+
} else {
|
| 121 |
+
listEl.innerHTML = '<tr><td colspan="3">No premium users yet.</td></tr>';
|
| 122 |
+
}
|
| 123 |
+
} catch (e) {
|
| 124 |
+
statusEl.textContent = '❌ ERROR';
|
| 125 |
+
textEl.textContent = 'Could not load premium data.';
|
| 126 |
+
}
|
| 127 |
+
}
|
| 128 |
+
load();
|
| 129 |
+
</script>
|
| 130 |
+
</body>
|
| 131 |
+
</html>
|