feat(referrals): add referral attribution and daily login rewards
- Track referral attribution at registration via ?ref code with same-IP and duplicate-pair guards - Add daily login rewards with streak tracking, claim flow and sendCurrency payout backed by RCON with DB fallback - Add admin pages for referral settings and the daily reward schedule - Add migration 0033 with tables, seed schedule, settings and ACL grants - Add admin.referrals.* and admin.dailyrewards.* permission slugs - Localize new copy in en, nl and it
This commit is contained in:
1 parent
463bc2cb47
commit
c3ff497050
30 files changed
+2028
-11
No files matched your search
@@ -8,9 +8,12 @@ import styles from "./dashboard.module.css";
|
||||
export default async function DashboardTasks({
|
||||
userId,
|
||||
rewardAvailable,
|
||||
dailyRewardAvailable,
|
||||
}: {
|
||||
userId: number;
|
||||
rewardAvailable: boolean | null;
|
||||
/** Claimable daily login reward (false when claimed/disabled or loader down). */
|
||||
dailyRewardAvailable?: boolean;
|
||||
}) {
|
||||
const [data, t, format] = await Promise.all([
|
||||
loadDashboardTasks(userId),
|
||||
@@ -41,6 +44,8 @@ export default async function DashboardTasks({
|
||||
});
|
||||
if (rewardAvailable)
|
||||
items.push({ href: "#referral-reward", label: t("reward") });
|
||||
if (dailyRewardAvailable)
|
||||
items.push({ href: "#daily-reward", label: t("dailyReward") });
|
||||
const unavailable =
|
||||
data.support === null ||
|
||||
data.friendRequests === null ||
|
||||
|
||||
Reference in new issue
Block a user