mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-12 14:01:18 +02:00
Show the remote nodes on enterprise pangolin dns
This commit is contained in:
@@ -10,6 +10,7 @@ import { getTranslations } from "next-intl/server";
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import { build } from "@server/build";
|
import { build } from "@server/build";
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
import { useEnvContext } from "@app/hooks/useEnvContext";
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Remote Exit Nodes"
|
title: "Remote Exit Nodes"
|
||||||
@@ -24,7 +25,9 @@ export const dynamic = "force-dynamic";
|
|||||||
export default async function RemoteExitNodesPage(
|
export default async function RemoteExitNodesPage(
|
||||||
props: RemoteExitNodesPageProps
|
props: RemoteExitNodesPageProps
|
||||||
) {
|
) {
|
||||||
if (build != "saas") {
|
const { env } = useEnvContext();
|
||||||
|
|
||||||
|
if (!env?.flags.usePangolinDns) {
|
||||||
redirect("/");
|
redirect("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ export const orgNavSections = (
|
|||||||
href: "/{orgId}/settings/domains",
|
href: "/{orgId}/settings/domains",
|
||||||
icon: <Globe className="size-4 flex-none" />
|
icon: <Globe className="size-4 flex-none" />
|
||||||
},
|
},
|
||||||
...(build === "saas"
|
...(env?.flags.usePangolinDns
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
title: "sidebarRemoteExitNodes",
|
title: "sidebarRemoteExitNodes",
|
||||||
@@ -461,7 +461,7 @@ export const commandBarNavSections = (
|
|||||||
title: "commandMachineClients",
|
title: "commandMachineClients",
|
||||||
icon: <Server className="size-4 flex-none" />
|
icon: <Server className="size-4 flex-none" />
|
||||||
},
|
},
|
||||||
...(build === "saas"
|
...(env?.flags.usePangolinDns
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
title: "commandRemoteExitNodes",
|
title: "commandRemoteExitNodes",
|
||||||
|
|||||||
Reference in New Issue
Block a user