Add MineGeo gameplay systems and interface

This commit is contained in:
2026-10-10 10:27:47 +05:00
parent bf01d9801d
commit 9af71c85c2
47 changed files with 9954 additions and 93 deletions

View File

@@ -0,0 +1,29 @@
import { timingSafeEqual } from "node:crypto";
import { NextRequest, NextResponse } from "next/server";
import { dispatchDiscordAnnouncements } from "@/lib/discord-announcements";
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
export const maxDuration = 300;
export async function GET(request: NextRequest) {
const secret = process.env.CRON_SECRET;
const actual = Buffer.from(request.headers.get("authorization") ?? "");
const expected = Buffer.from(`Bearer ${secret ?? ""}`);
if (
!secret ||
actual.length !== expected.length ||
!timingSafeEqual(actual, expected)
)
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
try {
await dispatchDiscordAnnouncements();
return NextResponse.json(
{ ok: true },
{ headers: { "Cache-Control": "no-store" } },
);
} catch {
return NextResponse.json(
{ error: "Discord dispatch will retry" },
{ status: 503 },
);
}
}

View File

@@ -326,6 +326,9 @@ html[data-theme="light"] .success-message {
html[data-theme="light"] .username-moderator {
color: #246494;
}
html[data-theme="light"] .username-admin {
color: #8c491e;
}
html[data-theme="light"] .username-bug-finder {
color: #866318;
}

40
app/community.css Normal file
View File

@@ -0,0 +1,40 @@
.community-links {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 10px;
margin-top: 18px;
}
.community-link {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-height: 44px;
max-width: 100%;
padding: 10px 13px;
border: 1px solid var(--line);
border-radius: var(--radius-control);
background: var(--panel);
color: var(--text);
font:
600 12px/1.5 Arial,
Helvetica,
sans-serif;
}
.community-link:hover {
border-color: var(--green);
background: var(--panel2);
}
.community-discord > svg:first-child {
color: #bab3ff;
}
.community-telegram > svg:first-child {
color: #83d3ff;
}
html[data-theme="light"] .community-discord > svg:first-child {
color: #6250b4;
}
html[data-theme="light"] .community-telegram > svg:first-child {
color: #20709d;
}

View File

@@ -17,6 +17,7 @@ import "./mobile-game.css";
import "./multiplayer.css";
import "./support.css";
import "./appearance.css";
import "./community.css";
import { themeInitScript } from "@/shared/theme";
import { SiteSettingsProvider } from "@/components/SiteSettingsProvider";
import { initialSiteSettings } from "@/lib/site-settings";

View File

@@ -178,6 +178,9 @@
.username-moderator {
color: #91d3ff;
}
.username-admin {
color: #ffc18a;
}
.username-bug-finder {
color: #ffe6a1;
}