feat(platform): add Discord onboarding and Velocity gate
This commit is contained in:
@@ -4,7 +4,15 @@ const steps = [
|
||||
["03", "Join the server", "Add your Java account and connect once approved."],
|
||||
] as const;
|
||||
|
||||
export default function HomePage() {
|
||||
export default async function HomePage({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: Promise<{ portal?: string }>;
|
||||
}) {
|
||||
const { portal } = await searchParams;
|
||||
const inviteUrl = process.env.DISCORD_INVITE_URL?.trim();
|
||||
const guildId = process.env.DISCORD_GUILD_ID?.trim();
|
||||
|
||||
return (
|
||||
<main className="relative min-h-screen overflow-hidden bg-canvas text-ink">
|
||||
<div className="terrain" aria-hidden="true" />
|
||||
@@ -22,6 +30,12 @@ export default function HomePage() {
|
||||
</span>
|
||||
</header>
|
||||
|
||||
{portal && (
|
||||
<div className="mt-8 border border-accent bg-panel px-5 py-4 font-mono text-xs leading-6 shadow-[5px_5px_0_var(--color-accent)]">
|
||||
The account portal starts in Discord. Join the server, then run <strong>/register</strong> or <strong>/account</strong> to receive your private sign-in link.
|
||||
</div>
|
||||
)}
|
||||
|
||||
<section id="top" className="grid flex-1 items-center gap-14 py-20 lg:grid-cols-[1.15fr_0.85fr] lg:py-24">
|
||||
<div>
|
||||
<p className="mb-7 font-mono text-xs font-semibold uppercase tracking-[0.3em] text-accent">
|
||||
@@ -57,6 +71,16 @@ export default function HomePage() {
|
||||
<span className="text-signal">></span> Open Discord and type <strong>/register</strong>
|
||||
<span className="cursor ml-1 inline-block h-4 w-2 bg-signal align-middle" />
|
||||
</div>
|
||||
<div className="mt-5 grid gap-3 sm:grid-cols-2">
|
||||
{inviteUrl ? (
|
||||
<a className="border border-ink bg-accent px-4 py-3 text-center font-mono text-[10px] font-bold uppercase tracking-widest text-canvas" href={inviteUrl} rel="noreferrer" target="_blank">Join Discord server</a>
|
||||
) : (
|
||||
<span className="border border-line px-4 py-3 text-center font-mono text-[10px] uppercase tracking-widest text-muted">Invite not configured</span>
|
||||
)}
|
||||
{guildId && (
|
||||
<a className="border border-ink px-4 py-3 text-center font-mono text-[10px] font-bold uppercase tracking-widest" href={`discord://-/channels/${guildId}`}>Open Discord app</a>
|
||||
)}
|
||||
</div>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user