Merge branch 'dev' of https://github.com/fosrl/pangolin into dev

This commit is contained in:
Milo Schwartz
2025-01-11 14:13:08 -05:00
12 changed files with 96 additions and 28 deletions

View File

@@ -352,7 +352,7 @@ export default function ReverseProxyTargets(props: {
},
{
accessorKey: "ip",
header: "IP Address",
header: "IP / Hostname",
cell: ({ row }) => (
<Input
defaultValue={row.original.ip}

View File

@@ -14,7 +14,7 @@ import { XCircle } from "lucide-react";
import { useRouter } from "next/navigation";
type InviteStatusCardProps = {
type: "rejected" | "wrong_user" | "user_does_not_exist";
type: "rejected" | "wrong_user" | "user_does_not_exist" | "not_logged_in";
token: string;
};

View File

@@ -60,6 +60,8 @@ export default async function InvitePage(props: {
)
) {
return "user_does_not_exist";
} else if (error.includes("You must be logged in to accept an invite")) {
return "not_logged_in";
} else {
return "rejected";
}
@@ -71,6 +73,10 @@ export default async function InvitePage(props: {
redirect(`/auth/signup?redirect=/invite?token=${params.token}`);
}
if (!user && type === "not_logged_in") {
redirect(`/auth/login?redirect=/invite?token=${params.token}`);
}
return (
<>
<InviteStatusCard type={type} token={tokenParam} />