Revert "Add missing admin action files and navigation links"

This reverts commit 41be6835bf.
This commit is contained in:
Simo committed 2026-07-11 20:37:56 +02:00
1 parent 4a1e1115b3
commit 4d515bc400
338 files changed
+5949 -28144

No files matched your search

+30 -10
View File
@@ -14,7 +14,11 @@ const PROVIDERS: { value: string; label: string }[] = [
{ value: "ipqualityscore", label: "IPQualityScore" },
];
export default async function AdminVpn({ searchParams }: { searchParams: Promise<{ saved?: string }> }) {
export default async function AdminVpn({
searchParams,
}: {
searchParams: Promise<{ saved?: string }>;
}) {
const sp = await searchParams;
const t = await getTranslations("pages.admin.vpn");
@@ -23,8 +27,10 @@ export default async function AdminVpn({ searchParams }: { searchParams: Promise
const provider = (await siteSettings.get("vpn_provider", "none")) ?? "none";
const apiKey = (await siteSettings.get("vpn_api_key", "")) ?? "";
const blockMessage =
(await siteSettings.get("vpn_block_message", "Registrations from VPNs or proxies are not allowed.")) ??
"";
(await siteSettings.get(
"vpn_block_message",
"Registrations from VPNs or proxies are not allowed.",
)) ?? "";
return (
<main>
@@ -34,13 +40,12 @@ export default async function AdminVpn({ searchParams }: { searchParams: Promise
</div>
<div>
<h1 className="m-0 text-xl font-extrabold text-[var(--color-text)]">{t("title")}</h1>
<p className="m-0 text-xs text-[var(--color-text-muted)] mt-0.5">
{t.rich("subtitle", { ipLink: (chunks) => <Link href="/admin/ip">{chunks}</Link> })}
</p>
<p className="m-0 text-xs text-[var(--color-text-muted)] mt-0.5">{t.rich("subtitle", { ipLink: (chunks) => <Link href="/admin/ip">{chunks}</Link> })}</p>
</div>
</div>
<section className="mt-6">
{sp.saved ? (
<p className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-green-600/20 text-[var(--color-text)]">
{t("settingsSaved")}
@@ -63,8 +68,15 @@ export default async function AdminVpn({ searchParams }: { searchParams: Promise
<form action={saveVpn} className="admin-card">
<div style={{ marginBottom: "1rem" }}>
<label style={{ display: "flex", alignItems: "center", gap: "0.6rem" }}>
<input type="checkbox" name="vpn_block_enabled" value="1" defaultChecked={enabled} />
<span style={{ fontWeight: 700 }}>{t("blockOnDetect")}</span>
<input
type="checkbox"
name="vpn_block_enabled"
value="1"
defaultChecked={enabled}
/>
<span style={{ fontWeight: 700 }}>
{t("blockOnDetect")}
</span>
</label>
</div>
@@ -76,7 +88,12 @@ export default async function AdminVpn({ searchParams }: { searchParams: Promise
>
{t("provider")}
</label>
<select id="vpn_provider" name="vpn_provider" defaultValue={provider} style={{ width: "100%" }}>
<select
id="vpn_provider"
name="vpn_provider"
defaultValue={provider}
style={{ width: "100%" }}
>
{PROVIDERS.map((p) => (
<option key={p.value} value={p.value}>
{p.label}
@@ -89,7 +106,10 @@ export default async function AdminVpn({ searchParams }: { searchParams: Promise
</div>
<div>
<label htmlFor="vpn_api_key" style={{ display: "block", fontWeight: 700, fontSize: "0.85rem" }}>
<label
htmlFor="vpn_api_key"
style={{ display: "block", fontWeight: 700, fontSize: "0.85rem" }}
>
{t("apiKey")}
</label>
<input